Kaydet (Commit) 54ac8cf0 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

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>
(cherry picked from commit c21fbf68)
üst 9445d4e6
...@@ -2367,9 +2367,8 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth ) ...@@ -2367,9 +2367,8 @@ sal_Int32 SwFont::GetTextBreak( SwDrawTextInfo& rInf, long nTextWidth )
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray, rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
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 );
} }
delete[] pKernArray; delete[] pKernArray;
......
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