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>
This commit is contained in:
Huw Davies 2016-10-07 10:49:31 +01:00 committed by Alexandre Julliard
parent ab65c269f7
commit 57446ceed3
2 changed files with 14 additions and 2 deletions

View File

@ -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 &&

View File

@ -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);
}