sw/source/core/txtnode/fntcache.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 535c91ea75d154d1f8c5905ef747dd982e565c67
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Dec 21 11:49:04 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Dec 21 20:17:13 2021 +0100

    move this variable to where its used
    
    Change-Id: Ib0559558ddea395c66149813ad6fb84d3531cab6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127242
    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 f482b66f66bc..6aa92c330b8f 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1665,8 +1665,6 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
         }
         else
         {
-            sal_Unicode nCh;
-
             // In case of Pair Kerning the printer influence on the positioning
             // grows
             const int nMul = m_pPrtFont->GetKerning() != FontKerning::NONE ? 1 
: 3;
@@ -1690,7 +1688,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                 nSpaceSum = nHalfSpace;
             for (sal_Int32 i = 1; i < sal_Int32(nCnt); ++i, nKernSum += 
rInf.GetKern())
             {
-                nCh = rInf.GetText()[sal_Int32(rInf.GetIdx()) + i];
+                sal_Unicode nCh = rInf.GetText()[sal_Int32(rInf.GetIdx()) + i];
 
                 tools::Long nScr = aScrArray[ i ] - aScrArray[ i - 1 ];
 
@@ -2035,15 +2033,13 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
             nCnt = std::min(nCnt, nLn);
             sal_Unicode nChPrev = rInf.GetText()[ sal_Int32(rInf.GetIdx()) ];
 
-            sal_Unicode nCh;
-
             // In case of Pair Kerning the printer influence on the positioning
             // grows
             const int nMul = m_pPrtFont->GetKerning() != FontKerning::NONE ? 1 
: 3;
             const int nDiv = nMul+1;
             for (sal_Int32 i = 1; i < sal_Int32(nCnt); i++)
             {
-                nCh = rInf.GetText()[ sal_Int32(rInf.GetIdx()) + i ];
+                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;

Reply via email to