From 27b6782f5b17167e4258656aef9aef34a10699db Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Apr 2016 11:22:04 +0200 Subject: loplugin:passstuffbyref in editeng Change-Id: I11deb7c73a1c160d587d74c9851ff10c875c972b --- include/editeng/brushitem.hxx | 4 ++-- include/editeng/bulletitem.hxx | 6 +++--- include/editeng/editeng.hxx | 4 ++-- include/editeng/flditem.hxx | 2 +- include/editeng/numitem.hxx | 2 +- include/editeng/optitems.hxx | 2 +- include/editeng/outliner.hxx | 12 ++++++------ include/editeng/splwrap.hxx | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx index d219c1f6ef50..2b94ce1cebf1 100644 --- a/include/editeng/brushitem.hxx +++ b/include/editeng/brushitem.hxx @@ -102,8 +102,8 @@ public: sal_Int32 GetShadingValue() const { return nShadingValue; } const Graphic* GetGraphic(OUString const & referer = OUString()/*TODO*/) const; const GraphicObject* GetGraphicObject(OUString const & referer = OUString()/*TODO*/) const; - OUString GetGraphicLink() const { return maStrLink; } - OUString GetGraphicFilter() const { return maStrFilter; } + const OUString& GetGraphicLink() const { return maStrLink; } + const OUString& GetGraphicFilter() const { return maStrFilter; } void SetShadingValue( const sal_Int32 nNew ); diff --git a/include/editeng/bulletitem.hxx b/include/editeng/bulletitem.hxx index 31abbc91e2fb..4c711c852657 100644 --- a/include/editeng/bulletitem.hxx +++ b/include/editeng/bulletitem.hxx @@ -69,13 +69,13 @@ public: OUString GetFullText() const; sal_Unicode GetSymbol() const { return cSymbol; } - OUString GetPrevText() const { return aPrevText; } - OUString GetFollowText() const { return aFollowText; } + const OUString& GetPrevText() const { return aPrevText; } + const OUString& GetFollowText() const { return aFollowText; } sal_uInt16 GetStart() const { return nStart; } long GetWidth() const { return nWidth; } SvxBulletStyle GetStyle() const { return nStyle; } - vcl::Font GetFont() const { return aFont; } + const vcl::Font& GetFont() const { return aFont; } sal_uInt16 GetScale() const { return nScale; } const GraphicObject& GetGraphicObject() const; diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 267f0f0f6c23..46adeb2aa3bb 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -377,7 +377,7 @@ public: Link GetNotifyHdl() const; void SetImportHdl( const Link& rLink ); - Link GetImportHdl() const; + const Link& GetImportHdl() const; // Do not evaluate font formatting => For Outliner bool IsFlatMode() const; @@ -410,7 +410,7 @@ public: SfxStyleSheet* GetStyleSheet( sal_Int32 nPara ); void SetWordDelimiters( const OUString& rDelimiters ); - OUString GetWordDelimiters() const; + const OUString& GetWordDelimiters() const; void EraseVirtualDevice(); diff --git a/include/editeng/flditem.hxx b/include/editeng/flditem.hxx index 5d3acdce600e..649167a20118 100644 --- a/include/editeng/flditem.hxx +++ b/include/editeng/flditem.hxx @@ -320,7 +320,7 @@ public: SvxFileType eType = SVXFILETYPE_VAR, SvxFileFormat eFormat = SVXFILEFORMAT_FULLPATH ); - OUString GetFile() const { return aFile; } + const OUString& GetFile() const { return aFile; } void SetFile( const OUString& rString ) { aFile = rString; } SvxFileType GetType() const { return eType; } diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx index c33cfefe9dba..775e8f1130f9 100644 --- a/include/editeng/numitem.hxx +++ b/include/editeng/numitem.hxx @@ -173,7 +173,7 @@ public: void SetBulletRelSize(sal_uInt16 nSet) {nBulletRelSize = nSet;} sal_uInt16 GetBulletRelSize() const { return nBulletRelSize;} void SetBulletColor(Color nSet){nBulletColor = nSet;} - Color GetBulletColor()const {return nBulletColor;} + const Color& GetBulletColor()const {return nBulletColor;} void SetIncludeUpperLevels( sal_uInt8 nSet ) { nInclUpperLevels = nSet;} sal_uInt8 GetIncludeUpperLevels()const { return nInclUpperLevels;} diff --git a/include/editeng/optitems.hxx b/include/editeng/optitems.hxx index 480b7782b9eb..d44c2dc89678 100644 --- a/include/editeng/optitems.hxx +++ b/include/editeng/optitems.hxx @@ -49,7 +49,7 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; - css::uno::Reference< css::linguistic2::XSpellChecker1 > + const css::uno::Reference< css::linguistic2::XSpellChecker1 >& GetXSpellChecker() const { return xSpellCheck; } private: diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index c385b48e765c..78b2e211eaee 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -750,11 +750,11 @@ public: void ParagraphInsertedHdl(); void SetParaInsertedHdl(const Link& rLink){aParaInsertedHdl=rLink;} - Link GetParaInsertedHdl() const { return aParaInsertedHdl; } + const Link& GetParaInsertedHdl() const { return aParaInsertedHdl; } void ParagraphRemovingHdl(); void SetParaRemovingHdl(const Link& rLink){aParaRemovingHdl=rLink;} - Link GetParaRemovingHdl() const { return aParaRemovingHdl; } + const Link& GetParaRemovingHdl() const { return aParaRemovingHdl; } NonOverflowingText *GetNonOverflowingText() const; OverflowingText *GetOverflowingText() const; @@ -766,7 +766,7 @@ public: void DepthChangedHdl(); void SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;} - Link GetDepthChangedHdl() const { return aDepthChangedHdl; } + const Link& GetDepthChangedHdl() const { return aDepthChangedHdl; } sal_Int16 GetPrevDepth() const { return static_cast(nDepthChangedHdlPrevDepth); } ParaFlag GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; } @@ -778,7 +778,7 @@ public: sal_Int32 GetSelPageCount() const { return nDepthChangedHdlPrevDepth; } void SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; } - Link GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; } + const Link& GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; } void SetDrawPortionHdl(const Link& rLink){aDrawPortionHdl=rLink;} @@ -875,9 +875,9 @@ public: void SetControlWord( EEControlBits nWord ); EEControlBits GetControlWord() const; - Link GetBeginMovingHdl() const { return aBeginMovingHdl; } + const Link& GetBeginMovingHdl() const { return aBeginMovingHdl; } void SetBeginMovingHdl(const Link& rLink) {aBeginMovingHdl=rLink;} - Link GetEndMovingHdl() const {return aEndMovingHdl;} + const Link& GetEndMovingHdl() const {return aEndMovingHdl;} void SetEndMovingHdl( const Link& rLink){aEndMovingHdl=rLink;} sal_uLong GetLineCount( sal_Int32 nParagraph ) const; diff --git a/include/editeng/splwrap.hxx b/include/editeng/splwrap.hxx index 1edc42c4e81a..1c0bb3bbe5b5 100644 --- a/include/editeng/splwrap.hxx +++ b/include/editeng/splwrap.hxx @@ -98,7 +98,7 @@ public: inline bool IsAllRight() { return bAllRight; } protected: - css::uno::Reference< css::uno::XInterface > + const css::uno::Reference< css::uno::XInterface >& GetLast() { return xLast; } void SetLast(const css::uno::Reference< css::uno::XInterface > &xNewLast) { xLast = xNewLast; } -- cgit v1.2.3