Kaydet (Commit) 950e84e4 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: nOffs is always 0 in SwFntObj::DrawText()

Since commit 95cb8d2c (Remove
FONT_TEST_DEBUG, COMING_SOON and some more dead code., 2011-01-24).

Change-Id: Iff4ad45f8e1550254ab237ea097b17ec3122766a
Reviewed-on: https://gerrit.libreoffice.org/59109Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
üst 76532719
......@@ -1725,10 +1725,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
}
}
sal_Int32 nOffs = 0;
sal_Int32 nLen = sal_Int32(rInf.GetLen());
if( nOffs < nLen )
if( nLen > 0 )
{
if ( bSwitchL2R )
......@@ -1744,8 +1743,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
sal_Int32 nTmpIdx = bBullet
? (rInf.GetIdx() ? 1 : 0)
: sal_Int32(rInf.GetIdx());
rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, pKernArray.get() + nOffs,
nTmpIdx + nOffs , nLen - nOffs );
rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, pKernArray.get(),
nTmpIdx , nLen );
if (bBullet)
{
rInf.GetOut().Push();
......@@ -1782,8 +1781,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
pKernArray [ i - 1 ] -= nAdd;
}
}
rInf.GetOut().DrawTextArray( aTextOriginPos, aBulletOverlay, pKernArray.get() + nOffs,
nTmpIdx + nOffs , nLen - nOffs );
rInf.GetOut().DrawTextArray( aTextOriginPos, aBulletOverlay, pKernArray.get(),
nTmpIdx , nLen );
pTmpFont->SetColor( aPreviousColor );
pTmpFont->SetUnderline(aPreviousUnderline);
......
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