Module: wine Branch: master Commit: 57446ceed35c67eb9230f91700126f98b28edcf2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=57446ceed35c67eb9230f91700...
Author: Huw Davies huw@codeweavers.com Date: Fri Oct 7 10:49:31 2016 +0100
riched20: Reset the numbering style info after a \pard .
Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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); }