Dylan Smith : richedit: Fixed 2 minor paragraph format effect errors.
Alexandre Julliard
julliard at winehq.org
Wed Jul 9 06:10:16 CDT 2008
Module: wine
Branch: master
Commit: 12bc51ca2648f72d312daf94ad340290ce701fed
URL: http://source.winehq.org/git/wine.git/?a=commit;h=12bc51ca2648f72d312daf94ad340290ce701fed
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Tue Jul 8 13:39:01 2008 -0400
richedit: Fixed 2 minor paragraph format effect errors.
In ME_SetParaFormat the wEffects that were being set needed to be set
rather than the dwMask.
---
dlls/riched20/para.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
index e2ba258..4da1721 100644
--- a/dlls/riched20/para.c
+++ b/dlls/riched20/para.c
@@ -367,7 +367,8 @@ void ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const PARAFOR
PFM_TABLE)
/* we take for granted that PFE_xxx is the hiword of the corresponding PFM_xxx */
if (pFmt->dwMask & EFFECTS_MASK) {
- para->member.para.pFmt->dwMask &= ~(pFmt->dwMask & EFFECTS_MASK);
+ para->member.para.pFmt->dwMask |= pFmt->dwMask & EFFECTS_MASK;
+ para->member.para.pFmt->wEffects &= ~HIWORD(pFmt->dwMask);
para->member.para.pFmt->wEffects |= pFmt->wEffects & HIWORD(pFmt->dwMask);
}
#undef EFFECTS_MASK
@@ -464,6 +465,7 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt)
ME_GetParaFormat(editor, para, pFmt);
if (para == para_end) return;
+ /* Invalidate values that change across the selected paragraphs. */
do {
ZeroMemory(&tmp, sizeof(tmp));
tmp.cbSize = sizeof(tmp);
@@ -472,8 +474,8 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt)
#define CHECK_FIELD(m, f) \
if (pFmt->f != tmp.f) pFmt->dwMask &= ~(m);
+ pFmt->dwMask &= ~((pFmt->wEffects ^ tmp.wEffects) << 16);
CHECK_FIELD(PFM_NUMBERING, wNumbering);
- /* para->member.para.pFmt->wEffects = pFmt->wEffects; */
assert(tmp.dwMask & PFM_ALIGNMENT);
CHECK_FIELD(PFM_NUMBERING, wNumbering);
assert(tmp.dwMask & PFM_STARTINDENT);
More information about the wine-cvs
mailing list