summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-25 08:43:20 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-25 17:10:43 +0200
commit533c6cb6bad6ef0432e8eebbfd4daf90ef71f3b4 (patch)
tree0575fd7acded0e19664352f44633cff93c3ab6b6 /basic
parent96ff10449464ae9d869fe21dccf193a6eef670c1 (diff)
fixes for up-casting to Reference<XInterface>
Fix regressions introduced with 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 "Use the new type-checking Reference constructor to reduce code noise" Change-Id: I85662856f21c810a7db497fe3b0e116f075b1687 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx3
-rw-r--r--basic/source/uno/dlgcont.cxx2
-rw-r--r--basic/source/uno/namecont.cxx10
3 files changed, 8 insertions, 7 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index f062de05fba8..45cb4682eb48 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 bc4223a0e2b9..b9d128b91355 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -241,7 +241,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 49be779952c0..71af61e43a24 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -298,7 +298,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 )
@@ -308,7 +308,7 @@ void SAL_CALL NameContainer::removeContainerListener( const Reference< XContaine
{
throw RuntimeException();
}
- maContainerListeners.removeInterface( xListener );
+ maContainerListeners.removeInterface( Reference<XInterface>(xListener, UNO_QUERY) );
}
// Methods XChangesNotifier
@@ -319,7 +319,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 )
@@ -329,7 +329,7 @@ void SAL_CALL NameContainer::removeChangesListener( const Reference< XChangesLis
{
throw RuntimeException();
}
- maChangesListeners.removeInterface( xListener );
+ maChangesListeners.removeInterface( Reference<XInterface>(xListener, UNO_QUERY) );
}
@@ -2988,7 +2988,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 );
}