[Libreoffice-commits] core.git: 18 commits - basegfx/source basic/inc basic/source canvas/source comphelper/source compilerplugins/clang connectivity/source dbaccess/source editeng/source filter/source include/basegfx include/basic include/canvas include/codemaker include/comphelper include/connectivity include/dbaccess include/drawinglayer include/editeng include/filter include/formula include/jvmaccess include/oox include/sax include/sfx2 include/svl include/svtools jvmaccess/source oox/inc oox/source sax/source sfx2/inc sfx2/source svl/source svtools/source
Noel Grandin
noel at peralex.com
Wed Apr 13 11:28:45 UTC 2016
basegfx/source/polygon/b2dpolygontriangulator.cxx | 2
basic/inc/sbstdobj.hxx | 4
basic/source/basmgr/basmgr.cxx | 2
basic/source/inc/dlgcont.hxx | 4
basic/source/inc/image.hxx | 2
basic/source/inc/runtime.hxx | 2
basic/source/inc/sbunoobj.hxx | 10
canvas/source/cairo/cairo_devicehelper.hxx | 2
canvas/source/cairo/cairo_spritedevicehelper.hxx | 2
canvas/source/opengl/ogl_bitmapcanvashelper.hxx | 2
canvas/source/tools/pagemanager.hxx | 2
canvas/source/vcl/devicehelper.hxx | 2
canvas/source/vcl/spritedevicehelper.hxx | 2
comphelper/source/misc/accimplaccess.cxx | 2
comphelper/source/misc/logging.cxx | 6
compilerplugins/clang/passstuffbyref.cxx | 110 ++++++++--
connectivity/source/drivers/firebird/Connection.hxx | 2
connectivity/source/drivers/mork/MDriver.hxx | 4
connectivity/source/drivers/mork/MTable.hxx | 4
connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx | 2
connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx | 4
connectivity/source/inc/TConnection.hxx | 2
connectivity/source/inc/calc/CConnection.hxx | 2
connectivity/source/inc/dbase/dindexnode.hxx | 4
connectivity/source/inc/file/FConnection.hxx | 2
connectivity/source/inc/file/FDriver.hxx | 2
connectivity/source/inc/file/FTable.hxx | 4
connectivity/source/inc/file/fcomp.hxx | 2
connectivity/source/inc/hsqldb/HCatalog.hxx | 2
connectivity/source/inc/mysql/YCatalog.hxx | 2
connectivity/source/inc/odbc/OBoundParam.hxx | 2
connectivity/source/inc/odbc/ODriver.hxx | 2
connectivity/source/manager/mdrivermanager.cxx | 8
dbaccess/source/core/api/RowSetCache.hxx | 2
dbaccess/source/core/api/RowSetCacheIterator.hxx | 2
dbaccess/source/core/api/RowSetRow.hxx | 2
dbaccess/source/core/dataaccess/ModelImpl.hxx | 4
dbaccess/source/core/dataaccess/documentdefinition.cxx | 4
dbaccess/source/core/inc/ContentHelper.hxx | 2
dbaccess/source/core/inc/PropertyForward.hxx | 2
dbaccess/source/core/inc/TableDeco.hxx | 2
dbaccess/source/core/inc/definitioncontainer.hxx | 2
dbaccess/source/core/inc/userinformation.hxx | 2
dbaccess/source/filter/xml/xmlExport.hxx | 2
dbaccess/source/filter/xml/xmlfilter.hxx | 2
dbaccess/source/inc/OAuthenticationContinuation.hxx | 4
dbaccess/source/ui/browser/brwctrlr.cxx | 2
dbaccess/source/ui/control/RelationControl.cxx | 2
dbaccess/source/ui/dlg/DbAdminImpl.hxx | 2
dbaccess/source/ui/dlg/admincontrols.cxx | 4
dbaccess/source/ui/dlg/dbfindex.hxx | 2
dbaccess/source/ui/dlg/dlgsave.cxx | 2
dbaccess/source/ui/dlg/generalpage.hxx | 2
dbaccess/source/ui/dlg/odbcconfig.hxx | 2
dbaccess/source/ui/dlg/sqlmessage.cxx | 2
dbaccess/source/ui/inc/CollectionView.hxx | 2
dbaccess/source/ui/inc/ConnectionLine.hxx | 2
dbaccess/source/ui/inc/ConnectionLineData.hxx | 2
dbaccess/source/ui/inc/FieldControls.hxx | 8
dbaccess/source/ui/inc/FieldDescriptions.hxx | 2
dbaccess/source/ui/inc/JoinTableView.hxx | 4
dbaccess/source/ui/inc/QueryDesignView.hxx | 4
dbaccess/source/ui/inc/TableConnection.hxx | 2
dbaccess/source/ui/inc/TableConnectionData.hxx | 6
dbaccess/source/ui/inc/TableController.hxx | 4
dbaccess/source/ui/inc/TableDesignView.hxx | 2
dbaccess/source/ui/inc/TableFieldDescription.hxx | 10
dbaccess/source/ui/inc/TableWindow.hxx | 6
dbaccess/source/ui/inc/TableWindowData.hxx | 10
dbaccess/source/ui/inc/TypeInfo.hxx | 2
dbaccess/source/ui/inc/WCopyTable.hxx | 14 -
dbaccess/source/ui/inc/brwctrlr.hxx | 12 -
dbaccess/source/ui/inc/brwview.hxx | 4
dbaccess/source/ui/inc/charsets.hxx | 4
dbaccess/source/ui/inc/curledit.hxx | 2
dbaccess/source/ui/inc/dlgsave.hxx | 2
dbaccess/source/ui/inc/formadapter.hxx | 2
dbaccess/source/ui/inc/paramdialog.hxx | 2
dbaccess/source/ui/inc/querycontainerwindow.hxx | 2
dbaccess/source/ui/inc/querycontroller.hxx | 2
dbaccess/source/ui/inc/queryorder.hxx | 2
dbaccess/source/ui/inc/sbamultiplex.hxx | 2
dbaccess/source/ui/inc/stringlistitem.hxx | 2
dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 2
dbaccess/source/ui/misc/dsmeta.cxx | 2
dbaccess/source/ui/tabledesign/TEditControl.hxx | 2
dbaccess/source/ui/uno/ColumnModel.hxx | 2
editeng/source/editeng/editeng.cxx | 4
editeng/source/editeng/impedit.hxx | 14 -
filter/source/msfilter/svdfppt.cxx | 2
filter/source/placeware/tempfile.hxx | 2
filter/source/svg/b2dellipse.hxx | 4
filter/source/xsltfilter/LibXSLTTransformer.hxx | 6
include/basegfx/curve/b2dcubicbezier.hxx | 8
include/basegfx/tools/unopolypolygon.hxx | 2
include/basic/basmgr.hxx | 4
include/basic/sbmod.hxx | 2
include/basic/sbstar.hxx | 2
include/canvas/base/bufferedgraphicdevicebase.hxx | 2
include/canvas/base/canvascustomspritehelper.hxx | 4
include/canvas/spriteredrawmanager.hxx | 4
include/codemaker/global.hxx | 4
include/comphelper/accessiblewrapper.hxx | 2
include/comphelper/accimplaccess.hxx | 2
include/connectivity/FValue.hxx | 2
include/connectivity/ParameterCont.hxx | 2
include/connectivity/dbcharset.hxx | 2
include/connectivity/sqliterator.hxx | 8
include/connectivity/sqlscan.hxx | 2
include/dbaccess/dataview.hxx | 2
include/dbaccess/genericcontroller.hxx | 2
include/drawinglayer/primitive3d/groupprimitive3d.hxx | 2
include/drawinglayer/primitive3d/polygonprimitive3d.hxx | 2
include/drawinglayer/primitive3d/sdrprimitive3d.hxx | 2
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
include/filter/msfilter/escherex.hxx | 2
include/filter/msfilter/mstoolbar.hxx | 4
include/filter/msfilter/svdfppt.hxx | 2
include/formula/FormulaCompiler.hxx | 2
include/formula/formdata.hxx | 2
include/jvmaccess/unovirtualmachine.hxx | 2
include/oox/core/fastparser.hxx | 2
include/oox/drawingml/color.hxx | 4
include/oox/drawingml/shape.hxx | 10
include/oox/drawingml/shapecontext.hxx | 2
include/oox/export/chartexport.hxx | 2
include/oox/export/drawingml.hxx | 2
include/oox/export/vmlexport.hxx | 2
include/oox/helper/attributelist.hxx | 2
include/oox/helper/grabbagstack.hxx | 2
include/oox/helper/propertyset.hxx | 2
include/oox/ole/axcontrol.hxx | 2
include/oox/ole/vbacontrol.hxx | 4
include/oox/ppt/comments.hxx | 4
include/oox/ppt/pptimport.hxx | 4
include/oox/ppt/slidepersist.hxx | 28 +-
include/sax/tools/documenthandleradapter.hxx | 4
include/sfx2/bindings.hxx | 2
include/sfx2/childwin.hxx | 2
include/sfx2/dinfdlg.hxx | 28 +-
include/sfx2/docfile.hxx | 2
include/sfx2/dockwin.hxx | 4
include/sfx2/event.hxx | 4
include/sfx2/filedlghelper.hxx | 2
include/sfx2/frame.hxx | 4
include/sfx2/ipclient.hxx | 4
include/sfx2/lnkbase.hxx | 2
include/sfx2/minfitem.hxx | 6
include/sfx2/objsh.hxx | 2
include/sfx2/sidebar/Panel.hxx | 2
include/sfx2/sidebar/SidebarController.hxx | 2
include/sfx2/sidebar/TitleBar.hxx | 2
include/sfx2/tabdlg.hxx | 2
include/sfx2/titledockwin.hxx | 2
include/sfx2/viewsh.hxx | 2
include/svl/cntwall.hxx | 2
include/svl/globalnameitem.hxx | 2
include/svl/zforlist.hxx | 2
include/svtools/breadcrumb.hxx | 2
include/svtools/calendar.hxx | 2
include/svtools/ctrlbox.hxx | 2
include/svtools/editbrowsebox.hxx | 2
include/svtools/extcolorcfg.hxx | 4
include/svtools/fmtfield.hxx | 4
include/svtools/grfmgr.hxx | 4
include/svtools/inettbc.hxx | 2
include/svtools/ivctrl.hxx | 6
include/svtools/ruler.hxx | 8
include/svtools/simptabl.hxx | 2
include/svtools/svlbitm.hxx | 2
include/svtools/toolboxcontroller.hxx | 4
include/svtools/treelistbox.hxx | 2
include/svtools/treelistentry.hxx | 2
include/svtools/viewdataentry.hxx | 2
jvmaccess/source/unovirtualmachine.cxx | 2
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
sax/source/tools/CachedOutputStream.hxx | 2
sfx2/inc/sorgitm.hxx | 2
sfx2/source/appl/childwin.cxx | 2
sfx2/source/appl/helpinterceptor.hxx | 4
sfx2/source/appl/newhelp.hxx | 6
sfx2/source/control/bindings.cxx | 2
sfx2/source/dialog/dockwin.cxx | 2
sfx2/source/dialog/filedlghelper.cxx | 2
sfx2/source/dialog/templdlg.cxx | 4
sfx2/source/doc/docfile.cxx | 2
sfx2/source/doc/doctempl.cxx | 4
sfx2/source/doc/doctemplates.cxx | 4
sfx2/source/doc/objcont.cxx | 2
sfx2/source/inc/statcach.hxx | 2
sfx2/source/inc/workwin.hxx | 2
sfx2/source/view/frame.cxx | 2
sfx2/source/view/ipclient.cxx | 4
sfx2/source/view/viewprn.cxx | 2
svl/source/inc/passwordcontainer.hxx | 2
svl/source/numbers/zforlist.cxx | 2
svtools/source/config/helpopt.cxx | 2
svtools/source/config/optionsdrawinglayer.cxx | 4
svtools/source/contnr/fileview.cxx | 2
svtools/source/contnr/viewdataentry.cxx | 2
svtools/source/control/breadcrumb.cxx | 2
svtools/source/control/ruler.cxx | 2
svtools/source/uno/treecontrolpeer.cxx | 2
216 files changed, 443 insertions(+), 377 deletions(-)
New commits:
commit 19b34c0039c6293f9b37aa70f8055aa2be28ba09
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 11:30:11 2016 +0200
loplugin:passstuffbyref in svtools
Change-Id: Ie166eaef65e56fafe4e57a5559b587d7558d7aa4
diff --git a/include/svtools/breadcrumb.hxx b/include/svtools/breadcrumb.hxx
index ac109ec..6eff944 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 029afb2..12e60cf 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 acb6824..1e7cfad 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 d28511e..497321e 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 8db65e5..be09828 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 ef04c00..5cc8bd3 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 f5e94b2..517aca5 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 e6435f1..1b39f8f 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 ec6e0e9..907197c 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 775f26d..620f3f3 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 fa3fd95..55d21fd 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 26bdb21..516e231 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 1f0f081..249ed16 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 77dbc23..4ce6da9 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 c5c523c..7467dba 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 18c4fe1..15acf85 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 f03ebcf..6f612ef 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 be4e883..ce7eaa8 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 666c2a0..90a604c 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 f7fe1e1..2644ccf 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 edbe22d..f743b2f 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 5af99b7..7127357 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 24e4d37..84cc516 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;
commit fe8896bab01ccb595c993e54866a01f554b54f4f
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 11:29:29 2016 +0200
loplugin:passstuffbyref in svl
Change-Id: I1434d96ae800d8e155262831472cf632d640b4c5
diff --git a/include/svl/cntwall.hxx b/include/svl/cntwall.hxx
index 184cb4c..cbea636 100644
--- a/include/svl/cntwall.hxx
+++ b/include/svl/cntwall.hxx
@@ -57,7 +57,7 @@ public:
void SetStyle( sal_uInt16 nStyle ) { _nStyle = nStyle; }
const OUString& GetBitmapURL() const { return _aURL; }
- Color GetColor() const { return _nColor; }
+ const Color& GetColor() const { return _nColor; }
sal_uInt16 GetStyle() const { return _nStyle; }
};
diff --git a/include/svl/globalnameitem.hxx b/include/svl/globalnameitem.hxx
index 94011d0..9547b4b 100644
--- a/include/svl/globalnameitem.hxx
+++ b/include/svl/globalnameitem.hxx
@@ -36,7 +36,7 @@ public:
virtual bool operator==( const SfxPoolItem& ) const override;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
- SvGlobalName GetValue() const { return m_aName; }
+ const SvGlobalName& GetValue() const { return m_aName; }
virtual bool PutValue ( const css::uno::Any& rVal,
sal_uInt8 nMemberId ) override;
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 2b98347..a18354f 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -914,7 +914,7 @@ public:
// new format codes are appended.
void ReplaceSystemCL( LanguageType eOldLanguage );
- css::uno::Reference<css::uno::XComponentContext> GetComponentContext() const;
+ const css::uno::Reference<css::uno::XComponentContext>& GetComponentContext() const;
//! The following method is not to be used from outside but must be
//! public for the InputScanner.
diff --git a/svl/source/inc/passwordcontainer.hxx b/svl/source/inc/passwordcontainer.hxx
index 55b7101..884a451 100644
--- a/svl/source/inc/passwordcontainer.hxx
+++ b/svl/source/inc/passwordcontainer.hxx
@@ -124,7 +124,7 @@ public:
return *this;
}
- OUString GetUserName() const
+ const OUString& GetUserName() const
{
return m_aName;
}
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index e7fcccc..0fc4d3c 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -516,7 +516,7 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
ImpGenerateAdditionalFormats( nCLOffset, aNumberFormatCode, true );
}
-css::uno::Reference<css::uno::XComponentContext> SvNumberFormatter::GetComponentContext() const
+const css::uno::Reference<css::uno::XComponentContext>& SvNumberFormatter::GetComponentContext() const
{
return m_xContext;
}
commit 523036daaddf466eee46183bbec9a71d45c48a41
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 11:29:05 2016 +0200
loplugin:passstuffbyref in sfx2
Change-Id: I8c9d6e972f74ee04c8befda3b4cabb6e9b6b2054
diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index 256b210..b31d4e5 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -186,7 +186,7 @@ public:
void Release( SfxControllerItem& rBinding );
SfxDispatcher* GetDispatcher() const
{ return pDispatcher; }
- css::uno::Reference< css::frame::XDispatchRecorder > GetRecorder() const;
+ const css::uno::Reference< css::frame::XDispatchRecorder >& GetRecorder() const;
css::uno::Reference < css::frame::XDispatch >
GetDispatch( const SfxSlot*, const css::util::URL& aURL, bool bMasterCommand );
SAL_DLLPRIVATE void ContextChanged_Impl();
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 8469fbc..140bd0d 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -199,7 +199,7 @@ public:
bool WantsFocus() const;
virtual bool QueryClose();
- css::uno::Reference< css::frame::XFrame > GetFrame();
+ const css::uno::Reference< css::frame::XFrame >& GetFrame();
void SetFrame( const css::uno::Reference< css::frame::XFrame > & );
SAL_DLLPRIVATE static void InitializeChildWinFactory_Impl(sal_uInt16, SfxChildWinInfo&);
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 5cd2c50..f7a202e 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -106,30 +106,30 @@ public:
void setAutoloadEnabled(bool i_val) { m_isAutoloadEnabled = i_val; }
sal_Int32 getAutoloadDelay() const { return m_AutoloadDelay; }
void setAutoloadDelay(sal_Int32 i_val) { m_AutoloadDelay = i_val; }
- OUString getAutoloadURL() const { return m_AutoloadURL; }
+ const OUString& getAutoloadURL() const { return m_AutoloadURL; }
void setAutoloadURL(const OUString& i_val) { m_AutoloadURL = i_val; }
- OUString getDefaultTarget() const { return m_DefaultTarget; }
+ const OUString& getDefaultTarget() const { return m_DefaultTarget; }
void setDefaultTarget(const OUString& i_val) { m_DefaultTarget = i_val; }
- OUString getTemplateName() const { return m_TemplateName; }
- OUString getAuthor() const { return m_Author; }
+ const OUString& getTemplateName() const { return m_TemplateName; }
+ const OUString& getAuthor() const { return m_Author; }
void setAuthor(const OUString& i_val) { m_Author = i_val; }
- css::util::DateTime
+ const css::util::DateTime&
getCreationDate() const { return m_CreationDate; }
void setCreationDate(const css::util::DateTime& i_val) {
m_CreationDate = i_val;
}
- OUString getModifiedBy() const { return m_ModifiedBy; }
+ const OUString& getModifiedBy() const { return m_ModifiedBy; }
void setModifiedBy(const OUString& i_val) { m_ModifiedBy = i_val; }
- css::util::DateTime
+ const css::util::DateTime&
getModificationDate() const { return m_ModificationDate; }
void setModificationDate(const css::util::DateTime& i_val) {
m_ModificationDate = i_val;
}
- OUString getPrintedBy() const { return m_PrintedBy; }
+ const OUString& getPrintedBy() const { return m_PrintedBy; }
void setPrintedBy(const OUString& i_val) { m_PrintedBy = i_val; }
- css::util::DateTime
+ const css::util::DateTime&
getPrintDate() const { return m_PrintDate; }
void setPrintDate(const css::util::DateTime& i_val) {
m_PrintDate = i_val;
@@ -138,13 +138,13 @@ public:
void setEditingCycles(sal_Int16 i_val) { m_EditingCycles = i_val; }
sal_Int32 getEditingDuration() const { return m_EditingDuration; }
void setEditingDuration(sal_Int32 i_val) { m_EditingDuration = i_val; }
- OUString getDescription() const { return m_Description; }
+ const OUString& getDescription() const { return m_Description; }
void setDescription(const OUString& i_val) { m_Description = i_val; }
- OUString getKeywords() const { return m_Keywords; }
+ const OUString& getKeywords() const { return m_Keywords; }
void setKeywords(const OUString& i_val) { m_Keywords = i_val; }
- OUString getSubject() const { return m_Subject; }
+ const OUString& getSubject() const { return m_Subject; }
void setSubject(const OUString& i_val) { m_Subject = i_val; }
- OUString getTitle() const { return m_Title; }
+ const OUString& getTitle() const { return m_Title; }
void setTitle(const OUString& i_val) { m_Title = i_val; }
/// reset user-specific data (author, modified-by, ...)
@@ -165,7 +165,7 @@ public:
void AddCustomProperty( const OUString& sName,
const css::uno::Any& rValue );
- css::uno::Sequence< css::document::CmisProperty >
+ const css::uno::Sequence< css::document::CmisProperty >&
GetCmisProperties() const { return m_aCmisProperties;}
void SetCmisProperties(const css::uno::Sequence< css::document::CmisProperty >& cmisProps );
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 150b037..487d3c3 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -117,7 +117,7 @@ public:
* Does not take ownership of pFlt but pFlt needs to be around as long as the SfxMedium instance.
*/
void SetFilter(const std::shared_ptr<const SfxFilter>& pFilter);
- std::shared_ptr<const SfxFilter> GetFilter() const;
+ const std::shared_ptr<const SfxFilter>& GetFilter() const;
std::shared_ptr<const SfxFilter> GetOrigFilter() const;
const OUString& GetOrigURL() const;
diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx
index 40a7f80..110745f 100644
--- a/include/sfx2/dockwin.hxx
+++ b/include/sfx2/dockwin.hxx
@@ -97,11 +97,11 @@ public:
sal_uInt16 GetType() const { return pMgr->GetType(); }
SfxChildAlignment GetAlignment() const { return pMgr->GetAlignment(); }
void SetAlignment(SfxChildAlignment eAlign) { pMgr->SetAlignment(eAlign); }
- Size GetFloatingSize() const { return aFloatSize; }
+ const Size& GetFloatingSize() const { return aFloatSize; }
void SetFloatingSize(const Size& rSize) { aFloatSize=rSize; }
void SetMinOutputSizePixel( const Size& rSize );
- Size GetMinOutputSizePixel() const;
+ const Size& GetMinOutputSizePixel() const;
virtual bool Notify( NotifyEvent& rNEvt ) override;
DECL_LINK_TYPED(TimerHdl, Idle *, void);
diff --git a/include/sfx2/event.hxx b/include/sfx2/event.hxx
index 37a71b3..eae08b3 100644
--- a/include/sfx2/event.hxx
+++ b/include/sfx2/event.hxx
@@ -50,7 +50,7 @@ public:
sal_uInt16 GetEventId() const
{ return nEventId; }
- OUString GetEventName() const
+ const OUString& GetEventName() const
{ return aEventName; }
SfxObjectShell* GetObjShell() const
@@ -73,7 +73,7 @@ public:
, xViewController( xController )
{}
- css::uno::Reference< css::frame::XController2 > GetController() const
+ const css::uno::Reference< css::frame::XController2 >& GetController() const
{ return xViewController; }
};
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index 7bae388..5f4a24e 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -194,7 +194,7 @@ public:
OUString GetDisplayDirectory() const;
ErrCode GetGraphic( Graphic& rGraphic ) const;
- css::uno::Reference < css::ui::dialogs::XFilePicker2 > GetFilePicker() const;
+ const css::uno::Reference < css::ui::dialogs::XFilePicker2 >& GetFilePicker() const;
// XFilePickerListener methods
void SAL_CALL FileSelectionChanged( const css::ui::dialogs::FilePickerEvent& aEvent );
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index ce2860d..df47419 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -143,7 +143,7 @@ public:
void GetTargetList( TargetList& ) const;
void UpdateDescriptor( SfxObjectShell *pDoc );
void Resize();
- css::uno::Reference< css::frame::XFrame >
+ const css::uno::Reference< css::frame::XFrame >&
GetFrameInterface() const;
void Appear();
void AppearWithUpdate();
@@ -234,7 +234,7 @@ class SFX2_DLLPUBLIC SfxUsrAnyItem : public SfxPoolItem
public:
static SfxPoolItem* CreateDefault();
SfxUsrAnyItem( sal_uInt16 nWhich, const css::uno::Any& rAny );
- css::uno::Any GetValue() const
+ const css::uno::Any& GetValue() const
{ return aValue; }
virtual bool operator==( const SfxPoolItem& ) const override;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index f94d706..3419f08 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -60,14 +60,14 @@ public:
SfxViewShell* GetViewShell() const { return m_pViewSh; }
vcl::Window* GetEditWin() const { return m_pEditWin; }
- css::uno::Reference < css::embed::XEmbeddedObject > GetObject() const;
+ const css::uno::Reference < css::embed::XEmbeddedObject >& GetObject() const;
void SetObject( const css::uno::Reference < css::embed::XEmbeddedObject >& rObject );
void SetObjectState( sal_Int32 );
bool IsObjectUIActive() const;
bool IsObjectInPlaceActive() const;
void DeactivateObject();
bool SetObjArea( const Rectangle & );
- Rectangle GetObjArea() const;
+ const Rectangle& GetObjArea() const;
Rectangle GetScaledObjArea() const;
void SetSizeScale( const Fraction & rScaleWidth, const Fraction & rScaleHeight );
void SetObjAreaAndScale( const Rectangle&, const Fraction&, const Fraction& );
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index 9a98ddc..36739c7 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -123,7 +123,7 @@ public:
SvLinkSource* GetObj() const { return xObj; }
void SetLinkSourceName( const OUString & rName );
- OUString GetLinkSourceName() const { return aLinkName;}
+ const OUString& GetLinkSourceName() const { return aLinkName;}
enum UpdateResult {
SUCCESS = 0,
diff --git a/include/sfx2/minfitem.hxx b/include/sfx2/minfitem.hxx
index 3356911..a80e575 100644
--- a/include/sfx2/minfitem.hxx
+++ b/include/sfx2/minfitem.hxx
@@ -47,15 +47,15 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
- OUString GetMethod() const
+ const OUString& GetMethod() const
{ return aMethodName; }
void SetMethod( const OUString& r )
{ aMethodName = r; }
- OUString GetModule() const
+ const OUString& GetModule() const
{ return aModuleName; }
void SetModule( const OUString& r )
{ aModuleName = r; }
- OUString GetLib() const
+ const OUString& GetLib() const
{ return aLibName; }
void SetLib( const OUString& r )
{ aLibName = r; }
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 86e891c..bcdbad4 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -431,7 +431,7 @@ public:
sal_uInt32 GetModifyPasswordHash() const;
bool SetModifyPasswordHash( sal_uInt32 nHash );
- css::uno::Sequence< css::beans::PropertyValue > GetModifyPasswordInfo() const;
+ const css::uno::Sequence< css::beans::PropertyValue >& GetModifyPasswordInfo() const;
bool SetModifyPasswordInfo( const css::uno::Sequence< css::beans::PropertyValue >& aInfo );
static sal_uInt32 HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDoc );
diff --git a/include/sfx2/sidebar/Panel.hxx b/include/sfx2/sidebar/Panel.hxx
index 4d6490e..2cb5e6c 100644
--- a/include/sfx2/sidebar/Panel.hxx
+++ b/include/sfx2/sidebar/Panel.hxx
@@ -49,7 +49,7 @@ public:
PanelTitleBar* GetTitleBar() const;
bool IsTitleBarOptional() const { return mbIsTitleBarOptional;}
void SetUIElement (const css::uno::Reference<css::ui::XUIElement>& rxElement);
- css::uno::Reference<css::ui::XSidebarPanel> GetPanelComponent() const { return mxPanelComponent;}
+ const css::uno::Reference<css::ui::XSidebarPanel>& GetPanelComponent() const { return mxPanelComponent;}
css::uno::Reference<css::awt::XWindow> GetElementWindow();
void SetExpanded (const bool bIsExpanded);
bool IsExpanded() const { return mbIsExpanded;}
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index c968fec..6c65867 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -145,7 +145,7 @@ public:
// std::unique_ptr<ResourceManager> GetResourceManager() { return mpResourceManager;}
- Context GetCurrentContext() const { return maCurrentContext;}
+ const Context& GetCurrentContext() const { return maCurrentContext;}
bool IsDocumentReadOnly (void) const { return mbIsDocumentReadOnly;}
void SwitchToDeck ( const ::rtl::OUString& rsDeckId);
diff --git a/include/sfx2/sidebar/TitleBar.hxx b/include/sfx2/sidebar/TitleBar.hxx
index 1e1fae5..868e132 100644
--- a/include/sfx2/sidebar/TitleBar.hxx
+++ b/include/sfx2/sidebar/TitleBar.hxx
@@ -36,7 +36,7 @@ public:
virtual void dispose() override;
void SetTitle (const OUString& rsTitle);
- const OUString GetTitle() {return msTitle; }
+ const OUString& GetTitle() {return msTitle; }
void SetIcon (const Image& rIcon);
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 382c250..bf3a877 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -250,7 +250,7 @@ public:
virtual sfxpg DeactivatePage( SfxItemSet* pSet );
void SetUserData(const OUString& rString)
{ aUserString = rString; }
- OUString GetUserData() { return aUserString; }
+ const OUString& GetUserData() { return aUserString; }
virtual void FillUserData();
virtual bool IsReadOnly() const;
virtual void PageCreated (const SfxAllItemSet& aSet);
diff --git a/include/sfx2/titledockwin.hxx b/include/sfx2/titledockwin.hxx
index 5118184..4b21a8e 100644
--- a/include/sfx2/titledockwin.hxx
+++ b/include/sfx2/titledockwin.hxx
@@ -53,7 +53,7 @@ namespace sfx2
/** Return the border that is painted around the inner window as
decoration.
*/
- SvBorder GetDecorationBorder() const { return m_aBorder; }
+ const SvBorder& GetDecorationBorder() const { return m_aBorder; }
protected:
// Window overridables
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 53dcd84..8abf52c 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -287,7 +287,7 @@ public:
void ExecPrint( const css::uno::Sequence < css::beans::PropertyValue >&, bool, bool );
// Like ExecPrint(), but only sets up for printing. Use Printer::ExecutePrintJob() and Printer::FinishPrintJob() afterwards.
void StartPrint( const css::uno::Sequence < css::beans::PropertyValue >&, bool, bool );
- std::shared_ptr< vcl::PrinterController > GetPrinterController() const;
+ const std::shared_ptr< vcl::PrinterController >& GetPrinterController() const;
void AddRemoveClipboardListener( const css::uno::Reference < css::datatransfer::clipboard::XClipboardListener>&, bool );
css::uno::Reference< css::datatransfer::clipboard::XClipboardNotifier > GetClipboardNotifier();
diff --git a/sfx2/inc/sorgitm.hxx b/sfx2/inc/sorgitm.hxx
index 69c833e..45b5d79 100644
--- a/sfx2/inc/sorgitm.hxx
+++ b/sfx2/inc/sorgitm.hxx
@@ -38,7 +38,7 @@ public:
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
- OUString getLanguage() const { return aLanguage; };
+ const OUString& getLanguage() const { return aLanguage; };
};
#endif
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index c3e8218..d0c48f5 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -688,7 +688,7 @@ bool SfxChildWindow::QueryClose()
return bAllow;
}
-css::uno::Reference< css::frame::XFrame > SfxChildWindow::GetFrame()
+const css::uno::Reference< css::frame::XFrame >& SfxChildWindow::GetFrame()
{
return pImp->xFrame;
}
diff --git a/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index 8356c30..66a38ed 100644
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.hxx
@@ -74,7 +74,7 @@ public:
virtual ~HelpInterceptor_Impl();
void setInterception( const css::uno::Reference< css::frame::XFrame >& xFrame );
- OUString GetCurrentURL() const { return m_aCurrentURL; }
+ const OUString& GetCurrentURL() const { return m_aCurrentURL; }
const css::uno::Any& GetViewData()const {return m_aViewData;}
@@ -129,7 +129,7 @@ public:
throw( css::uno::RuntimeException, std::exception ) override;
void SetChangeHdl( const Link<HelpListener_Impl&,void>& rLink ) { aChangeLink = rLink; }
- OUString GetFactory() const { return aFactory; }
+ const OUString& GetFactory() const { return aFactory; }
};
// HelpStatusListener_Impl -----------------------------------------------------
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 93140f5..d340a84 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -151,7 +151,7 @@ public:
void SetDoubleClickHdl( const Link<ComboBox&,void>& rLink );
void SetFactory( const OUString& rFactory );
- inline OUString GetFactory() const { return sFactory; }
+ const OUString& GetFactory() const { return sFactory; }
OUString GetSelectEntry() const;
inline void SetFocusOnBox() { m_pIndexCB->GrabFocus(); }
inline bool HasFocusOnEdit() const { return m_pIndexCB->HasChildPathFocus(); }
@@ -470,7 +470,7 @@ public:
virtual void GetFocus() override;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
- inline css::uno::Reference < css::frame::XFrame2 >
+ const css::uno::Reference < css::frame::XFrame2 >&
getFrame() const { return xFrame; }
inline void SetSelectHdl( const Link<ToolBox *, void>& rLink ) { aToolBox->SetSelectHdl( rLink ); }
@@ -478,7 +478,7 @@ public:
void SelectSearchText( const OUString& rSearchText, bool _bIsFullWordSearch );
void SetPageStyleHeaderOff() const;
inline ToolBox& GetToolBox() { return *aToolBox.get(); }
- void CloseFrame();
+ void CloseFrame();
void DoSearch();
};
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 1833992..ccf5c2f 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -2085,7 +2085,7 @@ bool SfxBindings::ExecuteCommand_Impl( const OUString& rCommand )
return false;
}
-css::uno::Reference< css::frame::XDispatchRecorder > SfxBindings::GetRecorder() const
+const css::uno::Reference< css::frame::XDispatchRecorder >& SfxBindings::GetRecorder() const
{
return pImp->xRecorder;
}
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index caf0c64..a53ff86 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -1724,7 +1724,7 @@ void SfxDockingWindow::SetMinOutputSizePixel( const Size& rSize )
}
/** Set the minimum size which is returned.*/
-Size SfxDockingWindow::GetMinOutputSizePixel() const
+const Size& SfxDockingWindow::GetMinOutputSizePixel() const
{
return pImp->aMinSize;
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 9882d06..dd45218 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2537,7 +2537,7 @@ void FileDialogHelper::SetCurrentFilter( const OUString& rFilter )
mpImp->setFilter( sFilter );
}
-uno::Reference < XFilePicker2 > FileDialogHelper::GetFilePicker() const
+const uno::Reference < XFilePicker2 >& FileDialogHelper::GetFilePicker() const
{
return mpImp->mxFileDlg;
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 9bc9d6f..edbdcac 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -542,8 +542,8 @@ public:
void Put(StyleTree_Impl* pIns, sal_uIntPtr lPos=ULONG_MAX);
size_t Count();
- OUString getName() { return aName; }
- OUString getParent() { return aParent; }
+ const OUString& getName() { return aName; }
+ const OUString& getParent() { return aParent; }
StyleTree_Impl *operator[](size_t idx) const { return pChildren[idx]; }
};
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index c9ecec7..4362ddb 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2677,7 +2677,7 @@ void SfxMedium::SetFilter( const std::shared_ptr<const SfxFilter>& pFilter )
pImp->m_pFilter = pFilter;
}
-std::shared_ptr<const SfxFilter> SfxMedium::GetFilter() const
+const std::shared_ptr<const SfxFilter>& SfxMedium::GetFilter() const
{
return pImp->m_pFilter;
}
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 557278c..07a852a 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -231,9 +231,9 @@ public:
bool GetTitleFromURL( const OUString& rURL, OUString& aTitle );
bool InsertRegion( RegionData_Impl *pData, size_t nPos = size_t(-1) );
- OUString GetRootURL() const { return maRootURL; }
+ const OUString& GetRootURL() const { return maRootURL; }
- uno::Reference< XDocumentTemplates > getDocTemplates() { return mxTemplates; }
+ const uno::Reference< XDocumentTemplates >& getDocTemplates() { return mxTemplates; }
};
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 175354c1..14b427b 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -277,10 +277,10 @@ public:
~SfxDocTplService_Impl();
bool init() { if ( !mbIsInitialized ) init_Impl(); return mbIsInitialized; }
- Content getContent() const { return maRootContent; }
+ const Content& getContent() const { return maRootContent; }
void setLocale( const lang::Locale & rLocale );
- lang::Locale getLocale();
+ lang::Locale getLocale();
bool storeTemplate( const OUString& rGroupName,
const OUString& rTemplateName,
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index e6c0ee9..87769d5 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -622,7 +622,7 @@ bool SfxObjectShell::SetModifyPasswordHash( sal_uInt32 nHash )
return false;
}
-uno::Sequence< beans::PropertyValue > SfxObjectShell::GetModifyPasswordInfo() const
+const uno::Sequence< beans::PropertyValue >& SfxObjectShell::GetModifyPasswordInfo() const
{
return pImp->m_aModifyPasswordInfo;
}
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index 51d9e2a..c34c089 100644
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -105,7 +105,7 @@ public:
{ DBG_ASSERT( !pInternalController, "Only one internal controller allowed!" ); pInternalController = pCtrl; }
void ReleaseInternalController() { pInternalController = nullptr; }
SfxControllerItem* GetInternalController() const { return pInternalController; }
- css::uno::Reference < css::frame::XDispatch >
+ const css::uno::Reference < css::frame::XDispatch >&
GetInternalDispatch() const
{ return xMyDispatch; }
void SetInternalDispatch( const css::uno::Reference < css::frame::XDispatch >& rDisp )
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index e4fa1d6..dcc0fd3 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -304,7 +304,7 @@ public:
bool IsVisible_Impl( sal_uInt16 nMode ) const;
bool IsFloating( sal_uInt16 nId );
void SetActiveChild_Impl( vcl::Window *pChild );
- VclPtr<vcl::Window> GetActiveChild_Impl() const { return pActiveChild; }
+ const VclPtr<vcl::Window>& GetActiveChild_Impl() const { return pActiveChild; }
// Methods for StatusBar
void ResetStatusBar_Impl();
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 013bd14..6850a4e 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -702,7 +702,7 @@ css::uno::Reference< css::frame::XController > SfxFrame::GetController() const
return css::uno::Reference< css::frame::XController > ();
}
-css::uno::Reference< css::frame::XFrame > SfxFrame::GetFrameInterface() const
+const css::uno::Reference< css::frame::XFrame >& SfxFrame::GetFrameInterface() const
{
return pImp->xFrame;
}
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index cd3f783..a586a26 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -666,7 +666,7 @@ sal_Int64 SfxInPlaceClient::GetObjectMiscStatus() const
}
-uno::Reference < embed::XEmbeddedObject > SfxInPlaceClient::GetObject() const
+const uno::Reference < embed::XEmbeddedObject >& SfxInPlaceClient::GetObject() const
{
return m_pImp->m_xObject;
}
@@ -738,7 +738,7 @@ bool SfxInPlaceClient::SetObjArea( const Rectangle& rArea )
}
-Rectangle SfxInPlaceClient::GetObjArea() const
+const Rectangle& SfxInPlaceClient::GetObjArea() const
{
return m_pImp->m_aObjArea;
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 448c043..12018db 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -622,7 +622,7 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro
Printer::PrintJob( GetPrinterController(), aJobSetup );
}
-std::shared_ptr< vcl::PrinterController > SfxViewShell::GetPrinterController() const
+const std::shared_ptr< vcl::PrinterController >& SfxViewShell::GetPrinterController() const
{
return pImp->m_xPrinterController;
}
commit 746289bf97ee6eeaf8a1df6b040dd9ae29bab0ce
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 11:25:24 2016 +0200
loplugin:passstuffbyref in sax
Change-Id: I95f0a17b9b8bab592a60f6b5223b4668c5355275
diff --git a/include/sax/tools/documenthandleradapter.hxx b/include/sax/tools/documenthandleradapter.hxx
index b36a497..9f8f898 100644
--- a/include/sax/tools/documenthandleradapter.hxx
+++ b/include/sax/tools/documenthandleradapter.hxx
@@ -93,7 +93,7 @@ namespace sax
{
m_handler = delegate;
}
- css::uno::Reference< css::xml::sax::XDocumentHandler > SAL_CALL
+ const css::uno::Reference< css::xml::sax::XDocumentHandler >& SAL_CALL
getDelegate()
{
return m_handler;
@@ -215,7 +215,7 @@ namespace sax
{
m_handler = delegate;
}
- css::uno::Reference< css::xml::sax::XExtendedDocumentHandler > SAL_CALL
+ const css::uno::Reference< css::xml::sax::XExtendedDocumentHandler >& SAL_CALL
getDelegate()
{
return m_handler;
diff --git a/sax/source/tools/CachedOutputStream.hxx b/sax/source/tools/CachedOutputStream.hxx
index f32693e..b93abcb 100644
--- a/sax/source/tools/CachedOutputStream.hxx
+++ b/sax/source/tools/CachedOutputStream.hxx
@@ -51,7 +51,7 @@ public:
{}
~CachedOutputStream() {}
- css::uno::Reference< css::io::XOutputStream > getOutputStream() const
+ const css::uno::Reference< css::io::XOutputStream >& getOutputStream() const
{
return mxOutputStream;
}
commit d60d957a680d9c98823aac05facb652bf619a750
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 11:25:07 2016 +0200
loplugin:passstuffbyref in oox
Change-Id: Iec989e9060c77dd5b010224b37633179cee4f7e9
diff --git a/include/oox/core/fastparser.hxx b/include/oox/core/fastparser.hxx
index b1e4294..d8d2ced 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 98352cb..9f94c4d 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 c0c2510..63c0bbb 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 63c3bec..8ec0e69 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 7fa4664..c813ebf 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 fe2a8c7..e406ba7 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 4855f51..1c20534 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 2bde4a8..acb8709 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 aba5af2..8ad8bd4 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 669472a..1470cfc 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 87b8515..e8c879a 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 a50054e..daf3f1b 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 6766df2..a722ff3 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 1250303..35bfb91 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 1a61603..6fd7794 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; };
diff --git a/oox/inc/drawingml/table/tablecell.hxx b/oox/inc/drawingml/table/tablecell.hxx
index e936d07..313e153 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 88aa8a7..a29ea07 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 3c88772..81a14ba 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 9e7f3ca..7eae886 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 a2e430c..21dc10f 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 ed0cebf..a212bef 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 90fd3fb..b7dfb1d 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;
}
commit 299d938bf05faf60b848a9d4862e58bb42db3e65
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 11:23:43 2016 +0200
loplugin:passstuffbyref in jvmaccess
Change-Id: I0c5daabe31393db08654dd9f22abc757f6c67d4c
diff --git a/include/jvmaccess/unovirtualmachine.hxx b/include/jvmaccess/unovirtualmachine.hxx
index 3826999..8021814 100644
--- a/include/jvmaccess/unovirtualmachine.hxx
+++ b/include/jvmaccess/unovirtualmachine.hxx
@@ -74,7 +74,7 @@ public:
@return
The Java virtual machine wrapper. Will never be null.
*/
- rtl::Reference< jvmaccess::VirtualMachine > getVirtualMachine() const;
+ const rtl::Reference< jvmaccess::VirtualMachine >& getVirtualMachine() const;
/** Get the UNO class loader.
diff --git a/jvmaccess/source/unovirtualmachine.cxx b/jvmaccess/source/unovirtualmachine.cxx
index 0a48b1ee..8b6b27d 100644
--- a/jvmaccess/source/unovirtualmachine.cxx
+++ b/jvmaccess/source/unovirtualmachine.cxx
@@ -57,7 +57,7 @@ UnoVirtualMachine::UnoVirtualMachine(
}
}
-rtl::Reference< jvmaccess::VirtualMachine >
+const rtl::Reference< jvmaccess::VirtualMachine >&
UnoVirtualMachine::getVirtualMachine() const {
return m_virtualMachine;
}
commit 86d20ae1e5f54bb60042b085b8b8ef77f65ce17e
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 11:23:13 2016 +0200
loplugin:passstuffbyref in formula
Change-Id: I6a46110c6d0092b21e7b3a0245ccf11ca7ccac85
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx
index 2c96dee..fc912fc 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -207,7 +207,7 @@ public:
bool bEnglish );
/** Get current OpCodeMap in effect. */
- inline OpCodeMapPtr GetCurrentOpCodeMap() const { return mxSymbols; }
+ const OpCodeMapPtr& GetCurrentOpCodeMap() const { return mxSymbols; }
/** Get OpCode for English symbol.
Used in XFunctionAccess to create token array.
diff --git a/include/formula/formdata.hxx b/include/formula/formdata.hxx
index ecd3dd1..c531804 100644
--- a/include/formula/formdata.hxx
+++ b/include/formula/formdata.hxx
@@ -43,7 +43,7 @@ public:
inline sal_uInt16 GetEdFocus() const { return nEdFocus; }
inline const OUString& GetUndoStr() const { return aUndoStr; }
inline bool GetMatrixFlag()const{ return bMatrix;}
- inline OString GetUniqueId()const { return aUniqueId;}
+ const OString& GetUniqueId()const { return aUniqueId;}
inline const Selection& GetSelection()const { return aSelection;}
inline void SetMode( sal_uInt16 nNew ) { nMode = nNew; }
commit e133f3eb0ff6d03a5a2df38627793b1f1aee04c6
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 11:22:43 2016 +0200
loplugin:passstuffbyref in filter
Change-Id: I68e69620d4725aac66ded11e7d316caf03098249
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index af3d57f..eb3262a 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -244,7 +244,7 @@ SvStream& ReadPptExOleObjAtom( SvStream& rIn, PptExOleObjAtom& rAtom )
return rIn;
}
-Size PptDocumentAtom::GetPageSize(const Size& rSiz)
+const Size& PptDocumentAtom::GetPageSize(const Size& rSiz)
{
return rSiz;
}
diff --git a/filter/source/placeware/tempfile.hxx b/filter/source/placeware/tempfile.hxx
index c8595ae..e960841 100644
--- a/filter/source/placeware/tempfile.hxx
+++ b/filter/source/placeware/tempfile.hxx
@@ -30,7 +30,7 @@ public:
~PlaceWareTempFile();
static OUString createTempFileURL();
- OUString getFileURL() { return maURL;}
+ const OUString& getFileURL() { return maURL;}
private:
OUString maURL;
diff --git a/filter/source/svg/b2dellipse.hxx b/filter/source/svg/b2dellipse.hxx
index b37a5c3..af97794 100644
--- a/filter/source/svg/b2dellipse.hxx
+++ b/filter/source/svg/b2dellipse.hxx
@@ -41,8 +41,8 @@ namespace basegfx
B2DEllipse& operator=(const B2DEllipse& rEllipse);
// Coordinate interface
- basegfx::B2DPoint getB2DEllipseCenter() const { return maCenter; }
- basegfx::B2DTuple getB2DEllipseRadius() const { return maRadius; }
+ const basegfx::B2DPoint& getB2DEllipseCenter() const { return maCenter; }
+ const basegfx::B2DTuple& getB2DEllipseRadius() const { return maRadius; }
};
} // end of namespace basegfx
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index 7b0ab7e..d276018 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -132,13 +132,13 @@ namespace XSLT
void SAL_CALL
error(const OUString& msg);
- const OString SAL_CALL
+ const OString& SAL_CALL
getStyleSheetURL() { return m_styleSheetURL; }
- ::std::map<const char*, OString> SAL_CALL
+ const ::std::map<const char*, OString>& SAL_CALL
getParameters() { return m_parameters; }
- css::uno::Reference<css::uno::XComponentContext> SAL_CALL
+ const css::uno::Reference<css::uno::XComponentContext>& SAL_CALL
getComponentContext() {
return m_xContext;
}
diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx
index db70cc8..f870789 100644
--- a/include/filter/msfilter/escherex.hxx
+++ b/include/filter/msfilter/escherex.hxx
@@ -1210,7 +1210,7 @@ public:
void InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ); // nValue is being inserted into the Stream where it's appropriate (overwrite modus), without that the
// current StreamPosition changes
void SetEditAs( const OUString& rEditAs );
- rtl::OUString GetEditAs() { return mEditAs; }
+ const OUString& GetEditAs() { return mEditAs; }
SvStream& GetStream() const { return *mpOutStrm; }
sal_uLong GetStreamPos() const { return mpOutStrm->Tell(); }
diff --git a/include/filter/msfilter/mstoolbar.hxx b/include/filter/msfilter/mstoolbar.hxx
index c6b3920..6774c6c 100644
--- a/include/filter/msfilter/mstoolbar.hxx
+++ b/include/filter/msfilter/mstoolbar.hxx
@@ -52,7 +52,7 @@ public:
void setMSOCommandMap( MSOCommandConvertor* pCnvtr ) { pMSOCmdConvertor.reset( pCnvtr ); }
css::uno::Reference< css::ui::XUIConfigurationManager > getCfgManager();
- css::uno::Reference< css::ui::XUIConfigurationManager > getAppCfgManager() { return m_xAppCfgMgr;}
+ const css::uno::Reference< css::ui::XUIConfigurationManager >& getAppCfgManager() { return m_xAppCfgMgr;}
static css::uno::Any createCommandFromMacro( const OUString& sCmd );
@@ -108,7 +108,7 @@ public:
WString(){};
virtual ~WString(){};
bool Read(SvStream &rS) override;
- OUString getString(){ return sString; }
+ const OUString& getString(){ return sString; }
};
class MSFILTER_DLLPUBLIC TBCExtraInfo : public TBBase
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 2f04a8e..2daa00e 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -189,7 +189,7 @@ struct MSFILTER_DLLPUBLIC PptDocumentAtom
public:
- static Size GetPageSize( const Size& rSiz );
+ static const Size& GetPageSize( const Size& rSiz );
Size GetSlidesPageSize() const { return GetPageSize( aSlidesPageSize ); }
Size GetNotesPageSize() const { return GetPageSize( aNotesPageSize ); }
commit 27b6782f5b17167e4258656aef9aef34a10699db
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 11:22:04 2016 +0200
loplugin:passstuffbyref in editeng
Change-Id: I11deb7c73a1c160d587d74c9851ff10c875c972b
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 485f2f7..aa66312 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1526,7 +1526,7 @@ void EditEngine::SetImportHdl( const Link<ImportInfo&,void>& rLink )
pImpEditEngine->aImportHdl = rLink;
}
-Link<ImportInfo&,void> EditEngine::GetImportHdl() const
+const Link<ImportInfo&,void>& EditEngine::GetImportHdl() const
{
return pImpEditEngine->aImportHdl;
}
@@ -2101,7 +2101,7 @@ void EditEngine::SetWordDelimiters( const OUString& rDelimiters )
pImpEditEngine->aWordDelimiters += OUStringLiteral1<CH_FEATURE>();
}
-OUString EditEngine::GetWordDelimiters() const
+const OUString& EditEngine::GetWordDelimiters() const
{
return pImpEditEngine->aWordDelimiters;
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index fa70b1e..a06a593 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -650,7 +650,7 @@ private:
const ParaPortion* GetNextVisPortion( const ParaPortion* pCurPortion ) const;
void SetBackgroundColor( const Color& rColor ) { maBackgroundColor = rColor; }
- Color GetBackgroundColor() const { return maBackgroundColor; }
+ const Color& GetBackgroundColor() const { return maBackgroundColor; }
long CalcVertLineSpacing(Point& rStartPos) const;
@@ -832,7 +832,7 @@ public:
bool IsModified() const { return aEditDoc.IsModified(); }
void SetModifyFlag( bool b ) { aEditDoc.SetModified( b ); }
void SetModifyHdl( const Link<LinkParamNone*,void>& rLink ) { aModifyHdl = rLink; }
- Link<LinkParamNone*,void> GetModifyHdl() const { return aModifyHdl; }
+ const Link<LinkParamNone*,void>& GetModifyHdl() const { return aModifyHdl; }
bool IsInSelectionMode() { return bInSelection; }
@@ -848,10 +848,10 @@ public:
EditSelection* SelectParagraph( sal_Int32 nPara );
void SetStatusEventHdl( const Link<EditStatus&, void>& rLink ) { aStatusHdlLink = rLink; }
- Link<EditStatus&,void> GetStatusEventHdl() const { return aStatusHdlLink; }
+ const Link<EditStatus&,void>& GetStatusEventHdl() const { return aStatusHdlLink; }
void SetNotifyHdl( const Link<EENotify&,void>& rLink ) { aNotifyHdl = rLink; }
- Link<EENotify&,void> GetNotifyHdl() const { return aNotifyHdl; }
+ const Link<EENotify&,void>& GetNotifyHdl() const { return aNotifyHdl; }
void FormatAndUpdate( EditView* pCurView = nullptr );
inline void IdleFormatAndUpdate( EditView* pCurView = nullptr );
@@ -902,7 +902,7 @@ public:
GetSpeller();
void SetSpeller( css::uno::Reference< css::linguistic2::XSpellChecker1 > &xSpl )
{ xSpeller = xSpl; }
- css::uno::Reference< css::linguistic2::XHyphenator >
+ const css::uno::Reference< css::linguistic2::XHyphenator >&
GetHyphenator() const { return xHyphenator; }
void SetHyphenator( css::uno::Reference< css::linguistic2::XHyphenator > &xHyph )
{ xHyphenator = xHyph; }
@@ -1012,11 +1012,11 @@ public:
/** sets a link that is called at the beginning of a drag operation at an edit view */
void SetBeginDropHdl( const Link<EditView*,void>& rLink ) { maBeginDropHdl = rLink; }
- Link<EditView*,void> GetBeginDropHdl() const { return maBeginDropHdl; }
+ const Link<EditView*,void>& GetBeginDropHdl() const { return maBeginDropHdl; }
/** sets a link that is called at the end of a drag operation at an edit view */
void SetEndDropHdl( const Link<EditView*,void>& rLink ) { maEndDropHdl = rLink; }
- Link<EditView*,void> GetEndDropHdl() const { return maEndDropHdl; }
+ const Link<EditView*,void>& GetEndDropHdl() const { return maEndDropHdl; }
/// specifies if auto-correction should capitalize the first word or not (default is on)
void SetFirstWordCapitalization( bool bCapitalize ) { bFirstWordCapitalization = bCapitalize; }
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index d219c1f..2b94ce1 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 31abbc9..4c711c8 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 267f0f0..46adeb2 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -377,7 +377,7 @@ public:
Link<EENotify&,void> GetNotifyHdl() const;
void SetImportHdl( const Link<ImportInfo&,void>& rLink );
- Link<ImportInfo&,void> GetImportHdl() const;
+ const Link<ImportInfo&,void>& 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 5d3acdc..649167a 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 c33cfef..775e8f1 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 480b778..d44c2dc 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 c385b48..78b2e21 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -750,11 +750,11 @@ public:
void ParagraphInsertedHdl();
void SetParaInsertedHdl(const Link<Outliner*,void>& rLink){aParaInsertedHdl=rLink;}
- Link<Outliner*,void> GetParaInsertedHdl() const { return aParaInsertedHdl; }
+ const Link<Outliner*,void>& GetParaInsertedHdl() const { return aParaInsertedHdl; }
void ParagraphRemovingHdl();
void SetParaRemovingHdl(const Link<Outliner*,void>& rLink){aParaRemovingHdl=rLink;}
- Link<Outliner*,void> GetParaRemovingHdl() const { return aParaRemovingHdl; }
+ const Link<Outliner*,void>& GetParaRemovingHdl() const { return aParaRemovingHdl; }
NonOverflowingText *GetNonOverflowingText() const;
OverflowingText *GetOverflowingText() const;
@@ -766,7 +766,7 @@ public:
void DepthChangedHdl();
void SetDepthChangedHdl(const Link<Outliner*,void>& rLink){aDepthChangedHdl=rLink;}
- Link<Outliner*,void> GetDepthChangedHdl() const { return aDepthChangedHdl; }
+ const Link<Outliner*,void>& GetDepthChangedHdl() const { return aDepthChangedHdl; }
sal_Int16 GetPrevDepth() const { return static_cast<sal_Int16>(nDepthChangedHdlPrevDepth); }
ParaFlag GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; }
@@ -778,7 +778,7 @@ public:
sal_Int32 GetSelPageCount() const { return nDepthChangedHdlPrevDepth; }
void SetCalcFieldValueHdl(const Link<EditFieldInfo*,void>& rLink ) { aCalcFieldValueHdl= rLink; }
- Link<EditFieldInfo*,void> GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; }
+ const Link<EditFieldInfo*,void>& GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; }
void SetDrawPortionHdl(const Link<DrawPortionInfo*,void>& rLink){aDrawPortionHdl=rLink;}
@@ -875,9 +875,9 @@ public:
void SetControlWord( EEControlBits nWord );
EEControlBits GetControlWord() const;
- Link<Outliner*,void> GetBeginMovingHdl() const { return aBeginMovingHdl; }
+ const Link<Outliner*,void>& GetBeginMovingHdl() const { return aBeginMovingHdl; }
void SetBeginMovingHdl(const Link<Outliner*,void>& rLink) {aBeginMovingHdl=rLink;}
- Link<Outliner*,void> GetEndMovingHdl() const {return aEndMovingHdl;}
+ const Link<Outliner*,void>& GetEndMovingHdl() const {return aEndMovingHdl;}
void SetEndMovingHdl( const Link<Outliner*,void>& rLink){aEndMovingHdl=rLink;}
sal_uLong GetLineCount( sal_Int32 nParagraph ) const;
diff --git a/include/editeng/splwrap.hxx b/include/editeng/splwrap.hxx
index 1edc42c..1c0bb3b 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; }
commit ecebf3bd99b100382f4bc9242ca8e882f83b275a
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 10:45:45 2016 +0200
loplugin:passstuffbyref in drawinglayer
Change-Id: I563c18c35291ced91bc29ab9162c5363ee8b19f9
diff --git a/include/drawinglayer/primitive3d/groupprimitive3d.hxx b/include/drawinglayer/primitive3d/groupprimitive3d.hxx
index d2adef9..3e07c86 100644
--- a/include/drawinglayer/primitive3d/groupprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/groupprimitive3d.hxx
@@ -59,7 +59,7 @@ namespace drawinglayer
explicit GroupPrimitive3D(const Primitive3DContainer& rChildren);
/// data read access
- Primitive3DContainer getChildren() const { return maChildren; }
+ const Primitive3DContainer& getChildren() const { return maChildren; }
/// compare operator
virtual bool operator==( const BasePrimitive3D& rPrimitive ) const override;
diff --git a/include/drawinglayer/primitive3d/polygonprimitive3d.hxx b/include/drawinglayer/primitive3d/polygonprimitive3d.hxx
index 34721a3..9f3f363 100644
--- a/include/drawinglayer/primitive3d/polygonprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/polygonprimitive3d.hxx
@@ -107,7 +107,7 @@ namespace drawinglayer
const attribute::StrokeAttribute& rStrokeAttribute);
/// data read access
- basegfx::B3DPolygon getB3DPolygon() const { return maPolygon; }
+ const basegfx::B3DPolygon& getB3DPolygon() const { return maPolygon; }
const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; }
const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; }
diff --git a/include/drawinglayer/primitive3d/sdrprimitive3d.hxx b/include/drawinglayer/primitive3d/sdrprimitive3d.hxx
index 1dded61..bd8991f 100644
--- a/include/drawinglayer/primitive3d/sdrprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/sdrprimitive3d.hxx
@@ -72,7 +72,7 @@ namespace drawinglayer
const basegfx::B3DHomMatrix& getTransform() const { return maTransform; }
const basegfx::B2DVector& getTextureSize() const { return maTextureSize; }
const attribute::SdrLineFillShadowAttribute3D& getSdrLFSAttribute() const { return maSdrLFSAttribute; }
- const attribute::Sdr3DObjectAttribute getSdr3DObjectAttribute() const { return maSdr3DObjectAttribute; }
+ const attribute::Sdr3DObjectAttribute& getSdr3DObjectAttribute() const { return maSdr3DObjectAttribute; }
/// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const override;
commit 9fce680e27e57f0539f55c7ecb5c8e1d96029267
Author: Noel Grandin <noel at peralex.com>
Date: Wed Apr 13 10:44:57 2016 +0200
loplugin:passstuffbyref in dbaccess
Change-Id: Ice52ebbfeca45c8587fdcd0d3dea5c02c7de27e3
diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx
index c623d34..15ec660 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -152,7 +152,7 @@ namespace dbaccess
void deregisterOldRow(const TORowSetOldRowHelperRef& _rRow);
// css::sdbc::XResultSetMetaDataSupplier
- css::uno::Reference< css::sdbc::XResultSetMetaData > getMetaData( ) { return m_xMetaData;}
+ const css::uno::Reference< css::sdbc::XResultSetMetaData >& getMetaData( ) { return m_xMetaData;}
// css::sdbcx::XRowLocate
css::uno::Any getBookmark( );
diff --git a/dbaccess/source/core/api/RowSetCacheIterator.hxx b/dbaccess/source/core/api/RowSetCacheIterator.hxx
index 43bc253..4b4c97e 100644
--- a/dbaccess/source/core/api/RowSetCacheIterator.hxx
+++ b/dbaccess/source/core/api/RowSetCacheIterator.hxx
@@ -69,7 +69,7 @@ namespace dbaccess
void setBookmark(const css::uno::Any& _rBookmark);
- ORowSetCacheMap::iterator getIter() const { return m_aIter; }
+ const ORowSetCacheMap::iterator& getIter() const { return m_aIter; }
};
}
#endif // INCLUDED_DBACCESS_SOURCE_CORE_API_ROWSETCACHEITERATOR_HXX
diff --git a/dbaccess/source/core/api/RowSetRow.hxx b/dbaccess/source/core/api/RowSetRow.hxx
index 604c1df..ece120f 100644
--- a/dbaccess/source/core/api/RowSetRow.hxx
+++ b/dbaccess/source/core/api/RowSetRow.hxx
@@ -43,7 +43,7 @@ namespace dbaccess
: m_aRow(_rRow)
{}
- inline ORowSetRow getRow() const { return m_aRow; }
+ const ORowSetRow& getRow() const { return m_aRow; }
inline void clearRow() { m_aRow = nullptr; }
inline void setRow(const ORowSetRow& _rRow) { m_aRow = _rRow; }
};
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index 8de14c6..ca3003e 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -281,8 +281,8 @@ public:
void dispose();
- inline OUString getURL() const { return m_sDocumentURL; }
- inline OUString getDocFileLocation() const { return m_sDocFileLocation; }
+ const OUString& getURL() const { return m_sDocumentURL; }
+ const OUString& getDocFileLocation() const { return m_sDocFileLocation; }
css::uno::Reference< css::embed::XStorage >
getStorage( const ObjectType _eType );
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 258be0f..ea409eb 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -332,8 +332,8 @@ namespace dbaccess
public:
ODocumentSaveContinuation() { }
- inline Reference<XContent> getContent() const { return m_xParentContainer; }
- inline OUString getName() const { return m_sName; }
+ const Reference<XContent>& getContent() const { return m_xParentContainer; }
+ const OUString& getName() const { return m_sName; }
// XInteractionDocumentSave
virtual void SAL_CALL setName( const OUString& _sName,const Reference<XContent>& _xParent) throw(RuntimeException, std::exception) override;
diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx
index 768b4b9..59f768b 100644
--- a/dbaccess/source/core/inc/ContentHelper.hxx
+++ b/dbaccess/source/core/inc/ContentHelper.hxx
@@ -180,7 +180,7 @@ namespace dbaccess
const css::uno::Reference< css::uno::XComponentContext >& getContext() const { return m_aContext; }
- inline TContentPtr getImpl() const { return m_pImpl; }
+ const TContentPtr& getImpl() const { return m_pImpl; }
protected:
virtual OUString determineContentType() const = 0;
diff --git a/dbaccess/source/core/inc/PropertyForward.hxx b/dbaccess/source/core/inc/PropertyForward.hxx
index b2d2a64..755246c 100644
--- a/dbaccess/source/core/inc/PropertyForward.hxx
+++ b/dbaccess/source/core/inc/PropertyForward.hxx
@@ -62,7 +62,7 @@ namespace dbaccess
inline void setName( const OUString& _sName ) { m_sName = _sName; }
void setDefinition( const css::uno::Reference< css::beans::XPropertySet >& _xDest);
- inline css::uno::Reference< css::beans::XPropertySet > getDefinition() const { return m_xDest; }
+ const css::uno::Reference< css::beans::XPropertySet >& getDefinition() const { return m_xDest; }
};
} // namespace dbaccess
diff --git a/dbaccess/source/core/inc/TableDeco.hxx b/dbaccess/source/core/inc/TableDeco.hxx
index ef559f3..d95e185 100644
--- a/dbaccess/source/core/inc/TableDeco.hxx
+++ b/dbaccess/source/core/inc/TableDeco.hxx
@@ -150,7 +150,7 @@ namespace dbaccess
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
- css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() const { return m_xMetaData; }
+ const css::uno::Reference< css::sdbc::XDatabaseMetaData>& getMetaData() const { return m_xMetaData; }
// XColumnsSupplier
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns( ) throw (css::uno::RuntimeException, std::exception) override;
diff --git a/dbaccess/source/core/inc/definitioncontainer.hxx b/dbaccess/source/core/inc/definitioncontainer.hxx
index eaa1b0d..ff5346e 100644
--- a/dbaccess/source/core/inc/definitioncontainer.hxx
+++ b/dbaccess/source/core/inc/definitioncontainer.hxx
@@ -137,7 +137,7 @@ protected:
given here.
*/
void setElementApproval( PContainerApprove _pElementApproval ) { m_pElementApproval = _pElementApproval; }
- PContainerApprove getElementApproval() const { return m_pElementApproval; }
+ const PContainerApprove& getElementApproval() const { return m_pElementApproval; }
protected:
virtual ~ODefinitionContainer();
diff --git a/dbaccess/source/core/inc/userinformation.hxx b/dbaccess/source/core/inc/userinformation.hxx
index a4b7c6f..4a82436 100644
--- a/dbaccess/source/core/inc/userinformation.hxx
+++ b/dbaccess/source/core/inc/userinformation.hxx
@@ -31,7 +31,7 @@ class UserInformation
public:
UserInformation();
- css::lang::Locale getUserLanguage() const { return m_aUserLocale; }
+ const css::lang::Locale& getUserLanguage() const { return m_aUserLocale; }
};
#endif // INCLUDED_DBACCESS_SOURCE_CORE_INC_USERINFORMATION_HXX
diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx
index ad6d3eb..237d046 100644
--- a/dbaccess/source/filter/xml/xmlExport.hxx
+++ b/dbaccess/source/filter/xml/xmlExport.hxx
@@ -191,7 +191,7 @@ public:
// XExporter
virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) throw(css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override;
- inline Reference<XPropertySet> getDataSource() const { return m_xDataSource; }
+ const Reference<XPropertySet>& getDataSource() const { return m_xDataSource; }
};
} // dbaxml
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list