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 | f2bf12c7d70920c6d02881da36617b07d2a17441 (patch) | |
tree | 8ce2823c4199ae2973d1dd6c91955d8bd6c1b05e /sfx2/source | |
parent | 42919dbce70edd9b290800007b9e7e9660c1aa98 (diff) |
WaE, shadowed variable
Diffstat (limited to 'sfx2/source')
-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 fc591116bafe..c57b048816ed 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; |