summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-02 13:38:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-04 14:06:14 +0200
commit27f1827afa11ba9c5d912614dc84dd308ecf8b5f (patch)
tree1c1970f9f2d2eacc2c57ccd0fb1b7e8687652241 /toolkit
parent2a338d521618333a0630a31b46fd0fc9decbe0e5 (diff)
loplugin:reducevarscope in toolkit..unotools
Change-Id: I439b9f456ac0bfaa3eb9bf17472053bd4787e828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxmenu.cxx2
-rw-r--r--toolkit/source/controls/formattedcontrol.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 93d154a92ed2..c6ebef12d18b 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -552,7 +552,7 @@ namespace
const ::Size aCurSize = aImage.GetSizePixel();
const sal_Int32 nCurWidth = aCurSize.Width();
const sal_Int32 nCurHeight = aCurSize.Height();
- const sal_Int32 nIdeal( 16 );
+ constexpr sal_Int32 nIdeal( 16 );
if ( nCurWidth > 0 && nCurHeight > 0 )
{
diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx
index b438833557ad..d2acd9c2e17d 100644
--- a/toolkit/source/controls/formattedcontrol.cxx
+++ b/toolkit/source/controls/formattedcontrol.cxx
@@ -324,7 +324,6 @@ namespace toolkit
if ( BASEPROPERTY_EFFECTIVE_DEFAULT == nPropId && rValue.hasValue() )
{
double dVal = 0;
- OUString sVal;
bool bStreamed = (rValue >>= dVal);
if ( bStreamed )
{
@@ -340,6 +339,7 @@ namespace toolkit
}
else
{
+ OUString sVal;
bStreamed = (rValue >>= sVal);
if ( bStreamed )
{