[PATCH 7/8] riched20: Update the paragraph numbering style if the end-of-paragraph style changes.
Huw Davies
huw at codeweavers.com
Fri Oct 7 04:49:36 CDT 2016
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
dlls/riched20/run.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c
index 984f8f5..496f0f9 100644
--- a/dlls/riched20/run.c
+++ b/dlls/riched20/run.c
@@ -753,12 +753,20 @@ void ME_SetCharFormat(ME_TextEditor *editor, ME_Cursor *start, ME_Cursor *end, C
for (run = start_run; run != end_run; run = ME_FindItemFwd( run, diRun ))
{
ME_Style *new_style = ME_ApplyStyle(editor, run->member.run.style, pFmt);
+ ME_Paragraph *para = run->member.run.para;
add_undo_set_char_fmt( editor, run->member.run.para->nCharOfs + run->member.run.nCharOfs,
run->member.run.len, &run->member.run.style->fmt );
ME_ReleaseStyle(run->member.run.style);
run->member.run.style = new_style;
- run->member.run.para->nFlags |= MEPF_REWRAP;
+
+ /* The para numbering style depends on the eop style */
+ if ((run->member.run.nFlags & MERF_ENDPARA) && para->para_num.style)
+ {
+ ME_ReleaseStyle(para->para_num.style);
+ para->para_num.style = NULL;
+ }
+ para->nFlags |= MEPF_REWRAP;
}
}
--
2.8.2
More information about the wine-patches
mailing list