Kaydet (Commit) c21fbf68 authored tarafından Caolán McNamara's avatar Caolán McNamara

forcepoint #17 nTextBreak is an index into pKernArray of len rInf.GetLen()

Change-Id: I3afeaf987cc5e75362560165fea7230904530933
Reviewed-on: https://gerrit.libreoffice.org/50630Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 88b1ca64
...@@ -2352,9 +2352,8 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth ) ...@@ -2352,9 +2352,8 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth )
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray.get(), rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray.get(),
rInf.GetIdx(), rInf.GetLen() ); rInf.GetIdx(), rInf.GetLen() );
long nCurrPos = pKernArray[nTextBreak] + nGridWidthAdd; long nCurrPos = pKernArray[nTextBreak] + nGridWidthAdd;
while( nTextBreak < rInf.GetLen() && nTextWidth >= nCurrPos) while (++nTextBreak < rInf.GetLen() && nTextWidth >= nCurrPos)
{ {
nTextBreak++;
nCurrPos = pKernArray[nTextBreak] + nGridWidthAdd * ( nTextBreak + 1 ); nCurrPos = pKernArray[nTextBreak] + nGridWidthAdd * ( nTextBreak + 1 );
} }
return nTextBreak + rInf.GetIdx(); return nTextBreak + rInf.GetIdx();
......
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