summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2014-12-20 21:09:40 +0100
committerJulien Nabet <serval2412@yahoo.fr>2014-12-21 20:18:17 +0100
commit17fc7aa3b8fcd731fb05b5e17e23ee984d166a8f (patch)
tree247985f50367083dbfd1688e66db12c230d04fc1 /scripting
parentbe34823092ce05002be61a50d0dbf156bb5095ba (diff)
fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: I390607e002e93cf7a6babc26d9be084d9f185058
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx2
-rw-r--r--scripting/source/stringresource/stringresource.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 38294297cc75..c6b23ba052e0 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -669,9 +669,9 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
uno::Reference< beans::XPropertySet > xDlgModPropSet( xCtrlMod, uno::UNO_QUERY );
if( xDlgModPropSet.is() )
{
- bool bDecoration = true;
try
{
+ bool bDecoration = true;
Any aDecorationAny = xDlgModPropSet->getPropertyValue( aDecorationPropName );
aDecorationAny >>= bDecoration;
if( !bDecoration )
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index cde4e730a24d..667a9008d2b6 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -543,10 +543,10 @@ void StringResourceImpl::removeLocale( const Locale& locale )
sal_Int32 nLocaleCount = m_aLocaleItemVector.size();
if( nLocaleCount > 1 )
{
- LocaleItem* pFallbackItem = NULL;
if( m_pCurrentLocaleItem == pRemoveItem ||
m_pDefaultLocaleItem == pRemoveItem )
{
+ LocaleItem* pFallbackItem = NULL;
for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it )
{
LocaleItem* pLocaleItem = *it;