[PATCH 2/8] riched20: Reset the numbering style info after a \pard .
Huw Davies
huw at codeweavers.com
Fri Oct 7 04:49:31 CDT 2016
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
dlls/riched20/editor.c | 10 ++++++++--
dlls/riched20/tests/editor.c | 6 ++++++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index e2a44d3..da9425e 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -553,8 +553,9 @@ void ME_RTFParAttrHook(RTF_Info *info)
info->borderType = RTFBorderParaTop;
info->fmt.dwMask = PFM_ALIGNMENT | PFM_BORDER | PFM_LINESPACING | PFM_TABSTOPS |
PFM_OFFSET | PFM_RIGHTINDENT | PFM_SPACEAFTER | PFM_SPACEBEFORE |
- PFM_STARTINDENT | PFM_RTLPARA;
- /* TODO: numbering, shading */
+ PFM_STARTINDENT | PFM_RTLPARA | PFM_NUMBERING | PFM_NUMBERINGSTART |
+ PFM_NUMBERINGSTYLE | PFM_NUMBERINGTAB;
+ /* TODO: shading */
info->fmt.wAlignment = PFA_LEFT;
info->fmt.cTabCount = 0;
info->fmt.dxOffset = info->fmt.dxStartIndent = info->fmt.dxRightIndent = 0;
@@ -564,6 +565,11 @@ void ME_RTFParAttrHook(RTF_Info *info)
info->fmt.dySpaceBefore = info->fmt.dySpaceAfter = 0;
info->fmt.dyLineSpacing = 0;
info->fmt.wEffects &= ~PFE_RTLPARA;
+ info->fmt.wNumbering = 0;
+ info->fmt.wNumberingStart = 0;
+ info->fmt.wNumberingStyle = 0;
+ info->fmt.wNumberingTab = 0;
+
if (!info->editor->bEmulateVersion10) /* v4.1 */
{
if (info->tableDef && info->tableDef->tableRowStart &&
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 351695a..ad51e64 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -1307,6 +1307,12 @@ static void test_SETPARAFORMAT(void)
ok(ret == expectedMask, "expected %x got %x\n", expectedMask, ret);
ok(fmt.dwMask == expectedMask, "expected %x got %x\n", expectedMask, fmt.dwMask);
+ /* Test some other paraformat field defaults */
+ ok( fmt.wNumbering == 0, "got %d\n", fmt.wNumbering );
+ ok( fmt.wNumberingStart == 0, "got %d\n", fmt.wNumberingStart );
+ ok( fmt.wNumberingStyle == 0, "got %04x\n", fmt.wNumberingStyle );
+ ok( fmt.wNumberingTab == 0, "got %d\n", fmt.wNumberingTab );
+
DestroyWindow(hwndRichEdit);
}
--
2.8.2
More information about the wine-patches
mailing list