From ee2bb231036b1d9d954dec369855948e6ea1f53a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 19 Jul 2019 09:49:23 +0200 Subject: loplugin:referencecasting in avmedia..basic Change-Id: I6790b2e3902d64fb6f714f031affa221dbaba014 Reviewed-on: https://gerrit.libreoffice.org/75934 Tested-by: Jenkins Reviewed-by: Noel Grandin --- avmedia/source/viewer/mediawindow_impl.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'avmedia/source/viewer/mediawindow_impl.cxx') 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 & ) -- cgit