riched20: Make paragraph in make_para independently.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dc6b2853f5
commit
f8e73e370d
|
@ -179,13 +179,6 @@ ME_DisplayItem *ME_MakeDI(ME_DIType type)
|
||||||
ZeroMemory(item, sizeof(ME_DisplayItem));
|
ZeroMemory(item, sizeof(ME_DisplayItem));
|
||||||
item->type = type;
|
item->type = type;
|
||||||
item->prev = item->next = NULL;
|
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;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,16 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(richedit);
|
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)
|
void ME_MakeFirstParagraph(ME_TextEditor *editor)
|
||||||
{
|
{
|
||||||
ME_Context c;
|
ME_Context c;
|
||||||
|
@ -30,7 +40,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
|
||||||
LOGFONTW lf;
|
LOGFONTW lf;
|
||||||
HFONT hf;
|
HFONT hf;
|
||||||
ME_TextBuffer *text = editor->pBuffer;
|
ME_TextBuffer *text = editor->pBuffer;
|
||||||
ME_DisplayItem *para = ME_MakeDI(diParagraph);
|
ME_DisplayItem *para = make_para(editor);
|
||||||
ME_DisplayItem *run;
|
ME_DisplayItem *run;
|
||||||
ME_Style *style;
|
ME_Style *style;
|
||||||
int eol_len;
|
int eol_len;
|
||||||
|
@ -196,7 +206,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run,
|
||||||
{
|
{
|
||||||
ME_DisplayItem *next_para = NULL;
|
ME_DisplayItem *next_para = NULL;
|
||||||
ME_DisplayItem *run_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;
|
ME_DisplayItem *end_run;
|
||||||
int ofs, i;
|
int ofs, i;
|
||||||
ME_DisplayItem *pp;
|
ME_DisplayItem *pp;
|
||||||
|
|
Loading…
Reference in New Issue