summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/fntcache.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-21 12:03:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-12-21 20:18:22 +0100
commite240ce9a491e2f99d4a00e61a86a1fa46f44d75d (patch)
tree494a3bf95312158fdcd0abf971bb75d86ecd3f8d /sw/source/core/txtnode/fntcache.cxx
parent7cb140082905549808dd438d9276d06f5f234722 (diff)
format these two related blocks the same
no logic change intended Change-Id: I0bb7f2c5f8ec1c2ff7c8af14f5a62f77411660d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127244 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core/txtnode/fntcache.cxx')
-rw-r--r--sw/source/core/txtnode/fntcache.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index faf31191c7e8..e055d8ce3d39 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1689,7 +1689,6 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
for (sal_Int32 i = 1; i < sal_Int32(nCnt); ++i, nKernSum += rInf.GetKern())
{
sal_Unicode nCh = rInf.GetText()[sal_Int32(rInf.GetIdx()) + i];
-
tools::Long nScr = aScrArray[ i ] - aScrArray[ i - 1 ];
// If there is an (ex-)Space before us, position optimally,
@@ -1697,16 +1696,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// if we _are_ an ex-Space, position us left-aligned to the
// printer position.
if ( nCh == CH_BLANK )
- {
nScrPos = aKernArray[i-1] + nScr;
- }
else
{
- if ( cChPrev == CH_BLANK )
- {
- nScrPos = aKernArray[i-1] + nScr;
- }
- else if ( cChPrev == '-' )
+ if (cChPrev == CH_BLANK || cChPrev == '-')
nScrPos = aKernArray[i-1] + nScr;
else
{
@@ -2049,11 +2042,11 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
sal_Unicode nCh = rInf.GetText()[ sal_Int32(rInf.GetIdx()) + i ];
tools::Long nScr = aScrArray[ i ] - aScrArray[ i - 1 ];
if ( nCh == CH_BLANK )
- nScrPos = aKernArray[i-1]+nScr;
+ nScrPos = aKernArray[i-1] + nScr;
else
{
if ( nChPrev == CH_BLANK || nChPrev == '-' )
- nScrPos = aKernArray[i-1]+nScr;
+ nScrPos = aKernArray[i-1] + nScr;
else
{
nScrPos += nScr;