Huw Davies : riched20: We don' t need to special case the PARAFORMAT2 fields since the masks have already been correctly sanitised . This fixes setting PFE_RTLPARA.
Alexandre Julliard
julliard at winehq.org
Mon Mar 25 14:19:39 CDT 2013
Module: wine
Branch: master
Commit: 503c6caba647d94035e421f8641fb22dbdd79712
URL: http://source.winehq.org/git/wine.git/?a=commit;h=503c6caba647d94035e421f8641fb22dbdd79712
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Mar 25 11:05:54 2013 +0000
riched20: We don't need to special case the PARAFORMAT2 fields since the masks have already been correctly sanitised. This fixes setting PFE_RTLPARA.
---
dlls/riched20/para.c | 44 ++++++++++++++++++++------------------------
1 files changed, 20 insertions(+), 24 deletions(-)
diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
index ebe7eda..8cf3d24 100644
--- a/dlls/riched20/para.c
+++ b/dlls/riched20/para.c
@@ -154,35 +154,31 @@ 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) {
- para->member.para.pFmt->dwMask |= dwMask & EFFECTS_MASK;
- para->member.para.pFmt->wEffects &= ~HIWORD(dwMask);
- para->member.para.pFmt->wEffects |= pFmt->wEffects & HIWORD(dwMask);
- }
+ /* we take for granted that PFE_xxx is the hiword of the corresponding PFM_xxx */
+ 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);
+ }
#undef EFFECTS_MASK
- COPY_FIELD(PFM_SPACEBEFORE, dySpaceBefore);
- COPY_FIELD(PFM_SPACEAFTER, dySpaceAfter);
- COPY_FIELD(PFM_LINESPACING, dyLineSpacing);
- COPY_FIELD(PFM_STYLE, sStyle);
- COPY_FIELD(PFM_LINESPACING, bLineSpacingRule);
- COPY_FIELD(PFM_SHADING, wShadingWeight);
- COPY_FIELD(PFM_SHADING, wShadingStyle);
- COPY_FIELD(PFM_NUMBERINGSTART, wNumberingStart);
- COPY_FIELD(PFM_NUMBERINGSTYLE, wNumberingStyle);
- COPY_FIELD(PFM_NUMBERINGTAB, wNumberingTab);
- COPY_FIELD(PFM_BORDER, wBorderSpace);
- COPY_FIELD(PFM_BORDER, wBorderWidth);
- COPY_FIELD(PFM_BORDER, wBorders);
- }
+ COPY_FIELD(PFM_SPACEBEFORE, dySpaceBefore);
+ COPY_FIELD(PFM_SPACEAFTER, dySpaceAfter);
+ COPY_FIELD(PFM_LINESPACING, dyLineSpacing);
+ COPY_FIELD(PFM_STYLE, sStyle);
+ COPY_FIELD(PFM_LINESPACING, bLineSpacingRule);
+ COPY_FIELD(PFM_SHADING, wShadingWeight);
+ COPY_FIELD(PFM_SHADING, wShadingStyle);
+ COPY_FIELD(PFM_NUMBERINGSTART, wNumberingStart);
+ COPY_FIELD(PFM_NUMBERINGSTYLE, wNumberingStyle);
+ COPY_FIELD(PFM_NUMBERINGTAB, wNumberingTab);
+ COPY_FIELD(PFM_BORDER, wBorderSpace);
+ COPY_FIELD(PFM_BORDER, wBorderWidth);
+ COPY_FIELD(PFM_BORDER, wBorders);
para->member.para.pFmt->dwMask |= dwMask;
#undef COPY_FIELD
More information about the wine-cvs
mailing list