summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-12-23 16:42:00 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-12-23 16:42:00 +0000
commitc832da45fba1dc44a545a8dbf32b3606d19ce02e (patch)
treeec142b7f663f1d454b7e8b7cb330d4297dc6a099 /cui
parent488f0db24832ce610a780b4a91b629da4aca0116 (diff)
cppcheck: can reduce the scope of these variables
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 96f989916117..31d782d1b80c 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -5939,8 +5939,6 @@ SvxIconChangeDialog::SvxIconChangeDialog(
BitmapEx SvxIconSelectorDialog::AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize)
{
Point aEmptyPoint(0,0);
- sal_Int32 imgNewWidth = 0;
- sal_Int32 imgNewHeight = 0;
double imgposX = 0;
double imgposY = 0;
BitmapEx aRet = aBitmap;
@@ -5950,6 +5948,9 @@ BitmapEx SvxIconSelectorDialog::AutoScaleBitmap(BitmapEx & aBitmap, const long a
Size aScaledSize;
if (imgOldWidth >= aStandardSize || imgOldHeight >= aStandardSize)
{
+ sal_Int32 imgNewWidth = 0;
+ sal_Int32 imgNewHeight = 0;
+
if (imgOldWidth >= imgOldHeight)
{
imgNewWidth = aStandardSize;