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.
This commit is contained in:
parent
8172d69e8f
commit
12bc51ca26
|
@ -367,7 +367,8 @@ void ME_SetParaFormat(ME_TextEditor *editor, ME_DisplayItem *para, const PARAFOR
|
||||||
PFM_TABLE)
|
PFM_TABLE)
|
||||||
/* we take for granted that PFE_xxx is the hiword of the corresponding PFM_xxx */
|
/* we take for granted that PFE_xxx is the hiword of the corresponding PFM_xxx */
|
||||||
if (pFmt->dwMask & EFFECTS_MASK) {
|
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);
|
para->member.para.pFmt->wEffects |= pFmt->wEffects & HIWORD(pFmt->dwMask);
|
||||||
}
|
}
|
||||||
#undef EFFECTS_MASK
|
#undef EFFECTS_MASK
|
||||||
|
@ -464,6 +465,7 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt)
|
||||||
ME_GetParaFormat(editor, para, pFmt);
|
ME_GetParaFormat(editor, para, pFmt);
|
||||||
if (para == para_end) return;
|
if (para == para_end) return;
|
||||||
|
|
||||||
|
/* Invalidate values that change across the selected paragraphs. */
|
||||||
do {
|
do {
|
||||||
ZeroMemory(&tmp, sizeof(tmp));
|
ZeroMemory(&tmp, sizeof(tmp));
|
||||||
tmp.cbSize = sizeof(tmp);
|
tmp.cbSize = sizeof(tmp);
|
||||||
|
@ -472,8 +474,8 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt)
|
||||||
#define CHECK_FIELD(m, f) \
|
#define CHECK_FIELD(m, f) \
|
||||||
if (pFmt->f != tmp.f) pFmt->dwMask &= ~(m);
|
if (pFmt->f != tmp.f) pFmt->dwMask &= ~(m);
|
||||||
|
|
||||||
|
pFmt->dwMask &= ~((pFmt->wEffects ^ tmp.wEffects) << 16);
|
||||||
CHECK_FIELD(PFM_NUMBERING, wNumbering);
|
CHECK_FIELD(PFM_NUMBERING, wNumbering);
|
||||||
/* para->member.para.pFmt->wEffects = pFmt->wEffects; */
|
|
||||||
assert(tmp.dwMask & PFM_ALIGNMENT);
|
assert(tmp.dwMask & PFM_ALIGNMENT);
|
||||||
CHECK_FIELD(PFM_NUMBERING, wNumbering);
|
CHECK_FIELD(PFM_NUMBERING, wNumbering);
|
||||||
assert(tmp.dwMask & PFM_STARTINDENT);
|
assert(tmp.dwMask & PFM_STARTINDENT);
|
||||||
|
|
Loading…
Reference in New Issue