sw/source/core/txtnode/fntcache.cxx |   18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

New commits:
commit 7cb140082905549808dd438d9276d06f5f234722
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Dec 21 12:00:55 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Dec 21 20:17:55 2021 +0100

    both branches start with the same code
    
    no logic change intended
    
    Change-Id: Ic15315bd44e7e718aacac188500f755e7fd0bec6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127222
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index 7fb66120e7e8..faf31191c7e8 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1716,23 +1716,19 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                 }
 
                 // Apply SpaceSum
-                if ( nCh == CH_BLANK )
+                if (cChPrev == CH_BLANK)
+                {
+                    // no Pixel is lost:
+                    nSpaceSum += nOtherHalf;
+                }
+
+                if (nCh == CH_BLANK)
                 {
-                    if ( cChPrev == CH_BLANK )
-                        nSpaceSum += nOtherHalf;
                     if (i + 1 == sal_Int32(nCnt))
                         nSpaceSum += nSpaceAdd;
                     else
                         nSpaceSum += nHalfSpace;
                 }
-                else
-                {
-                    if ( cChPrev == CH_BLANK )
-                    {
-                        // no Pixel is lost:
-                        nSpaceSum += nOtherHalf;
-                    }
-                }
 
                 cChPrev = nCh;
                 aKernArray[i-1] = nScrPos - nScr + nKernSum + nSpaceSum;

Reply via email to