Huw Davies : riched20: Update the paragraph numbering style if the end-of-paragraph style changes.
Module: wine Branch: master Commit: 123b0c699ac34559cb6b5b3b54e03f9522107986 URL: http://source.winehq.org/git/wine.git/?a=commit;h=123b0c699ac34559cb6b5b3b54... Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 7 10:49:36 2016 +0100 riched20: Update the paragraph numbering style if the end-of-paragraph style changes. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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; } }
participants (1)
-
Alexandre Julliard