diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 599452c0b5a3..842c91002989 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -2347,9 +2347,8 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo const & rInf, long nTextWidth ) rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray.get(), rInf.GetIdx(), rInf.GetLen() ); long nCurrPos = pKernArray[nTextBreak] + nGridWidthAdd; - while( nTextBreak < rInf.GetLen() && nTextWidth >= nCurrPos) + while (++nTextBreak < rInf.GetLen() && nTextWidth >= nCurrPos) { - nTextBreak++; nCurrPos = pKernArray[nTextBreak] + nGridWidthAdd * ( nTextBreak + 1 ); } return nTextBreak + rInf.GetIdx(); |