summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-13 11:25:07 +0200
committerNoel Grandin <noel@peralex.com>2016-04-13 13:27:52 +0200
commitd60d957a680d9c98823aac05facb652bf619a750 (patch)
treeff5fc8caeee09497eb7943c0ef95337c3bb4e8de /include
parent299d938bf05faf60b848a9d4862e58bb42db3e65 (diff)
loplugin:passstuffbyref in oox
Change-Id: Iec989e9060c77dd5b010224b37633179cee4f7e9
Diffstat (limited to 'include')
-rw-r--r--include/oox/core/fastparser.hxx2
-rw-r--r--include/oox/drawingml/color.hxx4
-rw-r--r--include/oox/drawingml/shape.hxx10
-rw-r--r--include/oox/drawingml/shapecontext.hxx2
-rw-r--r--include/oox/export/chartexport.hxx2
-rw-r--r--include/oox/export/drawingml.hxx2
-rw-r--r--include/oox/export/vmlexport.hxx2
-rw-r--r--include/oox/helper/attributelist.hxx2
-rw-r--r--include/oox/helper/grabbagstack.hxx2
-rw-r--r--include/oox/helper/propertyset.hxx2
-rw-r--r--include/oox/ole/axcontrol.hxx2
-rw-r--r--include/oox/ole/vbacontrol.hxx4
-rw-r--r--include/oox/ppt/comments.hxx4
-rw-r--r--include/oox/ppt/pptimport.hxx4
-rw-r--r--include/oox/ppt/slidepersist.hxx28
15 files changed, 36 insertions, 36 deletions
diff --git a/include/oox/core/fastparser.hxx b/include/oox/core/fastparser.hxx
index b1e42947e7ae..d8d2ced7ef08 100644
--- a/include/oox/core/fastparser.hxx
+++ b/include/oox/core/fastparser.hxx
@@ -74,7 +74,7 @@ public:
void parseStream( StorageBase& rStorage, const OUString& rStreamName )
throw( css::xml::sax::SAXException, css::io::IOException, css::uno::RuntimeException );
- css::uno::Reference< css::xml::sax::XFastTokenHandler >
+ const css::uno::Reference< css::xml::sax::XFastTokenHandler >&
getTokenHandler() const { return mxTokenHandler; }
private:
diff --git a/include/oox/drawingml/color.hxx b/include/oox/drawingml/color.hxx
index 98352cbc11e8..9f94c4d91489 100644
--- a/include/oox/drawingml/color.hxx
+++ b/include/oox/drawingml/color.hxx
@@ -94,9 +94,9 @@ public:
sal_Int16 getTransparency() const;
/** Returns the scheme name from the a:schemeClr element for interoperability purposes */
- OUString getSchemeName() const { return msSchemeName; }
+ const OUString& getSchemeName() const { return msSchemeName; }
/** Returns the unaltered list of transformations for interoperability purposes */
- css::uno::Sequence< css::beans::PropertyValue > getTransformations() const { return maInteropTransformations;}
+ const css::uno::Sequence< css::beans::PropertyValue >& getTransformations() const { return maInteropTransformations;}
/** Translates between color transformation tokens and their names */
static OUString getColorTransformationName( sal_Int32 nElement );
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index c0c25100fd6a..63c0bbb4507c 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -94,7 +94,7 @@ public:
GraphicProperties& getGraphicProperties() { return *mpGraphicPropertiesPtr; }
const GraphicProperties& getGraphicProperties() const { return *mpGraphicPropertiesPtr; }
- CustomShapePropertiesPtr getCustomShapeProperties(){ return mpCustomShapePropertiesPtr; }
+ CustomShapePropertiesPtr& getCustomShapeProperties(){ return mpCustomShapePropertiesPtr; }
Shape3DProperties& get3DProperties() { return *mp3DPropertiesPtr; }
const Shape3DProperties& get3DProperties() const { return *mp3DPropertiesPtr; }
@@ -118,9 +118,9 @@ public:
std::vector< ShapePtr >& getChildren() { return maChildren; }
void setName( const OUString& rName ) { msName = rName; }
- OUString getName( ) { return msName; }
+ const OUString& getName( ) { return msName; }
void setId( const OUString& rId ) { msId = rId; }
- OUString getId() { return msId; }
+ const OUString& getId() { return msId; }
void setHidden( bool bHidden ) { mbHidden = bHidden; }
void setHiddenMasterShape( bool bHiddenMasterShape ) { mbHiddenMasterShape = bHiddenMasterShape; }
void setSubType( sal_Int32 nSubType ) { mnSubType = nSubType; }
@@ -137,9 +137,9 @@ public:
void setTableType();
void setTextBody(const TextBodyPtr & pTextBody);
- TextBodyPtr getTextBody() { return mpTextBody;}
+ const TextBodyPtr& getTextBody() { return mpTextBody;}
void setMasterTextListStyle( const TextListStylePtr& pMasterTextListStyle );
- TextListStylePtr getMasterTextListStyle() const { return mpMasterTextListStyle; }
+ const TextListStylePtr& getMasterTextListStyle() const { return mpMasterTextListStyle; }
ShapeStyleRefMap& getShapeStyleRefs() { return maShapeStyleRefs; }
const ShapeStyleRefMap& getShapeStyleRefs() const { return maShapeStyleRefs; }
diff --git a/include/oox/drawingml/shapecontext.hxx b/include/oox/drawingml/shapecontext.hxx
index 63c3beccf014..8ec0e691d869 100644
--- a/include/oox/drawingml/shapecontext.hxx
+++ b/include/oox/drawingml/shapecontext.hxx
@@ -36,7 +36,7 @@ public:
virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
- ShapePtr getShape() { return mpShapePtr;}
+ const ShapePtr& getShape() { return mpShapePtr;}
protected:
diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx
index 7fa4664ab6ed..c813ebf94d6d 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -207,7 +207,7 @@ public:
virtual ~ChartExport() {}
sal_Int32 GetChartID( );
- css::uno::Reference< css::frame::XModel > getModel(){ return mxChartModel; }
+ const css::uno::Reference< css::frame::XModel >& getModel(){ return mxChartModel; }
void WriteChartObj( const css::uno::Reference< css::drawing::XShape >& xShape, sal_Int32 nChartCount );
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index fe2a8c78bbe7..e406ba75cddd 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -129,7 +129,7 @@ public:
DrawingML( ::sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* pFB = nullptr, DocumentType eDocumentType = DOCUMENT_PPTX, DMLTextExport* pTextExport = nullptr )
: meDocumentType( eDocumentType ), mpTextExport(pTextExport), mpFS( pFS ), mpFB( pFB ), mbIsBackgroundDark( false ) {}
void SetFS( ::sax_fastparser::FSHelperPtr pFS ) { mpFS = pFS; }
- ::sax_fastparser::FSHelperPtr GetFS() { return mpFS; }
+ const ::sax_fastparser::FSHelperPtr& GetFS() { return mpFS; }
::oox::core::XmlFilterBase* GetFB() { return mpFB; }
DocumentType GetDocumentType() { return meDocumentType; }
/// The application-specific text exporter callback, if there is one.
diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx
index 4855f518da25..1c2053406f05 100644
--- a/include/oox/export/vmlexport.hxx
+++ b/include/oox/export/vmlexport.hxx
@@ -84,7 +84,7 @@ public:
VMLExport( ::sax_fastparser::FSHelperPtr pSerializer, VMLTextExport* pTextExport = nullptr );
virtual ~VMLExport();
- ::sax_fastparser::FSHelperPtr
+ const ::sax_fastparser::FSHelperPtr&
GetFS() { return m_pSerializer; }
void SetFS(const ::sax_fastparser::FSHelperPtr& pSerializer);
diff --git a/include/oox/helper/attributelist.hxx b/include/oox/helper/attributelist.hxx
index 2bde4a8807cc..acb8709020ba 100644
--- a/include/oox/helper/attributelist.hxx
+++ b/include/oox/helper/attributelist.hxx
@@ -74,7 +74,7 @@ public:
const css::uno::Reference< css::xml::sax::XFastAttributeList >& rxAttribs );
/** Returns the wrapped com.sun.star.xml.sax.XFastAttributeList object. */
- css::uno::Reference< css::xml::sax::XFastAttributeList >
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >&
getFastAttributeList() const { return mxAttribs; }
/** Returns true, if the specified attribute is present. */
diff --git a/include/oox/helper/grabbagstack.hxx b/include/oox/helper/grabbagstack.hxx
index aba5af28dfcc..8ad8bd462d61 100644
--- a/include/oox/helper/grabbagstack.hxx
+++ b/include/oox/helper/grabbagstack.hxx
@@ -38,7 +38,7 @@ public:
virtual ~GrabBagStack();
- OUString getCurrentName() { return mCurrentElement.maElementName;}
+ const OUString& getCurrentName() { return mCurrentElement.maElementName;}
css::beans::PropertyValue getRootProperty();
diff --git a/include/oox/helper/propertyset.hxx b/include/oox/helper/propertyset.hxx
index 669472a07b6d..1470cfcf3f51 100644
--- a/include/oox/helper/propertyset.hxx
+++ b/include/oox/helper/propertyset.hxx
@@ -71,7 +71,7 @@ public:
bool is() const { return mxPropSet.is(); }
/** Returns the contained XPropertySet interface. */
- css::uno::Reference< css::beans::XPropertySet >
+ const css::uno::Reference< css::beans::XPropertySet >&
getXPropertySet() const { return mxPropSet; }
/** Returns true, if the specified property is supported by the property set. */
diff --git a/include/oox/ole/axcontrol.hxx b/include/oox/ole/axcontrol.hxx
index 87b8515fa6a9..e8c879a44ea2 100644
--- a/include/oox/ole/axcontrol.hxx
+++ b/include/oox/ole/axcontrol.hxx
@@ -972,7 +972,7 @@ public:
convertAndInsert( const EmbeddedControl& rControl, sal_Int32& rnCtrlIndex );
/** Returns the XIndexContainer interface of the UNO control form, if existing. */
- css::uno::Reference< css::container::XIndexContainer >
+ const css::uno::Reference< css::container::XIndexContainer >&
getXForm() const { return mxFormIC; }
private:
diff --git a/include/oox/ole/vbacontrol.hxx b/include/oox/ole/vbacontrol.hxx
index a50054e5f5c2..daf3f1b150c7 100644
--- a/include/oox/ole/vbacontrol.hxx
+++ b/include/oox/ole/vbacontrol.hxx
@@ -72,8 +72,8 @@ public:
const ControlConverter& rConv,
ApiControlType eCtrlType,
sal_Int32 nCtrlIndex ) const;
- ::rtl::OUString getControlSource() { return maControlSource; }
- ::rtl::OUString getRowSource() { return maRowSource; }
+ const OUString& getControlSource() { return maControlSource; }
+ const OUString& getRowSource() { return maRowSource; }
protected:
OUString maName; ///< Name of the control.
OUString maTag; ///< User defined tag.
diff --git a/include/oox/ppt/comments.hxx b/include/oox/ppt/comments.hxx
index 6766df27870c..a722ff3ae0a1 100644
--- a/include/oox/ppt/comments.hxx
+++ b/include/oox/ppt/comments.hxx
@@ -77,11 +77,11 @@ class Comment
{
text = _text;
}
- OUString get_text()
+ const OUString& get_text()
{
return text;
}
- css::util::DateTime getDateTime()
+ const css::util::DateTime& getDateTime()
{
return aDateTime;
}
diff --git a/include/oox/ppt/pptimport.hxx b/include/oox/ppt/pptimport.hxx
index 125030381f70..35bfb91a4d36 100644
--- a/include/oox/ppt/pptimport.hxx
+++ b/include/oox/ppt/pptimport.hxx
@@ -49,9 +49,9 @@ public:
virtual const oox::drawingml::table::TableStyleListPtr getTableStyles() override;
virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() override;
- SlidePersistPtr getActualSlidePersist() const { return mpActualSlidePersist; };
+ const SlidePersistPtr& getActualSlidePersist() const { return mpActualSlidePersist; };
void setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; };
- std::map< OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; };
+ std::map< OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; };
std::vector< SlidePersistPtr >& getDrawPages(){ return maDrawPages; };
std::vector< SlidePersistPtr >& getMasterPages(){ return maMasterPages; };
std::vector< SlidePersistPtr >& getNotesPages(){ return maNotesPages; };
diff --git a/include/oox/ppt/slidepersist.hxx b/include/oox/ppt/slidepersist.hxx
index 1a61603ae26f..6fd77941d947 100644
--- a/include/oox/ppt/slidepersist.hxx
+++ b/include/oox/ppt/slidepersist.hxx
@@ -59,31 +59,31 @@ public:
oox::drawingml::ShapePtr pShapesPtr, const ::oox::drawingml::TextListStylePtr & );
~SlidePersist();
- css::uno::Reference< css::drawing::XDrawPage > getPage() const { return mxPage; };
+ const css::uno::Reference< css::drawing::XDrawPage >& getPage() const { return mxPage; };
#if OSL_DEBUG_LEVEL > 0
static css::uno::WeakReference< css::drawing::XDrawPage > mxDebugPage;
#endif
void setMasterPersist( SlidePersistPtr pMasterPersistPtr ){ mpMasterPagePtr = pMasterPersistPtr; }
- SlidePersistPtr getMasterPersist() const { return mpMasterPagePtr; }
+ const SlidePersistPtr& getMasterPersist() const { return mpMasterPagePtr; }
void setPath( const OUString& rPath ) { maPath = rPath; }
- const OUString getPath() const { return maPath; }
+ const OUString& getPath() const { return maPath; }
void setLayoutPath( const OUString& rLayoutPath ) { maLayoutPath = rLayoutPath; }
- const OUString getLayoutPath() const { return maLayoutPath; }
+ const OUString& getLayoutPath() const { return maLayoutPath; }
void setTheme( const oox::drawingml::ThemePtr& rThemePtr ){ mpThemePtr = rThemePtr; }
- oox::drawingml::ThemePtr getTheme() const { return mpThemePtr; }
+ const oox::drawingml::ThemePtr& getTheme() const { return mpThemePtr; }
- oox::drawingml::ClrSchemePtr getClrScheme() const { return mpClrSchemePtr; }
+ const oox::drawingml::ClrSchemePtr& getClrScheme() const { return mpClrSchemePtr; }
void setClrMap( const oox::drawingml::ClrMapPtr pClrMapPtr ){ mpClrMapPtr = pClrMapPtr; }
- oox::drawingml::ClrMapPtr getClrMap() const { return mpClrMapPtr; }
+ const oox::drawingml::ClrMapPtr& getClrMap() const { return mpClrMapPtr; }
void setBackgroundProperties( const oox::drawingml::FillPropertiesPtr& rFillPropertiesPtr ){ mpBackgroundPropertiesPtr = rFillPropertiesPtr; }
- const oox::drawingml::FillPropertiesPtr getBackgroundProperties() const { return mpBackgroundPropertiesPtr; }
+ const oox::drawingml::FillPropertiesPtr& getBackgroundProperties() const { return mpBackgroundPropertiesPtr; }
bool isMasterPage() const { return mbMaster; }
bool isNotesPage() const { return mbNotes; }
@@ -92,13 +92,13 @@ public:
short getLayoutFromValueToken();
- oox::drawingml::TextListStylePtr getDefaultTextStyle() const { return maDefaultTextStylePtr; }
- oox::drawingml::TextListStylePtr getTitleTextStyle() const { return maTitleTextStylePtr; }
- oox::drawingml::TextListStylePtr getBodyTextStyle() const { return maBodyTextStylePtr; }
- oox::drawingml::TextListStylePtr getNotesTextStyle() const { return maNotesTextStylePtr; }
- oox::drawingml::TextListStylePtr getOtherTextStyle() const { return maOtherTextStylePtr; }
+ const oox::drawingml::TextListStylePtr& getDefaultTextStyle() const { return maDefaultTextStylePtr; }
+ const oox::drawingml::TextListStylePtr& getTitleTextStyle() const { return maTitleTextStylePtr; }
+ const oox::drawingml::TextListStylePtr& getBodyTextStyle() const { return maBodyTextStylePtr; }
+ const oox::drawingml::TextListStylePtr& getNotesTextStyle() const { return maNotesTextStylePtr; }
+ const oox::drawingml::TextListStylePtr& getOtherTextStyle() const { return maOtherTextStylePtr; }
- oox::drawingml::ShapePtr getShapes() { return maShapesPtr; }
+ const oox::drawingml::ShapePtr& getShapes() { return maShapesPtr; }
void hideShapesAsMasterShapes();
::std::list< std::shared_ptr< TimeNode > >& getTimeNodeList() { return maTimeNodeList; }
oox::ppt::HeaderFooter& getHeaderFooter(){ return maHeaderFooter; };