summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-23 10:15:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-23 15:25:26 +0200
commit8a54339fc83fe9abaaace6f9f374697e6923d684 (patch)
tree516e82bb9eca2d586aa7acebbe369f67ff707a7f /avmedia
parentd34f1df73806e9ca05fa0d07da619e2c0f01b6f7 (diff)
loplugin:referencecasting look through more clang Types
Note that because of where the fix resides, loplugin:redundantcast also notices a few more things. Change-Id: I0b66047fadfff2c5ceafcbd3eab085de00d861a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120865 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/viewer/mediawindow_impl.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index affc0ff63611..2637eedf8147 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -144,10 +144,9 @@ void MediaWindowImpl::dispose()
if (mxPlayerWindow.is())
{
- auto pEventsIf = static_cast<cppu::OWeakObject*>(mxEvents.get());
- mxPlayerWindow->removeKeyListener( uno::Reference< awt::XKeyListener >( pEventsIf, uno::UNO_QUERY ) );
- mxPlayerWindow->removeMouseListener( uno::Reference< awt::XMouseListener >( pEventsIf, uno::UNO_QUERY ) );
- mxPlayerWindow->removeMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( pEventsIf, uno::UNO_QUERY ) );
+ mxPlayerWindow->removeKeyListener( uno::Reference< awt::XKeyListener >( mxEvents ) );
+ mxPlayerWindow->removeMouseListener( uno::Reference< awt::XMouseListener >( mxEvents ) );
+ mxPlayerWindow->removeMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( mxEvents ) );
mxPlayerWindow->dispose();
mxPlayerWindow.clear();
}
@@ -443,11 +442,10 @@ void MediaWindowImpl::onURLChanged()
if( xPlayerWindow.is() )
{
- auto pEventsIf = static_cast<cppu::OWeakObject*>(mxEvents.get());
- xPlayerWindow->addKeyListener( uno::Reference< awt::XKeyListener >( pEventsIf, uno::UNO_QUERY ) );
- xPlayerWindow->addMouseListener( uno::Reference< awt::XMouseListener >( pEventsIf, uno::UNO_QUERY ) );
- xPlayerWindow->addMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( pEventsIf, uno::UNO_QUERY ) );
- xPlayerWindow->addFocusListener( uno::Reference< awt::XFocusListener >( pEventsIf, uno::UNO_QUERY ) );
+ xPlayerWindow->addKeyListener( uno::Reference< awt::XKeyListener >( mxEvents ) );
+ xPlayerWindow->addMouseListener( uno::Reference< awt::XMouseListener >( mxEvents ) );
+ xPlayerWindow->addMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( mxEvents ) );
+ xPlayerWindow->addFocusListener( uno::Reference< awt::XFocusListener >( mxEvents ) );
}
}
else