diff options
Diffstat (limited to 'basctl/source/basicide/basidesh.cxx')
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 608cc51c1ff3..036127e1c844 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -1006,26 +1006,17 @@ void BasicIDEShell::SetCurLib( const ScriptDocument& rDocument, String aLibName, { if ( !bCheck || ( rDocument != m_aCurDocument || aLibName != m_aCurLibName ) ) { - ContainerListenerImpl* pListener = NULL; - - pListener = dynamic_cast< ContainerListenerImpl* >( m_xLibListener.get() ); + ContainerListenerImpl* pListener = pListener = static_cast< ContainerListenerImpl* >( m_xLibListener.get() ); if ( pListener ) pListener->removeContainerListener( m_aCurDocument, m_aCurLibName ); m_aCurDocument = rDocument; - if ( m_aCurDocument.isInVBAMode() ) - { - if ( !pListener ) - { + pListener->addContainerListener( m_aCurDocument, aLibName ); - pListener = new ContainerListenerImpl( this ); - m_xLibListener = pListener; - } - pListener->addContainerListener( m_aCurDocument, aLibName ); - } m_aCurLibName = aLibName; + if ( bUpdateWindows ) UpdateWindows(); |