summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-20 13:29:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-21 08:49:01 +0200
commit17db60eb46b31b6e4b7e664b01e6f7bb6a3016ab (patch)
treea2f64eca956aa2daf0e74de31bc2d419f769f2c0 /slideshow
parent8a3912c8eb25d1acacbc0a18355f2ca75d418908 (diff)
loplugin:referencecasting in slideshow..svtools
Change-Id: Id0f0332d5d66c0bce309643bf42059b9bdc7d448 Reviewed-on: https://gerrit.libreoffice.org/75997 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/opengl/TransitionerImpl.cxx2
-rw-r--r--slideshow/source/engine/shapes/shapeimporter.cxx4
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx9
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx3
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx7
-rw-r--r--slideshow/source/engine/soundplayer.cxx5
6 files changed, 10 insertions, 20 deletions
diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx
index 461b00c0053f..f66d1402ee24 100644
--- a/slideshow/source/engine/opengl/TransitionerImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx
@@ -298,7 +298,7 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
if (isDisposed())
return false;
- mxView.set( xView, UNO_QUERY );
+ mxView = xView;
if( !mxView.is() )
return false;
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index 67cd654f3e63..619da5d4af1c 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -361,9 +361,7 @@ bool ShapeImporter::isSkip(
if(xLayer.is())
{
OUString layerName;
- uno::Reference<beans::XPropertySet> xPropLayerSet(
- xLayer, uno::UNO_QUERY );
- const uno::Any& a(xPropLayerSet->getPropertyValue("Name") );
+ const uno::Any& a(xLayer->getPropertyValue("Name") );
bool const bRet = (a >>= layerName);
if(bRet)
{
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index e966709df748..491b773fde02 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -127,11 +127,7 @@ namespace slideshow
// shutdown player window
if( mxPlayerWindow.is() )
{
- uno::Reference< lang::XComponent > xComponent( mxPlayerWindow, uno::UNO_QUERY );
-
- if( xComponent.is() )
- xComponent->dispose();
-
+ mxPlayerWindow->dispose();
mxPlayerWindow.clear();
}
@@ -382,8 +378,7 @@ namespace slideshow
{
if( !rMediaURL.isEmpty() )
{
- mxPlayer.set( avmedia::MediaWindow::createPlayer( rMediaURL, ""/*TODO!*/, &rMimeType ),
- uno::UNO_QUERY );
+ mxPlayer = avmedia::MediaWindow::createPlayer( rMediaURL, ""/*TODO!*/, &rMimeType );
}
}
catch( uno::RuntimeException& )
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index 4d74c69804fa..13b1181f48c9 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -980,8 +980,7 @@ bool SlideImpl::loadShapes()
if( xMasterPageTarget.is() )
{
xMasterPage = xMasterPageTarget->getMasterPage();
- xMasterPageShapes.set( xMasterPage,
- uno::UNO_QUERY );
+ xMasterPageShapes = xMasterPage;
if( xMasterPage.is() && xMasterPageShapes.is() )
{
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index e1ba69e398d9..b3d21f3fff3a 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1410,20 +1410,19 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult
uno::Reference< drawing::XLayerManager > xLayerManager(xNameAccess, uno::UNO_QUERY);
// create a layer and set its properties
uno::Reference< drawing::XLayer > xDrawnInSlideshow = xLayerManager->insertNewByIndex(xLayerManager->getCount());
- uno::Reference< beans::XPropertySet > xLayerPropSet(xDrawnInSlideshow, uno::UNO_QUERY);
//Layer Name which enables to catch annotations
OUString layerName = "DrawnInSlideshow";
uno::Any aPropLayer;
aPropLayer <<= layerName;
- xLayerPropSet->setPropertyValue("Name", aPropLayer);
+ xDrawnInSlideshow->setPropertyValue("Name", aPropLayer);
aPropLayer <<= true;
- xLayerPropSet->setPropertyValue("IsVisible", aPropLayer);
+ xDrawnInSlideshow->setPropertyValue("IsVisible", aPropLayer);
aPropLayer <<= false;
- xLayerPropSet->setPropertyValue("IsLocked", aPropLayer);
+ xDrawnInSlideshow->setPropertyValue("IsLocked", aPropLayer);
//Register polygons for each slide
for( const auto& rPoly : maPolygons )
diff --git a/slideshow/source/engine/soundplayer.cxx b/slideshow/source/engine/soundplayer.cxx
index 18a1948089f9..5a602ac921bc 100644
--- a/slideshow/source/engine/soundplayer.cxx
+++ b/slideshow/source/engine/soundplayer.cxx
@@ -104,9 +104,8 @@ namespace slideshow
mpMediaTempFile = rMediaFileManager.getMediaTempFile(rSoundURL);
}
const INetURLObject aURL( mpMediaTempFile ? mpMediaTempFile->m_TempFileURL : rSoundURL );
- mxPlayer.set( avmedia::MediaWindow::createPlayer(
- aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), ""/*TODO!*/ ),
- uno::UNO_QUERY);
+ mxPlayer = avmedia::MediaWindow::createPlayer(
+ aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), ""/*TODO!*/ );
}
catch( uno::RuntimeException& )
{