riched20: Pass a ME_Paragraph ptr to shape_para().

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2020-10-08 11:10:49 +01:00 committed by Alexandre Julliard
parent 7ef2c6c8d5
commit 749c80bdaf
1 changed files with 4 additions and 8 deletions

View File

@ -795,21 +795,17 @@ end:
}
static HRESULT shape_para( ME_Context *c, ME_DisplayItem *p )
static HRESULT shape_para( ME_Context *c, ME_Paragraph *para )
{
ME_DisplayItem *di;
ME_Run *run;
HRESULT hr;
for (di = p->next; di != p->member.para.next_para; di = di->next)
for (run = para_first_run( para ); run; run = run_next( run ))
{
if (di->type != diRun) continue;
run = &di->member.run;
hr = shape_run( c, run );
if (FAILED( hr ))
{
run->para->nFlags &= ~MEPF_COMPLEX;
para->nFlags &= ~MEPF_COMPLEX;
return hr;
}
}
@ -835,7 +831,7 @@ static void ME_WrapTextParagraph( ME_TextEditor *editor, ME_Context *c, ME_Parag
ScriptIsComplex( tp->member.para.text->szData, tp->member.para.text->nLen, SIC_COMPLEX ) == S_OK */)
{
if (SUCCEEDED( itemize_para( c, para ) ))
shape_para( c, para_get_di( para ) );
shape_para( c, para );
}
wc.context = c;