riched20: We don't need to special case the PARAFORMAT2 fields since the masks have already been correctly sanitised. This fixes setting PFE_RTLPARA.
This commit is contained in:
parent
3158fd764d
commit
503c6caba6
|
@ -154,15 +154,12 @@ static BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const
|
|||
memcpy(para->member.para.pFmt->rgxTabs, pFmt->rgxTabs, pFmt->cTabCount*sizeof(LONG));
|
||||
}
|
||||
|
||||
if (dwMask & (PFM_ALL2 & ~PFM_ALL))
|
||||
{
|
||||
/* PARAFORMAT2 fields */
|
||||
|
||||
#define EFFECTS_MASK (PFM_RTLPARA|PFM_KEEP|PFM_KEEPNEXT|PFM_PAGEBREAKBEFORE| \
|
||||
PFM_NOLINENUMBER|PFM_NOWIDOWCONTROL|PFM_DONOTHYPHEN|PFM_SIDEBYSIDE| \
|
||||
PFM_TABLE)
|
||||
/* we take for granted that PFE_xxx is the hiword of the corresponding PFM_xxx */
|
||||
if (dwMask & EFFECTS_MASK) {
|
||||
if (dwMask & EFFECTS_MASK)
|
||||
{
|
||||
para->member.para.pFmt->dwMask |= dwMask & EFFECTS_MASK;
|
||||
para->member.para.pFmt->wEffects &= ~HIWORD(dwMask);
|
||||
para->member.para.pFmt->wEffects |= pFmt->wEffects & HIWORD(dwMask);
|
||||
|
@ -182,7 +179,6 @@ static BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const
|
|||
COPY_FIELD(PFM_BORDER, wBorderSpace);
|
||||
COPY_FIELD(PFM_BORDER, wBorderWidth);
|
||||
COPY_FIELD(PFM_BORDER, wBorders);
|
||||
}
|
||||
|
||||
para->member.para.pFmt->dwMask |= dwMask;
|
||||
#undef COPY_FIELD
|
||||
|
|
Loading…
Reference in New Issue