diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-03 09:38:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-03 20:42:00 +0100 |
commit | f9f5c9f0d6af2cb2f39d5bc1513216b8d892977c (patch) | |
tree | 38a38137eb99b1177e5dd85d0e948388307e850d /basic/source/uno | |
parent | ff2068892d88091b26f3a3c034bcca49727d5840 (diff) |
replace comphelper::OListenerContainer with OInterfaceContainerHelper3
OInterfaceContainerHelper3 is in wide use and can do the same thing with
less ceremony
Change-Id: I5252738d6b7bda6245c66da46352944ead79bd52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126271
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/uno')
-rw-r--r-- | basic/source/uno/namecont.cxx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 87b33ea9be66..b92f5a590617 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -338,17 +338,6 @@ void ModifiableHelper::setModified( bool _bModified ) } -VBAScriptListenerContainer::VBAScriptListenerContainer( ::osl::Mutex& rMutex ) : - VBAScriptListenerContainer_BASE( rMutex ) -{ -} - -bool VBAScriptListenerContainer::implTypedNotify( const Reference< vba::XVBAScriptListener >& rxListener, const vba::VBAScriptEvent& rEvent ) -{ - rxListener->notifyVBAScriptEvent( rEvent ); - return true; // notify all other listeners too -} - // Ctor SfxLibraryContainer::SfxLibraryContainer() : SfxLibraryContainer_BASE( m_aMutex ) @@ -2675,7 +2664,7 @@ void SAL_CALL SfxLibraryContainer::disposing() { Reference< XModel > xModel = mxOwnerDocument; EventObject aEvent( xModel ); - maVBAScriptListeners.disposing( aEvent ); + maVBAScriptListeners.disposeAndClear( aEvent ); stopAllComponentListening(); mxOwnerDocument.clear(); } @@ -2850,12 +2839,12 @@ sal_Int32 SAL_CALL SfxLibraryContainer::getRunningVBAScripts() void SAL_CALL SfxLibraryContainer::addVBAScriptListener( const Reference< vba::XVBAScriptListener >& rxListener ) { - maVBAScriptListeners.addTypedListener( rxListener ); + maVBAScriptListeners.addInterface( rxListener ); } void SAL_CALL SfxLibraryContainer::removeVBAScriptListener( const Reference< vba::XVBAScriptListener >& rxListener ) { - maVBAScriptListeners.removeTypedListener( rxListener ); + maVBAScriptListeners.removeInterface( rxListener ); } void SAL_CALL SfxLibraryContainer::broadcastVBAScriptEvent( sal_Int32 nIdentifier, const OUString& rModuleName ) @@ -2875,7 +2864,7 @@ void SAL_CALL SfxLibraryContainer::broadcastVBAScriptEvent( sal_Int32 nIdentifie Reference< XModel > xModel = mxOwnerDocument; // weak-ref -> ref vba::VBAScriptEvent aEvent( Reference<XInterface>(xModel, UNO_QUERY), nIdentifier, rModuleName ); - maVBAScriptListeners.notify( aEvent ); + maVBAScriptListeners.notifyEach( &css::script::vba::XVBAScriptListener::notifyVBAScriptEvent, aEvent ); } // Methods XServiceInfo |