Jactry Zeng : riched20: Make paragraph in make_para independently.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Nov 6 09:06:33 CST 2015
Module: wine
Branch: master
Commit: f8e73e370d3389cf18de3b48d53c0229bf482a28
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f8e73e370d3389cf18de3b48d53c0229bf482a28
Author: Jactry Zeng <jzeng at codeweavers.com>
Date: Fri Nov 6 17:34:37 2015 +0800
riched20: Make paragraph in make_para independently.
Signed-off-by: Jactry Zeng <jzeng at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/riched20/list.c | 7 -------
dlls/riched20/para.c | 14 ++++++++++++--
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/dlls/riched20/list.c b/dlls/riched20/list.c
index 10732e5..c57e526 100644
--- a/dlls/riched20/list.c
+++ b/dlls/riched20/list.c
@@ -179,13 +179,6 @@ ME_DisplayItem *ME_MakeDI(ME_DIType type)
ZeroMemory(item, sizeof(ME_DisplayItem));
item->type = type;
item->prev = item->next = NULL;
- if (type == diParagraph)
- {
- item->member.para.pFmt = ALLOC_OBJ(PARAFORMAT2);
- ME_SetDefaultParaFormat(item->member.para.pFmt);
- item->member.para.nFlags = MEPF_REWRAP;
- }
-
return item;
}
diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
index 8cf3d24..c068d84 100644
--- a/dlls/riched20/para.c
+++ b/dlls/riched20/para.c
@@ -23,6 +23,16 @@
WINE_DEFAULT_DEBUG_CHANNEL(richedit);
+static ME_DisplayItem *make_para(ME_TextEditor *editor)
+{
+ ME_DisplayItem *item = ME_MakeDI(diParagraph);
+
+ item->member.para.pFmt = ALLOC_OBJ(PARAFORMAT2);
+ ME_SetDefaultParaFormat(item->member.para.pFmt);
+ item->member.para.nFlags = MEPF_REWRAP;
+ return item;
+}
+
void ME_MakeFirstParagraph(ME_TextEditor *editor)
{
ME_Context c;
@@ -30,7 +40,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
LOGFONTW lf;
HFONT hf;
ME_TextBuffer *text = editor->pBuffer;
- ME_DisplayItem *para = ME_MakeDI(diParagraph);
+ ME_DisplayItem *para = make_para(editor);
ME_DisplayItem *run;
ME_Style *style;
int eol_len;
@@ -196,7 +206,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run,
{
ME_DisplayItem *next_para = NULL;
ME_DisplayItem *run_para = NULL;
- ME_DisplayItem *new_para = ME_MakeDI(diParagraph);
+ ME_DisplayItem *new_para = make_para(editor);
ME_DisplayItem *end_run;
int ofs, i;
ME_DisplayItem *pp;
More information about the wine-cvs
mailing list