diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-13 11:30:11 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-04-13 13:27:53 +0200 |
commit | 19b34c0039c6293f9b37aa70f8055aa2be28ba09 (patch) | |
tree | 04463a78141cd94ee70cd463ba7687993410c276 | |
parent | fe8896bab01ccb595c993e54866a01f554b54f4f (diff) |
loplugin:passstuffbyref in svtools
Change-Id: Ie166eaef65e56fafe4e57a5559b587d7558d7aa4
23 files changed, 33 insertions, 33 deletions
diff --git a/include/svtools/breadcrumb.hxx b/include/svtools/breadcrumb.hxx index ac109ecbbfcd..6eff94445ff8 100644 --- a/include/svtools/breadcrumb.hxx +++ b/include/svtools/breadcrumb.hxx @@ -56,7 +56,7 @@ class SVT_DLLPUBLIC Breadcrumb : public VclHBox void EnableFields( bool bEnable ); void SetClickHdl( const Link<Breadcrumb*,void>& rLink ); - OUString GetHdlURL(); + const OUString& GetHdlURL(); void SetRootName( const OUString& rURL ); void SetURL( const OUString& rURL ); diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index 029afb2752cf..12e60cfedc82 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -276,7 +276,7 @@ public: void SetCurDate( const Date& rNewDate ); void SetFirstDate( const Date& rNewFirstDate ); - Date GetFirstDate() const { return maFirstDate; } + const Date& GetFirstDate() const { return maFirstDate; } Date GetLastDate() const { return GetFirstDate() + mnDayCount; } Date GetFirstMonth() const; Date GetLastMonth() const; diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index acb68242f449..1e7cfadf7c84 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -335,7 +335,7 @@ public: inline void SetSourceUnit( FieldUnit eNewUnit ) { eSourceUnit = eNewUnit; } void SetColor( const Color& rColor ); - Color GetColor() const { return aColor; } + const Color& GetColor() const { return aColor; } protected: diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index d28511e49250..497321e05989 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -600,7 +600,7 @@ namespace svt virtual void RemoveRows(); virtual void Dispatch(sal_uInt16 nId); - CellControllerRef Controller() const { return aController; } + const CellControllerRef& Controller() const { return aController; } EditBrowseBoxFlags GetBrowserFlags() const { return m_nBrowserFlags; } void SetBrowserFlags(EditBrowseBoxFlags nFlags); diff --git a/include/svtools/extcolorcfg.hxx b/include/svtools/extcolorcfg.hxx index 8db65e563a9a..be0982870171 100644 --- a/include/svtools/extcolorcfg.hxx +++ b/include/svtools/extcolorcfg.hxx @@ -49,8 +49,8 @@ public: ,m_nDefaultColor(_nDefaultColor) {} - inline OUString getName() const { return m_sName; } - inline OUString getDisplayName() const { return m_sDisplayName; } + inline const OUString& getName() const { return m_sName; } + inline const OUString& getDisplayName() const { return m_sDisplayName; } inline sal_Int32 getColor() const { return m_nColor; } inline sal_Int32 getDefaultColor() const { return m_nDefaultColor; } diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx index ef04c004c44e..5cc8bd3f4230 100644 --- a/include/svtools/fmtfield.hxx +++ b/include/svtools/fmtfield.hxx @@ -184,7 +184,7 @@ public: OUString GetTextValue() const; void SetDefaultText(const OUString& rDefault) { m_sDefaultText = rDefault; } - OUString GetDefaultText() const { return m_sDefaultText; } + const OUString& GetDefaultText() const { return m_sDefaultText; } // The last colour from the Formatter's last output operation. Output operations get triggered by: // SetValue, SetTextValue, SetTextFormatted, also indirectly via SetMin - / -MaxValue @@ -285,7 +285,7 @@ class DoubleCurrencyField : public FormattedField public: DoubleCurrencyField(vcl::Window* pParent, WinBits nStyle = 0); - OUString getCurrencySymbol() const { return m_sCurrencySymbol; } + const OUString& getCurrencySymbol() const { return m_sCurrencySymbol; } void setCurrencySymbol(const OUString& rSymbol); bool getPrependCurrSym() const { return m_bPrependCurrSym; } diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx index f5e94b278be0..517aca59ef18 100644 --- a/include/svtools/grfmgr.hxx +++ b/include/svtools/grfmgr.hxx @@ -394,12 +394,12 @@ public: bool HasLink() const { return !maLink.isEmpty(); } void SetLink(); void SetLink( const OUString& rLink ); - OUString GetLink() const { return maLink; } + const OUString& GetLink() const { return maLink; } bool HasUserData() const { return !maUserData.isEmpty(); } void SetUserData(); void SetUserData( const OUString& rUserData ); - OUString GetUserData() const { return maUserData; } + const OUString& GetUserData() const { return maUserData; } OString GetUniqueID() const; diff --git a/include/svtools/inettbc.hxx b/include/svtools/inettbc.hxx index e6435f1a2ce6..1b39f8fb8720 100644 --- a/include/svtools/inettbc.hxx +++ b/include/svtools/inettbc.hxx @@ -87,7 +87,7 @@ public: { bIsAutoCompleteEnabled = _bEnable; } void SetPlaceHolder( const OUString& sPlaceHolder ) { aPlaceHolder = sPlaceHolder; } - OUString GetPlaceHolder() { return aPlaceHolder; } + const OUString& GetPlaceHolder() { return aPlaceHolder; } bool MatchesPlaceHolder( const OUString& sToMatch ) const { return ( !aPlaceHolder.isEmpty() ) && ( aPlaceHolder == sToMatch ); } }; diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx index ec6e0e93750b..907197ca3043 100644 --- a/include/svtools/ivctrl.hxx +++ b/include/svtools/ivctrl.hxx @@ -121,12 +121,12 @@ public: SvxIconChoiceCtrlEntry( const OUString& rText, const Image& rImage ); ~SvxIconChoiceCtrlEntry () {} - Image GetImage () const { return aImage; } + const Image& GetImage () const { return aImage; } void SetText ( const OUString& rText ) { aText = rText; } - OUString GetText () const { return aText; } + const OUString& GetText () const { return aText; } OUString SVT_DLLPUBLIC GetDisplayText() const; void SetQuickHelpText( const OUString& rText ) { aQuickHelpText = rText; } - OUString GetQuickHelpText() const { return aQuickHelpText; } + const OUString& GetQuickHelpText() const { return aQuickHelpText; } void SetUserData ( void* _pUserData ) { pUserData = _pUserData; } void* GetUserData () { return pUserData; } diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 775f26dbc288..620f3f3f9dcb 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -694,8 +694,8 @@ private: protected: long GetRulerVirHeight() const { return mnVirHeight;} - MapMode GetCurrentMapMode() const { return maMapMode; } - RulerUnitData GetCurrentRulerUnit() const; + const MapMode& GetCurrentMapMode() const { return maMapMode; } + const RulerUnitData& GetCurrentRulerUnit() const; public: Ruler( vcl::Window* pParent, WinBits nWinStyle = WB_STDRULER ); @@ -726,7 +726,7 @@ public: long GetPageOffset() const; void SetBorderPos( long nOff = 0 ); long GetBorderOffset() const { return mnBorderOff; } - Rectangle GetExtraRect() const { return maExtraRect; } + const Rectangle& GetExtraRect() const { return maExtraRect; } void SetUnit( FieldUnit eNewUnit ); FieldUnit GetUnit() const { return meUnit; } @@ -750,7 +750,7 @@ public: long GetClickPos() const { return mnDragPos; } RulerType GetClickType() const { return meDragType; } - RulerSelection GetHoverSelection() const { return maHoverSelection; } + const RulerSelection& GetHoverSelection() const { return maHoverSelection; } using Window::GetType; RulerType GetType( const Point& rPos, sal_uInt16* pAryPos = nullptr ); diff --git a/include/svtools/simptabl.hxx b/include/svtools/simptabl.hxx index fa3fd950135a..55d21fd64741 100644 --- a/include/svtools/simptabl.hxx +++ b/include/svtools/simptabl.hxx @@ -114,7 +114,7 @@ public: sal_uInt16 GetSortedCol(){ return nSortCol;} SvLBoxItem* GetEntryAtPos( SvTreeListEntry* pEntry, sal_uInt16 nPos ) const; - CommandEvent GetCommandEvent() const { return aCEvt; } + const CommandEvent& GetCommandEvent() const { return aCEvt; } inline bool IsFocusOnCellEnabled() const { return IsCellFocusEnabled(); } void SetCommandHdl( const Link<SvSimpleTable*,void>& rLink ) { aCommandLink = rLink; } diff --git a/include/svtools/svlbitm.hxx b/include/svtools/svlbitm.hxx index 26bdb2123d9b..516e2311fdd5 100644 --- a/include/svtools/svlbitm.hxx +++ b/include/svtools/svlbitm.hxx @@ -115,7 +115,7 @@ public: SvTreeListEntry* pEntry, SvViewDataItem* pViewData) override; - OUString GetText() const + const OUString& GetText() const { return maText; } diff --git a/include/svtools/toolboxcontroller.hxx b/include/svtools/toolboxcontroller.hxx index 1f0f08100855..249ed1643951 100644 --- a/include/svtools/toolboxcontroller.hxx +++ b/include/svtools/toolboxcontroller.hxx @@ -162,9 +162,9 @@ class SVT_DLLPUBLIC ToolboxController : void unbindListener(); bool isBound() const; // TODO remove - css::uno::Reference< css::util::XURLTransformer > getURLTransformer() const { return m_xUrlTransformer;} + const css::uno::Reference< css::util::XURLTransformer >& getURLTransformer() const { return m_xUrlTransformer;} // TODO remove - css::uno::Reference< css::awt::XWindow > getParent() const { return m_xParentWindow;} + const css::uno::Reference< css::awt::XWindow >& getParent() const { return m_xParentWindow;} bool m_bInitialized : 1, m_bDisposed : 1; diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 77dbc23e9050..4ce6da90f46b 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -677,7 +677,7 @@ public: static const Image& GetCollapsedEntryBmp(const SvTreeListEntry* _pEntry ); void SetCheckButtonHdl( const Link<SvTreeListBox*,void>& rLink ) { aCheckButtonHdl=rLink; } - Link<SvTreeListBox*,void> GetCheckButtonHdl() const { return aCheckButtonHdl; } + const Link<SvTreeListBox*,void>& GetCheckButtonHdl() const { return aCheckButtonHdl; } virtual void CheckButtonHdl(); void SetSublistOpenWithReturn(); // open/close sublist with return/enter diff --git a/include/svtools/treelistentry.hxx b/include/svtools/treelistentry.hxx index c5c523ce85b6..7467dbaf8914 100644 --- a/include/svtools/treelistentry.hxx +++ b/include/svtools/treelistentry.hxx @@ -113,7 +113,7 @@ public: void SetMarked( bool IsMarked ) { bIsMarked = IsMarked; } void SetBackColor( const Color& aColor ) { maBackColor = aColor; } - Color GetBackColor() const { return maBackColor; } + const Color& GetBackColor() const { return maBackColor; } }; #endif diff --git a/include/svtools/viewdataentry.hxx b/include/svtools/viewdataentry.hxx index 18c4fe16d1b4..15acf855a882 100644 --- a/include/svtools/viewdataentry.hxx +++ b/include/svtools/viewdataentry.hxx @@ -77,7 +77,7 @@ public: SvViewDataItem& GetItem(size_t nPos); void SetPaintRectangle(Rectangle aRectangle); - Rectangle GetPaintRectangle() const; + const Rectangle& GetPaintRectangle() const; }; diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx index f03ebcf317ea..6f612ef5b7cc 100644 --- a/svtools/source/config/helpopt.cxx +++ b/svtools/source/config/helpopt.cxx @@ -72,7 +72,7 @@ public: void SetWelcomeScreen( bool b ) { bWelcomeScreen = b; SetModified(); } bool IsWelcomeScreen() const { return bWelcomeScreen; } - OUString GetSystem() const { return aSystem; } + const OUString& GetSystem() const { return aSystem; } const OUString& GetHelpStyleSheet()const{return sHelpStyleSheet;} void SetHelpStyleSheet(const OUString& rStyleSheet){sHelpStyleSheet = rStyleSheet; SetModified();} diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx index be4e883d2af2..ce7eaa81693a 100644 --- a/svtools/source/config/optionsdrawinglayer.cxx +++ b/svtools/source/config/optionsdrawinglayer.cxx @@ -176,8 +176,8 @@ public: bool IsOverlayBuffer() const { return m_bOverlayBuffer;} bool IsPaintBuffer() const { return m_bPaintBuffer;} - Color GetStripeColorA() const { return m_bStripeColorA;} - Color GetStripeColorB() const { return m_bStripeColorB;} + const Color& GetStripeColorA() const { return m_bStripeColorA;} + const Color& GetStripeColorB() const { return m_bStripeColorB;} sal_uInt16 GetStripeLength() const { return m_nStripeLength;} // #i73602# diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 666c2a0044c4..90a604c463e1 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -200,7 +200,7 @@ public: void EnableAutoResize() { mbAutoResize = true; } void EnableDelete( bool bEnable ) { mbEnableDelete = bEnable; } - Reference< XCommandEnvironment > GetCommandEnvironment() const { return mxCmdEnv; } + const Reference< XCommandEnvironment >& GetCommandEnvironment() const { return mxCmdEnv; } DECL_LINK_TYPED(ResetQuickSearch_Impl, Timer *, void); diff --git a/svtools/source/contnr/viewdataentry.cxx b/svtools/source/contnr/viewdataentry.cxx index f7fe1e1abff4..2644ccfedcc7 100644 --- a/svtools/source/contnr/viewdataentry.cxx +++ b/svtools/source/contnr/viewdataentry.cxx @@ -96,7 +96,7 @@ void SvViewDataEntry::SetPaintRectangle(Rectangle aRectangle) maPaintRectangle = aRectangle; } -Rectangle SvViewDataEntry::GetPaintRectangle() const +const Rectangle& SvViewDataEntry::GetPaintRectangle() const { return maPaintRectangle; } diff --git a/svtools/source/control/breadcrumb.cxx b/svtools/source/control/breadcrumb.cxx index edbe22de1bb9..f743b2fc56ba 100644 --- a/svtools/source/control/breadcrumb.cxx +++ b/svtools/source/control/breadcrumb.cxx @@ -80,7 +80,7 @@ void Breadcrumb::SetClickHdl( const Link<Breadcrumb*,void>& rLink ) m_aClickHdl = rLink; } -OUString Breadcrumb::GetHdlURL() +const OUString& Breadcrumb::GetHdlURL() { return m_sClickedURL; } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 5af99b7f18bb..712735789496 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -2810,7 +2810,7 @@ bool Ruler::GetTextRTL() return mpData->bTextRTL; } -RulerUnitData Ruler::GetCurrentRulerUnit() const +const RulerUnitData& Ruler::GetCurrentRulerUnit() const { return aImplRulerUnitTab[mnUnitIndex]; } diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 24e4d375105d..84cc51660e9a 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -109,7 +109,7 @@ public: virtual ~UnoTreeListItem(); void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ) override; void SetImage( const Image& rImage ); - OUString GetGraphicURL() const { return maGraphicURL;} + const OUString& GetGraphicURL() const { return maGraphicURL;} void SetGraphicURL( const OUString& rGraphicURL ); virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override; |