summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-08-07 10:47:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-07 17:17:25 +0200
commit773a7b57fa99bdda9cde59937cd1987384ae533a (patch)
tree9909d560e9c14ccd9963ee4eb58a74f4f3ea6288 /framework
parente20d997eb3eb5c81af907718989aba4a6f9fc950 (diff)
no need to use UNO_QUERY here
Change-Id: I1bfe8238d7c08f27d2b21f9fe79712aba045c812 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120152 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/autorecovery.cxx3
-rw-r--r--framework/source/services/desktop.cxx15
2 files changed, 6 insertions, 12 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 495d22cee201..0c79cd4c97e9 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -3502,8 +3502,7 @@ void AutoRecovery::implts_informListener( Job eJob ,
{
try
{
- css::uno::Reference< css::frame::XStatusListener > xListener(static_cast<css::frame::XStatusListener*>(pIt.next()), css::uno::UNO_QUERY);
- xListener->statusChanged(aEvent);
+ static_cast<css::frame::XStatusListener*>(pIt.next())->statusChanged(aEvent);
}
catch(const css::uno::RuntimeException&)
{
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index a9cb105ad8e4..0315ab1bae70 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -1621,19 +1621,17 @@ void Desktop::impl_sendTerminateToClipboard()
{
try
{
- css::uno::Reference< css::lang::XServiceInfo > xInfo( aIterator.next(), css::uno::UNO_QUERY );
+ css::frame::XTerminateListener* pTerminateListener =
+ static_cast< css::frame::XTerminateListener* >(aIterator.next());
+ css::uno::Reference< css::lang::XServiceInfo > xInfo( pTerminateListener, css::uno::UNO_QUERY );
if ( !xInfo.is() )
continue;
if ( xInfo->getImplementationName() != "com.sun.star.comp.svt.TransferableHelperTerminateListener" )
continue;
- css::uno::Reference< css::frame::XTerminateListener > xListener(xInfo, css::uno::UNO_QUERY);
- if ( ! xListener.is() )
- continue;
-
css::lang::EventObject aEvent( static_cast< ::cppu::OWeakObject* >(this) );
- xListener->notifyTermination( aEvent );
+ pTerminateListener->notifyTermination( aEvent );
// don't notify twice
aIterator.remove();
@@ -1663,10 +1661,7 @@ void Desktop::impl_sendNotifyTerminationEvent()
{
try
{
- css::uno::Reference< css::frame::XTerminateListener > xListener(aIterator.next(), css::uno::UNO_QUERY);
- if ( ! xListener.is() )
- continue;
- xListener->notifyTermination( aEvent );
+ static_cast< css::frame::XTerminateListener* >(aIterator.next())->notifyTermination( aEvent );
}
catch( const css::uno::Exception& )
{