diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-25 08:43:20 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-06-29 14:48:11 -0700 |
commit | 22a09c25c8f56e3aab3ac1de6009461b4f063862 (patch) | |
tree | 613c8119bf9d4ec54fd3098142961f6ae1722cf5 /basic | |
parent | f206f0d5b0409573f003f141c1c5d519ba7d74c8 (diff) |
fixes for up-casting to Reference<XInterface>
Fix regressions introduced with
6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 "Use the new type-checking
Reference constructor to reduce code noise"
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 533c6cb6bad6ef0432e8eebbfd4daf90ef71f3b4)
Conflicts:
framework/source/uifactory/menubarfactory.cxx
Change-Id: I85662856f21c810a7db497fe3b0e116f075b1687
Reviewed-on: https://gerrit.libreoffice.org/9921
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/basmgr/basicmanagerrepository.cxx | 3 | ||||
-rw-r--r-- | basic/source/uno/dlgcont.cxx | 2 | ||||
-rw-r--r-- | basic/source/uno/namecont.cxx | 10 |
3 files changed, 8 insertions, 7 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 4aece49a21c5..7228b8b4ebfe 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -381,9 +381,10 @@ namespace basic //-------------------------------------------------------------------- BasicManagerPointer& ImplRepository::impl_getLocationForModel( const Reference< XModel >& _rxDocumentModel ) { + Reference< XInterface > xNormalized( _rxDocumentModel, UNO_QUERY ); DBG_ASSERT( _rxDocumentModel.is(), "ImplRepository::impl_getLocationForModel: invalid model!" ); - BasicManagerPointer& location = m_aStore[ _rxDocumentModel ]; + BasicManagerPointer& location = m_aStore[ xNormalized ]; return location; } diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 1190f2d0bc22..c3ee643e7328 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -240,7 +240,7 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e UNO_QUERY ); ::xmlscript::importDialogModel( xInput, xDialogModel, mxContext, mxOwnerDocument ); std::vector< OUString > vEmbeddedImageURLs; - GraphicObject::InspectForGraphicObjectImageURL( xDialogModel, vEmbeddedImageURLs ); + GraphicObject::InspectForGraphicObjectImageURL( Reference<XInterface>(xDialogModel, UNO_QUERY), vEmbeddedImageURLs ); if ( !vEmbeddedImageURLs.empty() ) { // Export the images to the storage diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 28efa643f767..dfdb2c99564f 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -297,7 +297,7 @@ void SAL_CALL NameContainer::addContainerListener( const Reference< XContainerLi throw RuntimeException("addContainerListener called with null xListener", static_cast< cppu::OWeakObject * >(this)); } - maContainerListeners.addInterface( xListener ); + maContainerListeners.addInterface( Reference<XInterface>(xListener, UNO_QUERY) ); } void SAL_CALL NameContainer::removeContainerListener( const Reference< XContainerListener >& xListener ) @@ -307,7 +307,7 @@ void SAL_CALL NameContainer::removeContainerListener( const Reference< XContaine { throw RuntimeException(); } - maContainerListeners.removeInterface( xListener ); + maContainerListeners.removeInterface( Reference<XInterface>(xListener, UNO_QUERY) ); } // Methods XChangesNotifier @@ -318,7 +318,7 @@ void SAL_CALL NameContainer::addChangesListener( const Reference< XChangesListen { throw RuntimeException(); } - maChangesListeners.addInterface( xListener ); + maChangesListeners.addInterface( Reference<XInterface>(xListener, UNO_QUERY) ); } void SAL_CALL NameContainer::removeChangesListener( const Reference< XChangesListener >& xListener ) @@ -328,7 +328,7 @@ void SAL_CALL NameContainer::removeChangesListener( const Reference< XChangesLis { throw RuntimeException(); } - maChangesListeners.removeInterface( xListener ); + maChangesListeners.removeInterface( Reference<XInterface>(xListener, UNO_QUERY) ); } //============================================================================ @@ -2992,7 +2992,7 @@ void SAL_CALL SfxLibraryContainer::broadcastVBAScriptEvent( sal_Int32 nIdentifie leaveMethod(); Reference< XModel > xModel = mxOwnerDocument; // weak-ref -> ref - vba::VBAScriptEvent aEvent( xModel, nIdentifier, rModuleName ); + vba::VBAScriptEvent aEvent( Reference<XInterface>(xModel, UNO_QUERY), nIdentifier, rModuleName ); maVBAScriptListeners.notify( aEvent ); } |