diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-10-20 09:30:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-10-20 12:59:23 +0100 |
commit | 0e597092077708d0866c7df11c1a131ae07d8df3 (patch) | |
tree | 6ad301238949b7b063926cf158420ecf1e56ae66 /sfx2 | |
parent | 05e7937b33bff9abe92e562d800f91fb83e6a352 (diff) |
WaE, shadowed variable
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docmacromode.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index fc591116ba..c57b048816 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -356,11 +356,12 @@ namespace sfx2 { ::rtl::OUString aStdLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) ); Sequence< ::rtl::OUString > aElements = xContainer->getElementNames(); - if ( aElements.getLength() ) + sal_Int32 nElementCount = aElements.getLength(); + if ( nElementCount ) { // old check, if more than 1 library or the first library isn't the expected 'Standard' // trigger the security 'nag' dialog - if ( !bIsVBAMode && ( aElements.getLength() > 1 || !aElements[0].equals( aStdLibName ) ) ) + if ( !bIsVBAMode && ( nElementCount > 1 || !aElements[0].equals( aStdLibName ) ) ) bHasMacroLib = sal_True; else { @@ -368,10 +369,8 @@ namespace sfx2 Reference< XLibraryQueryExecutable > xLib( xContainer, UNO_QUERY ); if ( xLib.is() ) { - Sequence< ::rtl::OUString > aElements = xContainer->getElementNames(); - sal_Int32 nElementCount = aElements.getLength(); const ::rtl::OUString* pElementName = aElements.getConstArray(); - for ( sal_Int32 index = 0; index < nElementCount; index++ ) + for ( sal_Int32 index = 0; index < nElementCount; ++index ) { bHasMacroLib = xLib->HasExecutableCode( pElementName[index] ); if ( bHasMacroLib ) @@ -390,7 +389,7 @@ namespace sfx2 Sequence< ::rtl::OUString > aElements = xDlgContainer->getElementNames(); sal_Int32 nElementCount = aElements.getLength(); const ::rtl::OUString* pElementName = aElements.getConstArray(); - for ( sal_Int32 index = 0; index < nElementCount; index++ ) + for ( sal_Int32 index = 0; index < nElementCount; ++index ) { Reference< XNameAccess > xNameAccess; xDlgContainer->getByName( pElementName[index] ) >>= xNameAccess; |