Commit eb6b188a authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

riched20: Pass paragraph ptrs to the para marking function.

parent c8fef268
......@@ -4126,7 +4126,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
ME_SetDefaultCharFormat(editor, &fmt);
ME_CommitUndo(editor);
ME_MarkAllForWrapping(editor);
editor_mark_rewrap_all( editor );
ME_WrapMarkedParagraphs(editor);
ME_UpdateScrollBar(editor);
if (bRepaint)
......@@ -4771,7 +4771,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
ME_SetDefaultFormatRect(editor);
editor->bDefaultFormatRect = TRUE;
}
ME_MarkAllForWrapping(editor);
editor_mark_rewrap_all( editor );
ME_WrapMarkedParagraphs(editor);
ME_UpdateScrollBar(editor);
if (msg != EM_SETRECTNP)
......
......@@ -204,13 +204,13 @@ void ME_SendRequestResize(ME_TextEditor *editor, BOOL force) DECLSPEC_HIDDEN;
/* para.c */
void editor_get_selection_paras(ME_TextEditor *editor, ME_Paragraph **para, ME_Paragraph **para_end ) DECLSPEC_HIDDEN;
void editor_get_selection_para_fmt( ME_TextEditor *editor, PARAFORMAT2 *fmt ) DECLSPEC_HIDDEN;
void editor_mark_rewrap_all( ME_TextEditor *editor ) DECLSPEC_HIDDEN;
void editor_set_default_para_fmt(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN;
BOOL editor_set_selection_para_fmt( ME_TextEditor *editor, const PARAFORMAT2 *fmt ) DECLSPEC_HIDDEN;
ME_DisplayItem *ME_GetParagraph(ME_DisplayItem *run) DECLSPEC_HIDDEN;
void ME_MakeFirstParagraph(ME_TextEditor *editor) DECLSPEC_HIDDEN;
void ME_DumpParaStyle(ME_Paragraph *s) DECLSPEC_HIDDEN;
void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048]) DECLSPEC_HIDDEN;
void ME_MarkAllForWrapping(ME_TextEditor *editor) DECLSPEC_HIDDEN;
int get_total_width(ME_TextEditor *editor) DECLSPEC_HIDDEN;
ME_Cell *para_cell( ME_Paragraph *para ) DECLSPEC_HIDDEN;
void para_destroy( ME_TextEditor *editor, ME_Paragraph *item ) DECLSPEC_HIDDEN;
......
......@@ -138,7 +138,7 @@ ME_RewrapRepaint(ME_TextEditor *editor)
/* RewrapRepaint should be called whenever the control has changed in
* looks, but not content. Like resizing. */
ME_MarkAllForWrapping(editor);
editor_mark_rewrap_all( editor );
ME_WrapMarkedParagraphs(editor);
ME_UpdateScrollBar(editor);
ME_Repaint(editor);
......
......@@ -225,18 +225,18 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
ME_DestroyContext(&c);
}
static void ME_MarkForWrapping(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last)
static void para_mark_rewrap_paras( ME_TextEditor *editor, ME_Paragraph *first, const ME_Paragraph *end )
{
while(first != last)
{
para_mark_rewrap( editor, &first->member.para );
first = first->member.para.next_para;
}
while (first != end)
{
para_mark_rewrap( editor, first );
first = para_next( first );
}
}
void ME_MarkAllForWrapping(ME_TextEditor *editor)
void editor_mark_rewrap_all( ME_TextEditor *editor )
{
ME_MarkForWrapping(editor, editor->pBuffer->pFirst->member.para.next_para, editor->pBuffer->pLast);
para_mark_rewrap_paras( editor, editor_first_para( editor ), editor_end_para( editor ) );
}
static void table_update_flags( ME_Paragraph *para )
......
......@@ -536,5 +536,5 @@ void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod)
}
ScriptFreeCache( &def->script_cache );
ME_ReleaseStyle( style );
ME_MarkAllForWrapping( editor );
editor_mark_rewrap_all( editor );
}
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