Commit f8e73e37 authored by Jactry Zeng's avatar Jactry Zeng Committed by Alexandre Julliard

riched20: Make paragraph in make_para independently.

parent dc6b2853
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment