From eb1603cb5383be7e25f35053dd64f044ead90099 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Apr 2016 15:38:30 +0200 Subject: loplugin:passstuffbyref in slideshow Change-Id: I6a58315ae63d543053d613a18ff769329f309c32 --- slideshow/source/engine/activities/activitybase.hxx | 4 ++-- slideshow/source/engine/shapeattributelayer.cxx | 2 +- slideshow/source/engine/shapes/drawshapesubsetting.cxx | 2 +- slideshow/source/engine/shapes/drawshapesubsetting.hxx | 2 +- slideshow/source/engine/shapes/shapeimporter.cxx | 2 +- slideshow/source/engine/shapes/viewappletshape.cxx | 2 +- slideshow/source/engine/shapes/viewappletshape.hxx | 2 +- slideshow/source/engine/shapes/viewbackgroundshape.cxx | 2 +- slideshow/source/engine/shapes/viewbackgroundshape.hxx | 2 +- slideshow/source/engine/shapes/viewmediashape.cxx | 2 +- slideshow/source/engine/shapes/viewmediashape.hxx | 2 +- slideshow/source/engine/shapes/viewshape.cxx | 2 +- slideshow/source/engine/shapes/viewshape.hxx | 4 ++-- slideshow/source/engine/shapesubset.cxx | 2 +- slideshow/source/engine/slide/slideimpl.cxx | 2 +- slideshow/source/engine/slide/userpaintoverlay.cxx | 2 +- slideshow/source/engine/slidebitmap.cxx | 2 +- slideshow/source/engine/slideview.cxx | 2 +- slideshow/source/inc/shapeattributelayer.hxx | 2 +- slideshow/source/inc/shapeattributelayerholder.hxx | 2 +- slideshow/source/inc/shapeimporter.hxx | 2 +- slideshow/source/inc/shapesubset.hxx | 2 +- slideshow/source/inc/slidebitmap.hxx | 2 +- 23 files changed, 25 insertions(+), 25 deletions(-) (limited to 'slideshow') diff --git a/slideshow/source/engine/activities/activitybase.hxx b/slideshow/source/engine/activities/activitybase.hxx index 50de04542a98..5db55d22485c 100644 --- a/slideshow/source/engine/activities/activitybase.hxx +++ b/slideshow/source/engine/activities/activitybase.hxx @@ -106,9 +106,9 @@ protected: EventQueue& getEventQueue() const { return mrEventQueue; } - AnimatableShapeSharedPtr getShape() const { return mpShape; } + const AnimatableShapeSharedPtr& getShape() const { return mpShape; } - ShapeAttributeLayerSharedPtr getShapeAttributeLayer() const + const ShapeAttributeLayerSharedPtr& getShapeAttributeLayer() const { return mpAttributeLayer; } bool isRepeatCountValid() const { return bool(maRepeats); } diff --git a/slideshow/source/engine/shapeattributelayer.cxx b/slideshow/source/engine/shapeattributelayer.cxx index 92518bdb61ea..73b100d7a204 100644 --- a/slideshow/source/engine/shapeattributelayer.cxx +++ b/slideshow/source/engine/shapeattributelayer.cxx @@ -236,7 +236,7 @@ namespace slideshow return true; } - ShapeAttributeLayerSharedPtr ShapeAttributeLayer::getChildLayer() const + const ShapeAttributeLayerSharedPtr& ShapeAttributeLayer::getChildLayer() const { return mpChild; } diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx index fab2a4096159..3c3e1d7881c5 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx @@ -277,7 +277,7 @@ namespace slideshow maCurrentSubsets.push_back( maSubset ); } - DocTreeNode DrawShapeSubsetting::getSubsetNode() const + const DocTreeNode& DrawShapeSubsetting::getSubsetNode() const { return maSubset; } diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.hxx b/slideshow/source/engine/shapes/drawshapesubsetting.hxx index 48dca8e47490..ec101628e11e 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.hxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.hxx @@ -84,7 +84,7 @@ namespace slideshow /// Return subset node for this shape - DocTreeNode getSubsetNode () const; + const DocTreeNode& getSubsetNode () const; /// Get subset shape for given node, if any AttributableShapeSharedPtr getSubsetShape ( const DocTreeNode& rTreeNode ) const; diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index a06b2dc59ba2..5546d1668672 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -580,7 +580,7 @@ bool ShapeImporter::isImportDone() const return maShapesStack.empty(); } -PolyPolygonVector ShapeImporter::getPolygons() +const PolyPolygonVector& ShapeImporter::getPolygons() { return maPolygons; } diff --git a/slideshow/source/engine/shapes/viewappletshape.cxx b/slideshow/source/engine/shapes/viewappletshape.cxx index 47f8f78a698a..7d6468a98960 100644 --- a/slideshow/source/engine/shapes/viewappletshape.cxx +++ b/slideshow/source/engine/shapes/viewappletshape.cxx @@ -114,7 +114,7 @@ namespace slideshow } - ViewLayerSharedPtr ViewAppletShape::getViewLayer() const + const ViewLayerSharedPtr& ViewAppletShape::getViewLayer() const { return mpViewLayer; } diff --git a/slideshow/source/engine/shapes/viewappletshape.hxx b/slideshow/source/engine/shapes/viewappletshape.hxx index dfef6abe72ae..67075093e708 100644 --- a/slideshow/source/engine/shapes/viewappletshape.hxx +++ b/slideshow/source/engine/shapes/viewappletshape.hxx @@ -89,7 +89,7 @@ namespace slideshow /** Query the associated view layer of this shape */ - ViewLayerSharedPtr getViewLayer() const; + const ViewLayerSharedPtr& getViewLayer() const; // animation methods diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx index 996603297f66..ec2d611fec58 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx @@ -142,7 +142,7 @@ namespace slideshow ENSURE_OR_THROW( mpViewLayer->getCanvas(), "ViewBackgroundShape::ViewBackgroundShape(): Invalid ViewLayer canvas" ); } - ViewLayerSharedPtr ViewBackgroundShape::getViewLayer() const + const ViewLayerSharedPtr& ViewBackgroundShape::getViewLayer() const { return mpViewLayer; } diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.hxx b/slideshow/source/engine/shapes/viewbackgroundshape.hxx index 1985b82e1d99..92403dad1aae 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.hxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.hxx @@ -64,7 +64,7 @@ namespace slideshow /** Query the associated view layer of this shape */ - ViewLayerSharedPtr getViewLayer() const; + const ViewLayerSharedPtr& getViewLayer() const; bool render( const GDIMetaFileSharedPtr& rMtf ) const; diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index 2fc4ea24f587..e0c30a27b139 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -113,7 +113,7 @@ namespace slideshow } - ViewLayerSharedPtr ViewMediaShape::getViewLayer() const + const ViewLayerSharedPtr& ViewMediaShape::getViewLayer() const { return mpViewLayer; } diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx index e935f0ab559b..c04b3e9e42ad 100644 --- a/slideshow/source/engine/shapes/viewmediashape.hxx +++ b/slideshow/source/engine/shapes/viewmediashape.hxx @@ -78,7 +78,7 @@ namespace slideshow /** Query the associated view layer of this shape */ - ViewLayerSharedPtr getViewLayer() const; + const ViewLayerSharedPtr& getViewLayer() const; // animation methods diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index a10d34602564..2acc75f0b835 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -722,7 +722,7 @@ namespace slideshow ENSURE_OR_THROW( mpViewLayer, "ViewShape::ViewShape(): Invalid View" ); } - ViewLayerSharedPtr ViewShape::getViewLayer() const + const ViewLayerSharedPtr& ViewShape::getViewLayer() const { return mpViewLayer; } diff --git a/slideshow/source/engine/shapes/viewshape.hxx b/slideshow/source/engine/shapes/viewshape.hxx index 88b3f7a3b0cd..9f6d46c89fe0 100644 --- a/slideshow/source/engine/shapes/viewshape.hxx +++ b/slideshow/source/engine/shapes/viewshape.hxx @@ -63,7 +63,7 @@ namespace slideshow /** Query the associated view layer of this shape */ - ViewLayerSharedPtr getViewLayer() const; + const ViewLayerSharedPtr& getViewLayer() const; /** Query dimension of a safety border around the shape for AA @@ -222,7 +222,7 @@ namespace slideshow { } - ::cppcanvas::CanvasSharedPtr getDestinationCanvas() const + const ::cppcanvas::CanvasSharedPtr& getDestinationCanvas() const { return mpDestinationCanvas; } diff --git a/slideshow/source/engine/shapesubset.cxx b/slideshow/source/engine/shapesubset.cxx index e5c5eee7e8fd..5a20d3e9d194 100644 --- a/slideshow/source/engine/shapesubset.cxx +++ b/slideshow/source/engine/shapesubset.cxx @@ -119,7 +119,7 @@ namespace slideshow return maTreeNode.isEmpty(); } - DocTreeNode ShapeSubset::getSubset() const + const DocTreeNode& ShapeSubset::getSubset() const { return maTreeNode; } diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index ab9aa833271e..a3067267f3de 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -721,7 +721,7 @@ namespace } } - uno::Reference< animations::XAnimationNode > getMainSequence() const + const uno::Reference< animations::XAnimationNode >& getMainSequence() const { return maMainSequence; } diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx index 1a3ad4de8c99..68a3a4ea96a8 100644 --- a/slideshow/source/engine/slide/userpaintoverlay.cxx +++ b/slideshow/source/engine/slide/userpaintoverlay.cxx @@ -224,7 +224,7 @@ namespace slideshow } //Retrieve all registered polygons. - PolyPolygonVector getPolygons() + const PolyPolygonVector& getPolygons() { return maPolygons; } diff --git a/slideshow/source/engine/slidebitmap.cxx b/slideshow/source/engine/slidebitmap.cxx index cee3d8a91a3e..c13a38f15667 100644 --- a/slideshow/source/engine/slidebitmap.cxx +++ b/slideshow/source/engine/slidebitmap.cxx @@ -109,7 +109,7 @@ namespace slideshow maClipPoly = rClipPoly; } - css::uno::Reference< css::rendering::XBitmap > SlideBitmap::getXBitmap() + const css::uno::Reference< css::rendering::XBitmap >& SlideBitmap::getXBitmap() { return mxBitmap; } diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index bc6fee9cd88f..e82ab8011e5e 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -305,7 +305,7 @@ public: { } - basegfx::B1DRange getLayerPriority() const + const basegfx::B1DRange& getLayerPriority() const { return maLayerPrioRange; } diff --git a/slideshow/source/inc/shapeattributelayer.hxx b/slideshow/source/inc/shapeattributelayer.hxx index 31c8ebaf1e78..d52e8a9123a3 100644 --- a/slideshow/source/inc/shapeattributelayer.hxx +++ b/slideshow/source/inc/shapeattributelayer.hxx @@ -124,7 +124,7 @@ namespace slideshow @attention This method is only supposed to be called from Shape objects */ - ShapeAttributeLayerSharedPtr getChildLayer() const; + const ShapeAttributeLayerSharedPtr& getChildLayer() const; /** Set the additive mode for possible child attributes diff --git a/slideshow/source/inc/shapeattributelayerholder.hxx b/slideshow/source/inc/shapeattributelayerholder.hxx index 12044e58eb29..ba596adcdf43 100644 --- a/slideshow/source/inc/shapeattributelayerholder.hxx +++ b/slideshow/source/inc/shapeattributelayerholder.hxx @@ -87,7 +87,7 @@ namespace slideshow return static_cast< bool >(mpAttributeLayer); } - ShapeAttributeLayerSharedPtr get() const + const ShapeAttributeLayerSharedPtr& get() const { return mpAttributeLayer; } diff --git a/slideshow/source/inc/shapeimporter.hxx b/slideshow/source/inc/shapeimporter.hxx index 3c9b85b4ed47..e1fba6fa7683 100644 --- a/slideshow/source/inc/shapeimporter.hxx +++ b/slideshow/source/inc/shapeimporter.hxx @@ -90,7 +90,7 @@ public: importShape() call. */ bool isImportDone() const; - PolyPolygonVector getPolygons(); + const PolyPolygonVector& getPolygons(); double getImportedShapesCount() { return mnAscendingPrio; } private: diff --git a/slideshow/source/inc/shapesubset.hxx b/slideshow/source/inc/shapesubset.hxx index b1241870edfc..68514759de2a 100644 --- a/slideshow/source/inc/shapesubset.hxx +++ b/slideshow/source/inc/shapesubset.hxx @@ -122,7 +122,7 @@ namespace slideshow /** Query subset this object represents */ - DocTreeNode getSubset() const; + const DocTreeNode& getSubset() const; private: // default copy/assignment are okay diff --git a/slideshow/source/inc/slidebitmap.hxx b/slideshow/source/inc/slidebitmap.hxx index d0e169213760..d311a6d1470c 100644 --- a/slideshow/source/inc/slidebitmap.hxx +++ b/slideshow/source/inc/slidebitmap.hxx @@ -68,7 +68,7 @@ namespace slideshow void move( const ::basegfx::B2DPoint& rNewPos ); void clip( const ::basegfx::B2DPolyPolygon& rClipPoly ); - css::uno::Reference< css::rendering::XBitmap > getXBitmap(); + const css::uno::Reference< css::rendering::XBitmap >& getXBitmap(); private: ::basegfx::B2DPoint maOutputPos; -- cgit