summaryrefslogtreecommitdiff
path: root/avmedia/source/viewer/mediawindow_impl.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-19 09:49:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-19 12:22:43 +0200
commitee2bb231036b1d9d954dec369855948e6ea1f53a (patch)
treeeb7d4e569683d981e7cb9c76863f78739eefa870 /avmedia/source/viewer/mediawindow_impl.cxx
parent1f6c4328bfa00da5cf351dd050a80b75e0f1acde (diff)
loplugin:referencecasting in avmedia..basic
Change-Id: I6790b2e3902d64fb6f714f031affa221dbaba014 Reviewed-on: https://gerrit.libreoffice.org/75934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'avmedia/source/viewer/mediawindow_impl.cxx')
-rw-r--r--avmedia/source/viewer/mediawindow_impl.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index a7e053cb911a..4aae993d5541 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -152,11 +152,7 @@ void MediaWindowImpl::dispose()
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 ) );
-
- uno::Reference< lang::XComponent > xComponent( mxPlayerWindow, uno::UNO_QUERY );
- if (xComponent.is())
- xComponent->dispose();
-
+ mxPlayerWindow->dispose();
mxPlayerWindow.clear();
}
@@ -222,7 +218,7 @@ uno::Reference< media::XPlayer > MediaWindowImpl::createPlayer(
xContext->getServiceManager()->createInstanceWithContext(rManagerServName, xContext),
uno::UNO_QUERY );
if( xManager.is() )
- xPlayer.set( xManager->createPlayer( rURL ), uno::UNO_QUERY );
+ xPlayer = xManager->createPlayer( rURL );
else
SAL_INFO( "avmedia", "failed to create media player service " << rManagerServName );
} catch ( const uno::Exception & )