Commit c0ee555e authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Avoid redundant calls to ME_CalcRunExtent.

ME_SplitRun is only called by wrapping code. In all but one call the returned second half of the split run will be returned, get passed back to ME_WrapHandleRun, then ME_CalcRunExtent will be called at the start of ME_WrapHandleRun through ME_WrapSizeRun.
parent 8b8e4f89
......@@ -273,7 +273,6 @@ ME_DisplayItem *ME_SplitRun(ME_WrapContext *wc, ME_DisplayItem *item, int nVChar
run2 = &cursor.pRun->member.run;
ME_CalcRunExtent(wc->context, para, wc->nRow ? wc->nLeftMargin : wc->nFirstMargin, run);
ME_CalcRunExtent(wc->context, para, wc->nRow ? wc->nLeftMargin : wc->nFirstMargin, run2);
run2->pt.x = run->pt.x+run->nWidth;
run2->pt.y = run->pt.y;
......
......@@ -361,6 +361,9 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
if (black) {
wc->bOverflown = FALSE;
pp = ME_SplitRun(wc, p, black);
ME_CalcRunExtent(wc->context, &wc->pPara->member.para,
wc->nRow ? wc->nLeftMargin : wc->nFirstMargin,
&pp->member.run);
ME_InsertRowStart(wc, pp);
return 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