[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 15 18:27:43 UTC 2018
sw/source/core/txtnode/fntcache.cxx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 950e84e4ca1896923b96eacc5e5aa461a0936e86
Author: Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Wed Aug 15 15:35:25 2018 +0200
Commit: Miklos Vajna <vmiklos at 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 <vmiklos at 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);
More information about the Libreoffice-commits
mailing list