Kaydet (Commit) 7ea77288 authored tarafından Matteo Casalin's avatar Matteo Casalin

Use arithmetic instead of while loop

Change-Id: I35738f09ec562815f74643a547505efb6d9a0bfe
üst bbf64c78
...@@ -1699,10 +1699,8 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine ) ...@@ -1699,10 +1699,8 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
const bool bRubyTop = ! pGrid->GetRubyTextBelow(); const bool bRubyTop = ! pGrid->GetRubyTextBelow();
nLineHeight = nGridWidth + nRubyHeight; nLineHeight = nGridWidth + nRubyHeight;
const sal_uInt16 nLineDist = nLineHeight; const sal_uInt16 nAmpRatio = (pCurr->Height() + nLineHeight - 1)/nLineHeight;
nLineHeight *= nAmpRatio;
while ( pCurr->Height() > nLineHeight )
nLineHeight = nLineHeight + nLineDist;
const sal_uInt16 nAsc = pCurr->GetAscent() + const sal_uInt16 nAsc = pCurr->GetAscent() +
( bRubyTop ? ( bRubyTop ?
......
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