diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-04-21 07:50:54 +0200 |
---|---|---|
committer | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-04-21 11:02:29 +0200 |
commit | de07f40030bbd604bc42d58f0e954cca284a2646 (patch) | |
tree | d16090c7008b533b8af295b68701681012ba7608 /basic/source/uno | |
parent | 3322661414a558d29146c40c0cd5e9db0a7b21dd (diff) |
cppcheck: identicalInnerCondition
renamed temporary list in EnhancedCustomShape2d.cxx to avoid shadow
of a local variable
Change-Id: I17a2261dafd2067480fcc5314af4f48765d6b690
Reviewed-on: https://gerrit.libreoffice.org/53244
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'basic/source/uno')
-rw-r--r-- | basic/source/uno/scriptcont.cxx | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 3f391e81b03f..aba9aabbee01 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -861,26 +861,23 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary { uno::Reference< embed::XStorage > xLibrariesStor; uno::Reference< embed::XStorage > xLibraryStor; - if( bStorage ) - { - try { - xLibrariesStor = mxStorage->openStorageElement( maLibrariesDir, embed::ElementModes::READ ); - if ( !xLibrariesStor.is() ) - { - throw uno::RuntimeException("null returned from openStorageElement"); - } - xLibraryStor = xLibrariesStor->openStorageElement( Name, embed::ElementModes::READ ); - if ( !xLibraryStor.is() ) - { - throw uno::RuntimeException("null returned from openStorageElement"); - } + try { + xLibrariesStor = mxStorage->openStorageElement( maLibrariesDir, embed::ElementModes::READ ); + if ( !xLibrariesStor.is() ) + { + throw uno::RuntimeException("null returned from openStorageElement"); } - catch(const uno::Exception& ) + xLibraryStor = xLibrariesStor->openStorageElement( Name, embed::ElementModes::READ ); + if ( !xLibraryStor.is() ) { - OSL_FAIL( "### couldn't open sub storage for library" ); - return false; + throw uno::RuntimeException("null returned from openStorageElement"); } } + catch(const uno::Exception& ) + { + OSL_FAIL( "### couldn't open sub storage for library" ); + return false; + } for( sal_Int32 i = 0 ; i < nNameCount ; i++ ) { |