From d60d957a680d9c98823aac05facb652bf619a750 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Apr 2016 11:25:07 +0200 Subject: loplugin:passstuffbyref in oox Change-Id: Iec989e9060c77dd5b010224b37633179cee4f7e9 --- oox/inc/drawingml/table/tablecell.hxx | 2 +- oox/source/drawingml/customshapegeometry.cxx | 2 +- oox/source/drawingml/diagram/diagram.hxx | 2 +- oox/source/ole/olehelper.cxx | 4 ++-- oox/source/shape/LockedCanvasContext.hxx | 2 +- oox/source/shape/WpgContext.hxx | 2 +- oox/source/shape/WpsContext.hxx | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'oox') diff --git a/oox/inc/drawingml/table/tablecell.hxx b/oox/inc/drawingml/table/tablecell.hxx index e936d0777cdc..313e153e7222 100644 --- a/oox/inc/drawingml/table/tablecell.hxx +++ b/oox/inc/drawingml/table/tablecell.hxx @@ -70,7 +70,7 @@ public: void setHorzOverflowToken( sal_Int32 nToken ){ mnHorzOverflowToken = nToken; }; void setTextBody( const oox::drawingml::TextBodyPtr& pTextBody ){ mpTextBody = pTextBody; }; - oox::drawingml::TextBodyPtr getTextBody(){ return mpTextBody; }; + const oox::drawingml::TextBodyPtr& getTextBody(){ return mpTextBody; }; void pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle, diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index 88aa8a72961f..a29ea074b220 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -596,7 +596,7 @@ ContextHandlerRef GeomGuideListContext::onCreateContext( sal_Int32 aElementToken return this; } -static const OUString GetGeomGuideName( const OUString& rValue ) +static const OUString& GetGeomGuideName( const OUString& rValue ) { return rValue; } diff --git a/oox/source/drawingml/diagram/diagram.hxx b/oox/source/drawingml/diagram/diagram.hxx index 3c88772f0c04..81a14bafb5fc 100644 --- a/oox/source/drawingml/diagram/diagram.hxx +++ b/oox/source/drawingml/diagram/diagram.hxx @@ -262,7 +262,7 @@ class Diagram { public: void setData( const DiagramDataPtr & ); - DiagramDataPtr getData() const + const DiagramDataPtr& getData() const { return mpData; } diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index 9e7f3caefb7f..7eae88618ebb 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -359,8 +359,8 @@ public: sResult = maGUID.copy(1, maGUID.getLength() - 2 ); return sResult; } - OUString getFullName() { return maFullName; } - OUString getTypeName() { return maTypeName; } + const OUString& getFullName() { return maFullName; } + const OUString& getTypeName() { return maTypeName; } bool isValid() { return mpModel != nullptr; } void exportName( const Reference< XOutputStream >& rxOut ); void exportCompObj( const Reference< XOutputStream >& rxOut ); diff --git a/oox/source/shape/LockedCanvasContext.hxx b/oox/source/shape/LockedCanvasContext.hxx index a2e430c67938..21dc10f3f804 100644 --- a/oox/source/shape/LockedCanvasContext.hxx +++ b/oox/source/shape/LockedCanvasContext.hxx @@ -27,7 +27,7 @@ public: virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 Element, const ::oox::AttributeList& rAttribs) override; - oox::drawingml::ShapePtr getShape() + const oox::drawingml::ShapePtr& getShape() { return mpShape; } diff --git a/oox/source/shape/WpgContext.hxx b/oox/source/shape/WpgContext.hxx index ed0cebf1e245..a212bef255cd 100644 --- a/oox/source/shape/WpgContext.hxx +++ b/oox/source/shape/WpgContext.hxx @@ -27,7 +27,7 @@ public: virtual oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElementToken, const oox::AttributeList& rAttribs) override; - oox::drawingml::ShapePtr getShape() + const oox::drawingml::ShapePtr& getShape() { return mpShape; } diff --git a/oox/source/shape/WpsContext.hxx b/oox/source/shape/WpsContext.hxx index 90fd3fb9aa21..b7dfb1d95c35 100644 --- a/oox/source/shape/WpsContext.hxx +++ b/oox/source/shape/WpsContext.hxx @@ -27,7 +27,7 @@ public: virtual oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElementToken, const oox::AttributeList& rAttribs) override; - oox::drawingml::ShapePtr getShape() + const oox::drawingml::ShapePtr& getShape() { return mpShape; } -- cgit