sw/source/core/txtnode/fntcache.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit 950e84e4ca1896923b96eacc5e5aa461a0936e86 Author: Miklos Vajna <vmik...@collabora.co.uk> AuthorDate: Wed Aug 15 15:35:25 2018 +0200 Commit: Miklos Vajna <vmik...@collabora.co.uk> CommitDate: Wed Aug 15 20:27:20 2018 +0200 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 <vmik...@collabora.co.uk> Tested-by: Jenkins 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits