diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-02 11:33:24 +0000 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-08-27 14:12:25 +0200 |
commit | 14b1769bb1de2bcdbf7adade7083fbddd64bc288 (patch) | |
tree | b2938521010ccd8f0c5176d3228f34cf19bb1958 | |
parent | forcepoint #14 check to see if we incremented at all (diff) | |
download | core-14b1769bb1de2bcdbf7adade7083fbddd64bc288.tar.gz core-14b1769bb1de2bcdbf7adade7083fbddd64bc288.zip |
forcepoint #17 nTextBreak is an index into pKernArray of len rInf.GetLen()
Change-Id: I3afeaf987cc5e75362560165fea7230904530933
Reviewed-on: https://gerrit.libreoffice.org/50630
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
-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 5b8ca54a2ca0..117eb6399f37 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -2397,9 +2397,8 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth ) rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray, 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 ); } delete[] pKernArray; |