diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-08-15 15:35:25 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-08-15 20:27:20 +0200 |
commit | 950e84e4ca1896923b96eacc5e5aa461a0936e86 (patch) | |
tree | 803f07c1a89f898c7fd14187d40076fe4d43fa5f /sw/source/core/txtnode/fntcache.cxx | |
parent | 76532719505a3d9b495911ce7f86b8cda8412a00 (diff) |
sw: nOffs is always 0 in SwFntObj::DrawText()
Since commit 95cb8d2ce96578e8968d4d74573fa528e226fac9 (Remove
FONT_TEST_DEBUG, COMING_SOON and some more dead code., 2011-01-24).
Change-Id: Iff4ad45f8e1550254ab237ea097b17ec3122766a
Reviewed-on: https://gerrit.libreoffice.org/59109
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/txtnode/fntcache.cxx')
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index a0a38aa94364..4d0f59fcc56d 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -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); |