summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/output2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-25 18:40:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-26 10:57:03 +0200
commitac2d415a52f22caf0012b7d9b17d015aca27db9d (patch)
tree5c2f153ea470ff77dd00109d3006547869e9b332 /sc/source/ui/view/output2.cxx
parent47f0e83989c4c03d9690229b6433a5541032a3eb (diff)
loplugin:oncevar in sc
Change-Id: Ice59e286debb6bd0eb692f2b2b0c2c5087c069c0 Reviewed-on: https://gerrit.libreoffice.org/39239 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view/output2.cxx')
-rw-r--r--sc/source/ui/view/output2.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 88f70a8e7249..ab70337c5790 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -717,10 +717,9 @@ long ScDrawStringsVars::GetMaxDigitWidth()
if (nMaxDigitWidth > 0)
return nMaxDigitWidth;
- sal_Char cZero = '0';
for (sal_Char i = 0; i < 10; ++i)
{
- sal_Char cDigit = cZero + i;
+ sal_Char cDigit = '0' + i;
long n = pOutput->pFmtDevice->GetTextWidth(OUString(cDigit));
nMaxDigitWidth = ::std::max(nMaxDigitWidth, n);
}
@@ -1878,8 +1877,7 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
// check horizontal space
- bool bNeedEditEngine = false;
- if ( !bNeedEditEngine && !bOutside )
+ if ( !bOutside )
{
bool bRightAdjusted = false; // to correct text width calculation later
switch (eOutHorJust)