Commit 2bc67cfc authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

riched20: Use a paragraph ptr in the stream in function.

parent 28735278
......@@ -1607,29 +1607,27 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
ME_InternalDeleteText(editor, selStart, to - from, FALSE);
/* Don't insert text at the end of the table row */
if (!editor->bEmulateVersion10) { /* v4.1 */
ME_DisplayItem *para = editor->pCursors->pPara;
if (para->member.para.nFlags & MEPF_ROWEND)
{
para = para->member.para.next_para;
editor->pCursors[0].pPara = para;
editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun);
editor->pCursors[0].nOffset = 0;
}
if (para->member.para.nFlags & MEPF_ROWSTART)
if (!editor->bEmulateVersion10) /* v4.1 */
{
ME_Paragraph *para = &editor->pCursors->pPara->member.para;
if (para->nFlags & (MEPF_ROWSTART | MEPF_ROWEND))
{
para = para->member.para.next_para;
editor->pCursors[0].pPara = para;
editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun);
para = para_next( para );
editor->pCursors[0].pPara = para_get_di( para );
editor->pCursors[0].pRun = run_get_di( para_first_run( para ) );
editor->pCursors[0].nOffset = 0;
}
editor->pCursors[1] = editor->pCursors[0];
} else { /* v1.0 - 3.0 */
}
else /* v1.0 - 3.0 */
{
if (editor->pCursors[0].pRun->member.run.nFlags & MERF_ENDPARA &&
ME_IsInTable(editor->pCursors[0].pRun))
para_in_table( &editor->pCursors[0].pPara->member.para ))
return 0;
}
} else {
}
else
{
style = editor->pBuffer->pDefaultStyle;
ME_AddRefStyle(style);
set_selection_cursors(editor, 0, 0);
......
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