summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/fntcache.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-21 11:49:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-12-21 20:17:13 +0100
commit535c91ea75d154d1f8c5905ef747dd982e565c67 (patch)
treea1167cc4f3a6ccc6033b6c712af90c00b608af98 /sw/source/core/txtnode/fntcache.cxx
parentc62b8a46470957560b1911651dbade3b0649dee5 (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core/txtnode/fntcache.cxx')
-rw-r--r--sw/source/core/txtnode/fntcache.cxx8
1 files changed, 2 insertions, 6 deletions
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;