summaryrefslogtreecommitdiff
path: root/scripting
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 /scripting
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 'scripting')
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx4
-rw-r--r--scripting/source/stringresource/stringresource.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 8e447d5230c4..6367e2cbfd9c 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -539,11 +539,11 @@ static OUString aResourceResolverPropName("ResourceResolver");
Reference< XInterface >* pObjects = aObjects.getArray();
for ( sal_Int32 i = 0; i < nControlCount; ++i )
{
- pObjects[i] = pControls[i];
+ pObjects[i] = Reference<XInterface>( pControls[i], UNO_QUERY );
}
// also add the dialog control itself to the sequence
- pObjects[nControlCount] = rxControl;
+ pObjects[nControlCount] = Reference<XInterface>( rxControl, UNO_QUERY );
Reference< XScriptEventsAttacher > xScriptEventsAttacher = new DialogEventsAttacherImpl
( m_xContext, m_xModel, rxControl, rxHandler, rxIntrospectionAccess,
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index c0b2e71b6d0f..3bf5a434b1ee 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -158,7 +158,7 @@ void StringResourceImpl::addModifyListener( const Reference< XModifyListener >&
throw RuntimeException();
::osl::MutexGuard aGuard( getMutex() );
- m_aListenerContainer.addInterface( aListener );
+ m_aListenerContainer.addInterface( Reference<XInterface>( aListener, UNO_QUERY ) );
}
void StringResourceImpl::removeModifyListener( const Reference< XModifyListener >& aListener )
@@ -168,7 +168,7 @@ void StringResourceImpl::removeModifyListener( const Reference< XModifyListener
throw RuntimeException();
::osl::MutexGuard aGuard( getMutex() );
- m_aListenerContainer.removeInterface( aListener );
+ m_aListenerContainer.removeInterface( Reference<XInterface>( aListener, UNO_QUERY ) );
}