diff options
Diffstat (limited to 'sc/source/ui/docshell/macromgr.cxx')
-rw-r--r-- | sc/source/ui/docshell/macromgr.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx index 716a2de7aeca..bbe31344c73b 100644 --- a/sc/source/ui/docshell/macromgr.cxx +++ b/sc/source/ui/docshell/macromgr.cxx @@ -142,15 +142,12 @@ void ScMacroManager::InitUserFuncData() Reference< script::XLibraryContainer > xLibraries( pShell->GetBasicContainer(), uno::UNO_QUERY_THROW ); xModuleContainer.set( xLibraries->getByName( sProjectName ), uno::UNO_QUERY_THROW ); - if ( xModuleContainer.is() ) - { - // remove old listener ( if there was one ) - if ( mxContainerListener.is() ) - xModuleContainer->removeContainerListener( mxContainerListener ); - // Create listener - mxContainerListener = new VBAProjectListener( this ); - xModuleContainer->addContainerListener( mxContainerListener ); - } + // remove old listener ( if there was one ) + if ( mxContainerListener.is() ) + xModuleContainer->removeContainerListener( mxContainerListener ); + // Create listener + mxContainerListener = new VBAProjectListener( this ); + xModuleContainer->addContainerListener( mxContainerListener ); } catch (const uno::Exception&) { |