summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-13 15:14:04 +0200
committerNoel Grandin <noel@peralex.com>2016-04-14 09:21:40 +0200
commitd1f6f79d0df21c2bb3be9d191233eabf22afb14e (patch)
treeb124796ed1043c5dc68dc416469e088228448492 /sc
parent492f2ff0053a11aa6e49a18a9a8caf87edb68436 (diff)
loplugin:passstuffbyref in sc
Change-Id: I75c483972db787ea9c941eaac0df023f1929b09c
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/addincol.hxx8
-rw-r--r--sc/inc/chgtrack.hxx2
-rw-r--r--sc/inc/chgviset.hxx4
-rw-r--r--sc/inc/conditio.hxx2
-rw-r--r--sc/inc/defaultsoptions.hxx2
-rw-r--r--sc/inc/document.hxx4
-rw-r--r--sc/inc/dpgroup.hxx2
-rw-r--r--sc/inc/formulacell.hxx2
-rw-r--r--sc/inc/formulaopt.hxx6
-rw-r--r--sc/inc/rangenam.hxx4
-rw-r--r--sc/inc/recursionhelper.hxx2
-rw-r--r--sc/inc/scmatrix.hxx2
-rw-r--r--sc/inc/textuno.hxx2
-rw-r--r--sc/inc/token.hxx2
-rw-r--r--sc/source/core/data/documen9.cxx2
-rw-r--r--sc/source/core/data/dpobject.cxx2
-rw-r--r--sc/source/core/inc/interpre.hxx2
-rw-r--r--sc/source/filter/excel/xeformula.cxx2
-rw-r--r--sc/source/filter/excel/xename.cxx2
-rw-r--r--sc/source/filter/inc/excrecds.hxx2
-rw-r--r--sc/source/filter/inc/fapihelper.hxx2
-rw-r--r--sc/source/filter/inc/xcl97rec.hxx2
-rw-r--r--sc/source/filter/inc/xechart.hxx4
-rw-r--r--sc/source/filter/inc/xichart.hxx6
-rw-r--r--sc/source/filter/inc/xipivot.hxx2
-rw-r--r--sc/source/filter/inc/xlroot.hxx2
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx4
-rw-r--r--sc/source/filter/xml/xmlexprt.hxx4
-rw-r--r--sc/source/filter/xml/xmlimprt.hxx8
-rw-r--r--sc/source/filter/xml/xmlsubti.hxx6
-rw-r--r--sc/source/ui/app/drwtrans.cxx2
-rw-r--r--sc/source/ui/inc/cbutton.hxx4
-rw-r--r--sc/source/ui/inc/drwtrans.hxx2
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/inc/namepast.hxx2
-rw-r--r--sc/source/ui/inc/notemark.hxx2
-rw-r--r--sc/source/ui/inc/preview.hxx2
-rw-r--r--sc/source/ui/inc/printfun.hxx6
-rw-r--r--sc/source/ui/inc/tphfedit.hxx2
-rw-r--r--sc/source/ui/inc/viewdata.hxx2
-rw-r--r--sc/source/ui/namedlg/namepast.cxx2
-rw-r--r--sc/source/ui/vba/vbachart.hxx2
-rw-r--r--sc/source/ui/vba/vbaformat.hxx2
-rw-r--r--sc/source/ui/vba/vbaformatconditions.hxx2
-rw-r--r--sc/source/ui/vba/vbanames.hxx2
-rw-r--r--sc/source/ui/vba/vbaworksheet.hxx4
46 files changed, 68 insertions, 68 deletions
diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx
index 18174c4c09a4..09d6fc524146 100644
--- a/sc/inc/addincol.hxx
+++ b/sc/inc/addincol.hxx
@@ -115,9 +115,9 @@ public:
long GetArgumentCount() const { return nArgCount; }
const ScAddInArgDesc* GetArguments() const { return pArgDescs; }
long GetCallerPos() const { return nCallerPos; }
- const OUString& GetDescription() const { return aDescription; }
+ const OUString& GetDescription() const { return aDescription; }
sal_uInt16 GetCategory() const { return nCategory; }
- const OString GetHelpId() const { return sHelpId; }
+ const OString& GetHelpId() const { return sHelpId; }
const ::std::vector< LocalizedName >& GetCompNames() const;
bool GetExcelName( LanguageType eDestLang, OUString& rRetExcelName ) const;
@@ -220,8 +220,8 @@ public:
bool HasVarRes() const { return ( xVarRes.is() ); }
double GetValue() const { return fValue; }
const OUString& GetString() const { return aString; }
- ScMatrixRef GetMatrix() const { return xMatrix;}
- css::uno::Reference<css::sheet::XVolatileResult>
+ const ScMatrixRef& GetMatrix() const { return xMatrix;}
+ const css::uno::Reference<css::sheet::XVolatileResult>&
GetVarRes() const { return xVarRes; }
};
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index a7b85b9ac3df..06e12985016a 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -1184,7 +1184,7 @@ public:
void SetProtection( const css::uno::Sequence< sal_Int8 >& rPass )
{ aProtectPass = rPass; }
- css::uno::Sequence< sal_Int8 > GetProtection() const
+ const css::uno::Sequence< sal_Int8 >& GetProtection() const
{ return aProtectPass; }
bool IsProtected() const { return aProtectPass.getLength() != 0; }
diff --git a/sc/inc/chgviset.hxx b/sc/inc/chgviset.hxx
index 5d61b7ccd5d6..ee61570f4248 100644
--- a/sc/inc/chgviset.hxx
+++ b/sc/inc/chgviset.hxx
@@ -96,13 +96,13 @@ public:
bool HasAuthor() const {return bIsAuthor;}
void SetHasAuthor(bool bFlag) {bIsAuthor=bFlag;}
- OUString GetTheAuthorToShow()const {return aAuthorToShow;}
+ const OUString& GetTheAuthorToShow()const {return aAuthorToShow;}
void SetTheAuthorToShow(const OUString& aString){aAuthorToShow=aString;}
bool HasComment() const {return bIsComment;}
void SetHasComment(bool bFlag) {bIsComment=bFlag;}
- OUString GetTheComment()const {return aComment;}
+ const OUString& GetTheComment()const {return aComment;}
void SetTheComment(const OUString& aString);
bool IsValidComment(const OUString* pCommentStr) const;
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index f4ed5e92835f..3bf6a144f7ee 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -242,7 +242,7 @@ public:
void SetOperation(ScConditionMode eMode);
bool IsIgnoreBlank() const { return ( nOptions & SC_COND_NOBLANKS ) == 0; }
void SetIgnoreBlank(bool bSet);
- ScAddress GetSrcPos() const { return aSrcPos; }
+ const ScAddress& GetSrcPos() const { return aSrcPos; }
ScAddress GetValidSrcPos() const; // adjusted to allow textual representation of expressions
diff --git a/sc/inc/defaultsoptions.hxx b/sc/inc/defaultsoptions.hxx
index 0ea046cafec5..5699fcc69336 100644
--- a/sc/inc/defaultsoptions.hxx
+++ b/sc/inc/defaultsoptions.hxx
@@ -32,7 +32,7 @@ public:
SCTAB GetInitTabCount() const { return nInitTabCount; }
void SetInitTabCount( SCTAB nTabs) { nInitTabCount = nTabs; }
void SetInitTabPrefix(const OUString& aPrefix) { aInitTabPrefix = aPrefix; }
- OUString GetInitTabPrefix() const { return aInitTabPrefix; }
+ const OUString& GetInitTabPrefix() const { return aInitTabPrefix; }
ScDefaultsOptions& operator= ( const ScDefaultsOptions& rCpy );
bool operator== ( const ScDefaultsOptions& rOpt ) const;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index ac4f6c5cc0bc..9a52748557db 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1849,7 +1849,7 @@ public:
ScChangeViewSettings* GetChangeViewSettings() const { return pChangeViewSettings; }
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings& rNew);
- rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharacters();
+ const rtl::Reference<SvxForbiddenCharactersTable>& GetForbiddenCharacters();
void SetForbiddenCharacters(const rtl::Reference<SvxForbiddenCharactersTable>& rNew);
sal_uInt8 GetAsianCompression() const; // CharacterCompressionType values
@@ -2110,7 +2110,7 @@ public:
inline void SetVbaEventProcessor( const css::uno::Reference< css::script::vba::XVBAEventProcessor >& rxVbaEvents )
{ mxVbaEvents = rxVbaEvents; }
- inline css::uno::Reference< css::script::vba::XVBAEventProcessor >
+ const css::uno::Reference< css::script::vba::XVBAEventProcessor >&
GetVbaEventProcessor() const { return mxVbaEvents; }
/** Should only be GRAM_PODF or GRAM_ODFF. */
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index a19caebcec26..5ef91a568574 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -141,7 +141,7 @@ public:
ScDPGroupTableData( const std::shared_ptr<ScDPTableData>& pSource, ScDocument* pDocument );
virtual ~ScDPGroupTableData();
- std::shared_ptr<ScDPTableData> GetSourceTableData() { return pSourceData;}
+ const std::shared_ptr<ScDPTableData>& GetSourceTableData() const { return pSourceData;}
void AddGroupDimension( const ScDPGroupDimension& rGroup );
void SetNumGroupDimension( long nIndex, const ScDPNumGroupDimension& rGroup );
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 749d914b9e45..faebe0843a57 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -382,7 +382,7 @@ public:
* Turn a non-grouped cell into the top of a grouped cell.
*/
ScFormulaCellGroupRef CreateCellGroup( SCROW nLen, bool bInvariant );
- ScFormulaCellGroupRef GetCellGroup() const { return mxGroup;}
+ const ScFormulaCellGroupRef& GetCellGroup() const { return mxGroup;}
void SetCellGroup( const ScFormulaCellGroupRef &xRef );
CompareState CompareByTokenArray( ScFormulaCell& rOther ) const;
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index 0cab4c6e87a5..237fe8d7f2d4 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -55,13 +55,13 @@ public:
bool GetWriteCalcConfig() const { return mbWriteCalcConfig; }
void SetFormulaSepArg(const OUString& rSep) { aFormulaSepArg = rSep; }
- OUString GetFormulaSepArg() const { return aFormulaSepArg; }
+ const OUString& GetFormulaSepArg() const { return aFormulaSepArg; }
void SetFormulaSepArrayRow(const OUString& rSep) { aFormulaSepArrayRow = rSep; }
- OUString GetFormulaSepArrayRow() const { return aFormulaSepArrayRow; }
+ const OUString& GetFormulaSepArrayRow() const { return aFormulaSepArrayRow; }
void SetFormulaSepArrayCol(const OUString& rSep) { aFormulaSepArrayCol = rSep; }
- OUString GetFormulaSepArrayCol() const { return aFormulaSepArrayCol; }
+ const OUString& GetFormulaSepArrayCol() const { return aFormulaSepArrayCol; }
void SetOOXMLRecalcOptions( ScRecalcOptions eOpt ) { meOOXMLRecalc = eOpt; }
ScRecalcOptions GetOOXMLRecalcOptions() const { return meOOXMLRecalc; }
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 676eed4c5603..c3fff07dde55 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -109,10 +109,10 @@ public:
void GetName( OUString& rName ) const { rName = aName; }
const OUString& GetName() const { return aName; }
const OUString& GetUpperName() const { return aUpperName; }
- ScAddress GetPos() const { return aPos; }
+ const ScAddress& GetPos() const { return aPos; }
// The index has to be unique. If index=0 a new index value is assigned.
void SetIndex( sal_uInt16 nInd ) { nIndex = nInd; }
- sal_uInt16 GetIndex() const { return nIndex; }
+ sal_uInt16 GetIndex() const { return nIndex; }
ScTokenArray* GetCode() { return pCode; }
SC_DLLPUBLIC void SetCode( ScTokenArray& );
const ScTokenArray* GetCode() const { return pCode; }
diff --git a/sc/inc/recursionhelper.hxx b/sc/inc/recursionhelper.hxx
index 82de9c9335a7..560b66ab357e 100644
--- a/sc/inc/recursionhelper.hxx
+++ b/sc/inc/recursionhelper.hxx
@@ -83,7 +83,7 @@ public:
void IncIteration();
void EndIteration();
- ScFormulaRecursionList::iterator GetLastIterationStart() { return aLastIterationStart; }
+ const ScFormulaRecursionList::iterator& GetLastIterationStart() { return aLastIterationStart; }
ScFormulaRecursionList::iterator GetIterationStart();
ScFormulaRecursionList::iterator GetIterationEnd();
/** Any return, recursion or iteration, iteration is always coupled with
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index c8d4bcc5c3f9..91c4284f6381 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -60,7 +60,7 @@ struct ScMatrixValue
ScMatValType nType;
/// Only valid if ScMatrix methods indicate so!
- svl::SharedString GetString() const { return aStr; }
+ const svl::SharedString& GetString() const { return aStr; }
/// Only valid if ScMatrix methods indicate that this is no string!
sal_uInt16 GetError() const { return GetDoubleErrorValue( fVal); }
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx
index 6447ee0770f5..607e65b77f4c 100644
--- a/sc/inc/textuno.hxx
+++ b/sc/inc/textuno.hxx
@@ -130,7 +130,7 @@ public:
ScEditEngineDefaulter* GetEditEngine() { GetTextForwarder(); return pEditEngine; }
ScHeaderFooterPart GetPart() const { return nPart; }
- rtl::Reference<ScHeaderFooterContentObj> GetContentObj() const { return rContentObj; }
+ const rtl::Reference<ScHeaderFooterContentObj>& GetContentObj() const { return rContentObj; }
const EditTextObject* GetTextObject() const { return mpTextObj.get(); }
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index b056d417afdd..6c3bb679c63e 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -330,7 +330,7 @@ public:
xUpperLeft->GetType() :
static_cast<formula::StackVar>(formula::svUnknown);
}
- inline formula::FormulaConstTokenRef GetUpperLeftToken() const { return xUpperLeft; }
+ const formula::FormulaConstTokenRef& GetUpperLeftToken() const { return xUpperLeft; }
void Assign( const ScMatrixCellResultToken & r );
};
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 090b01671bb7..984f21eeb311 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -639,7 +639,7 @@ void ScDocument::SetImportingXML( bool bVal )
SetLoadingMedium(bVal);
}
-rtl::Reference<SvxForbiddenCharactersTable> ScDocument::GetForbiddenCharacters()
+const rtl::Reference<SvxForbiddenCharactersTable>& ScDocument::GetForbiddenCharacters()
{
return xForbiddenCharacters;
}
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index c70e02e13c9e..0b0171bc1df9 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -682,7 +682,7 @@ public:
maRanges.Join(rRange);
}
- ScRangeList getRanges() const { return maRanges; }
+ const ScRangeList& getRanges() const { return maRanges; }
};
}
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index fb998b827051..5530d58fa992 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -926,7 +926,7 @@ public:
formula::StackVar GetResultType() const { return xResult->GetType(); }
svl::SharedString GetStringResult() const;
double GetNumResult() const { return xResult->GetDouble(); }
- formula::FormulaTokenRef GetResultToken() const { return xResult; }
+ const formula::FormulaTokenRef& GetResultToken() const { return xResult; }
short GetRetFormatType() const { return nRetFmtType; }
sal_uLong GetRetFormatIndex() const { return nRetFmtIndex; }
};
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index c5ba95d88e5c..975acbf3b8ef 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -146,7 +146,7 @@ public:
inline sal_uInt8 GetMaxParamCount() const { return mrFuncInfo.mnMaxParamCount; }
inline sal_uInt8 GetParamCount() const { return static_cast< sal_uInt8 >( mxOperands->size() ); }
void FinishParam( sal_uInt16 nTokPos );
- inline XclExpOperandListRef GetOperandList() const { return mxOperands; }
+ const XclExpOperandListRef& GetOperandList() const { return mxOperands; }
inline ScfUInt16Vec& GetAttrPosVec() { return maAttrPosVec; }
inline void AppendAttrPos( sal_uInt16 nPos ) { maAttrPosVec.push_back( nPos ); }
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index 8c03f9e62076..bfd76c6b2c28 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -67,7 +67,7 @@ public:
inline sal_Unicode GetBuiltInName() const { return mcBuiltIn; }
/** Returns the token array for this defined name. */
- inline XclTokenArrayRef GetTokenArray() const { return mxTokArr; }
+ const XclTokenArrayRef& GetTokenArray() const { return mxTokArr; }
/** Returns true, if this is a document-global defined name. */
inline bool IsGlobal() const { return mnXclTab == EXC_NAME_GLOBAL; }
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index cf4b93363eef..f30b354aba25 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -340,7 +340,7 @@ class XclExpAutofilterinfo : public XclExpUInt16Record
public:
explicit XclExpAutofilterinfo( const ScAddress& rStartPos, SCCOL nScCol );
- inline const ScAddress GetStartPos() const { return maStartPos; }
+ inline const ScAddress& GetStartPos() const { return maStartPos; }
inline SCCOL GetColCount() const { return static_cast< SCCOL >( GetValue() ); }
private:
diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx
index c91417cb1bdf..f1693c1e4dd1 100644
--- a/sc/source/filter/inc/fapihelper.hxx
+++ b/sc/source/filter/inc/fapihelper.hxx
@@ -132,7 +132,7 @@ public:
inline bool Is() const { return mxPropSet.is(); }
/** Returns the contained XPropertySet interface. */
- inline css::uno::Reference< css::beans::XPropertySet > GetApiPropertySet() const { return mxPropSet; }
+ const css::uno::Reference< css::beans::XPropertySet >& GetApiPropertySet() const { return mxPropSet; }
/** Returns the service name provided via the XServiceName interface, or an empty string on error. */
OUString GetServiceName() const;
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx
index f21e10c52d18..b2a7f5621e2d 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -252,7 +252,7 @@ public:
ScDocument* pDoc);
virtual ~XclObjAny();
- css::uno::Reference< css::drawing::XShape >
+ const css::uno::Reference< css::drawing::XShape >&
GetShape() const { return mxShape; }
virtual void Save( XclExpStream& rStrm ) override;
diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx
index 509ff0f808cb..37cdf1125d48 100644
--- a/sc/source/filter/inc/xechart.hxx
+++ b/sc/source/filter/inc/xechart.hxx
@@ -655,9 +655,9 @@ public:
sal_uInt16 nSeriesIdx );
/** Returns formatting information of the trend line, created in Convert(). */
- inline XclExpChDataFormatRef GetDataFormat() const { return mxDataFmt; }
+ const XclExpChDataFormatRef& GetDataFormat() const { return mxDataFmt; }
/** Returns formatting of the equation text box, created in Convert(). */
- inline XclExpChTextRef GetDataLabel() const { return mxLabel; }
+ const XclExpChTextRef& GetDataLabel() const { return mxLabel; }
private:
virtual void WriteBody( XclExpStream& rStrm ) override;
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index 233a8d8f1185..cd16646e6b41 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -995,9 +995,9 @@ public:
bool HasConnectorLines() const;
/** Returns the legend object. */
- inline XclImpChLegendRef GetLegend() const { return mxLegend; }
+ const XclImpChLegendRef& GetLegend() const { return mxLegend; }
/** Returns the default series data format. */
- inline XclImpChDataFormatRef GetGroupFormat() const { return mxGroupFmt; }
+ const XclImpChDataFormatRef& GetGroupFormat() const { return mxGroupFmt; }
/** Returns series title, if the chart type group contains only one single series. */
OUString GetSingleSeriesTitle() const;
@@ -1213,7 +1213,7 @@ public:
inline sal_Int32 GetApiAxesSetIndex() const { return maData.GetApiAxesSetIndex(); }
/** Returns the outer plot area position, if existing. */
- inline XclImpChFramePosRef GetPlotAreaFramePos() const { return mxFramePos; }
+ const XclImpChFramePosRef& GetPlotAreaFramePos() const { return mxFramePos; }
/** Returns the specified chart type group. */
XclImpChTypeGroupRef GetTypeGroup( sal_uInt16 nGroupIdx ) const;
/** Returns the first chart type group. */
diff --git a/sc/source/filter/inc/xipivot.hxx b/sc/source/filter/inc/xipivot.hxx
index 7ceeebf03e87..bf6b23ea8930 100644
--- a/sc/source/filter/inc/xipivot.hxx
+++ b/sc/source/filter/inc/xipivot.hxx
@@ -301,7 +301,7 @@ public:
// cache/field access, misc. ----------------------------------------------
- inline XclImpPivotCacheRef GetPivotCache() const { return mxPCache; }
+ const XclImpPivotCacheRef& GetPivotCache() const { return mxPCache; }
inline const ScfStringVec& GetVisFieldNames() const { return maVisFieldNames; }
sal_uInt16 GetFieldCount() const;
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index 00366f2a3b32..50829231bef8 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -185,7 +185,7 @@ public:
/** Returns the OLE2 root storage of the imported/exported file.
@return Pointer to root storage or 0, if the file is a simple stream. */
- inline tools::SvRef<SotStorage> GetRootStorage() const { return mrData.mxRootStrg; }
+ const tools::SvRef<SotStorage>& GetRootStorage() const { return mrData.mxRootStrg; }
/** Returns true, if the document contains a VBA storage. */
bool HasVbaStorage() const;
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 546d4f4394f7..8115be5a2433 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -134,7 +134,7 @@ public:
/** Returns true, if the file is a multi-sheet document, or false if single-sheet. */
inline bool isWorkbookFile() const { return mbWorkbook; }
/** Returns the VBA project storage. */
- inline StorageRef getVbaProjectStorage() const { return mxVbaPrjStrg; }
+ const StorageRef& getVbaProjectStorage() const { return mxVbaPrjStrg; }
/** Returns the index of the current Calc sheet, if filter currently processes a sheet. */
inline sal_Int16 getCurrentSheetIndex() const { return mnCurrSheet; }
@@ -155,7 +155,7 @@ public:
ScDocumentImport& getDocImport();
/** Returns a reference to the source/target spreadsheet document model. */
- inline Reference< XSpreadsheetDocument > getDocument() const { return mxDoc; }
+ const Reference< XSpreadsheetDocument >& getDocument() const { return mxDoc; }
/** Returns the cell or page styles container from the Calc document. */
Reference< XNameContainer > getStyleFamily( bool bPageStyles ) const;
/** Returns the specified cell or page style from the Calc document. */
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index 46ed100b8822..6d9b70376af1 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -242,8 +242,8 @@ public:
bool IsMatrix (const ScAddress& aCell,
css::table::CellRangeAddress& aCellAddress, bool& bIsFirst) const;
- rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() { return xCellStylesPropertySetMapper; }
- rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() { return xTableStylesPropertySetMapper; }
+ const rtl::Reference < XMLPropertySetMapper >& GetCellStylesPropertySetMapper() { return xCellStylesPropertySetMapper; }
+ const rtl::Reference < XMLPropertySetMapper >& GetTableStylesPropertySetMapper() { return xTableStylesPropertySetMapper; }
void SetSourceStream( const css::uno::Reference<css::io::XInputStream>& xNewStream );
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index 18aaddf3accb..518a33da12b5 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -1013,10 +1013,10 @@ public:
sal_Int16 GetCellType(const OUString& rStrValue) const;
- rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const { return xCellStylesPropertySetMapper; }
- rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const { return xColumnStylesPropertySetMapper; }
- rtl::Reference < XMLPropertySetMapper > GetRowStylesPropertySetMapper() const { return xRowStylesPropertySetMapper; }
- rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const { return xTableStylesPropertySetMapper; }
+ const rtl::Reference < XMLPropertySetMapper >& GetCellStylesPropertySetMapper() const { return xCellStylesPropertySetMapper; }
+ const rtl::Reference < XMLPropertySetMapper >& GetColumnStylesPropertySetMapper() const { return xColumnStylesPropertySetMapper; }
+ const rtl::Reference < XMLPropertySetMapper >& GetRowStylesPropertySetMapper() const { return xRowStylesPropertySetMapper; }
+ const rtl::Reference < XMLPropertySetMapper >& GetTableStylesPropertySetMapper() const { return xTableStylesPropertySetMapper; }
const SvXMLTokenMap& GetDocElemTokenMap();
const SvXMLTokenMap& GetBodyElemTokenMap();
diff --git a/sc/source/filter/xml/xmlsubti.hxx b/sc/source/filter/xml/xmlsubti.hxx
index 3f9a24929228..00176300c561 100644
--- a/sc/source/filter/xml/xmlsubti.hxx
+++ b/sc/source/filter/xml/xmlsubti.hxx
@@ -79,14 +79,14 @@ public:
static bool IsOLE(css::uno::Reference< css::drawing::XShape >& rShape)
{ return ScMyOLEFixer::IsOLE(rShape); }
void DeleteTable();
- ScAddress GetCurrentCellPos() const { return maCurrentCellPos; };
+ const ScAddress& GetCurrentCellPos() const { return maCurrentCellPos; };
void AddColStyle(const sal_Int32 nRepeat, const OUString& rCellStyleName);
ScXMLTabProtectionData& GetCurrentProtectionData() { return maProtectionData; }
- OUString GetCurrentSheetName() const { return sCurrentSheetName; }
+ const OUString& GetCurrentSheetName() const { return sCurrentSheetName; }
SCTAB GetCurrentSheet() const { return (maCurrentCellPos.Tab() >= 0) ? maCurrentCellPos.Tab() : 0; }
SCCOL GetCurrentColCount() const { return std::min<sal_Int32>(nCurrentColCount, MAXCOL); }
SCROW GetCurrentRow() const { return (maCurrentCellPos.Row() >= 0) ? maCurrentCellPos.Row() : 0; }
- css::uno::Reference< css::sheet::XSpreadsheet >
+ const css::uno::Reference< css::sheet::XSpreadsheet >&
GetCurrentXSheet() const { return xCurrentSheet; }
css::uno::Reference< css::drawing::XDrawPage >
GetCurrentXDrawPage();
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 5b0701b9f981..91d9df86de01 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -670,7 +670,7 @@ void ScDrawTransferObj::SetDragWasInternal()
bDragWasInternal = true;
}
-OUString ScDrawTransferObj::GetShellID() const
+const OUString& ScDrawTransferObj::GetShellID() const
{
return maShellID;
}
diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx
index 8cf9d7559725..7c229399ff68 100644
--- a/sc/source/ui/inc/cbutton.hxx
+++ b/sc/source/ui/inc/cbutton.hxx
@@ -42,10 +42,10 @@ public:
void SetOptSizePixel();
void SetPosPixel( const Point& rNewPos ) { aBtnPos = rNewPos; }
- Point GetPosPixel() const { return aBtnPos; }
+ const Point& GetPosPixel() const { return aBtnPos; }
void SetSizePixel( const Size& rNewSize ) { aBtnSize = rNewSize; }
- Size GetSizePixel() const { return aBtnSize; }
+ const Size& GetSizePixel() const { return aBtnSize; }
private:
void ImpDrawArrow( const Rectangle& rRect );
diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx
index da714a053910..e36303b1834a 100644
--- a/sc/source/ui/inc/drwtrans.hxx
+++ b/sc/source/ui/inc/drwtrans.hxx
@@ -89,7 +89,7 @@ public:
void SetDragSourceFlags( sal_uInt16 nFlags );
void SetDragWasInternal();
- OUString GetShellID() const;
+ const OUString& GetShellID() const;
SdrView* GetDragSourceView() { return pDragSourceView; }
sal_uInt16 GetDragSourceFlags() const { return nDragSourceFlags; }
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index d4baed73d77f..eb1c1220116a 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -340,7 +340,7 @@ public:
void FakeButtonUp();
- Point GetMousePosPixel() const { return aCurMousePos; }
+ const Point& GetMousePosPixel() const { return aCurMousePos; }
void UpdateStatusPosSize();
void ClickExtern();
diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx
index 604e6c3c3ad1..8d78ff2a912d 100644
--- a/sc/source/ui/inc/namepast.hxx
+++ b/sc/source/ui/inc/namepast.hxx
@@ -54,7 +54,7 @@ public:
virtual ~ScNamePasteDlg();
virtual void dispose() override;
- std::vector<OUString> GetSelectedNames() const;
+ const std::vector<OUString>& GetSelectedNames() const;
};
#endif // INCLUDED_SC_SOURCE_UI_INC_NAMEPAST_HXX
diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx
index 4daa0d387abd..b6f8f8d70d00 100644
--- a/sc/source/ui/inc/notemark.hxx
+++ b/sc/source/ui/inc/notemark.hxx
@@ -60,7 +60,7 @@ public:
void Draw();
void InvalidateWin();
- ScAddress GetDocPos() const { return aDocPos; }
+ const ScAddress& GetDocPos() const { return aDocPos; }
bool IsByKeyboard() const { return bByKeyboard; }
void SetGridOff( const Point& rOff ) { aGridOff = rOff; }
};
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index 0291e72aa1fc..920880e37030 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -141,7 +141,7 @@ public:
long GetPageNo() const { return nPageNo; }
sal_uInt16 GetZoom() const { return nZoom; }
- Point GetOffset() const { return aOffset; }
+ const Point& GetOffset() const { return aOffset; }
SCTAB GetTab() { if (!bValid) { CalcPages(); RecalcPages(); } return nTab; }
long GetTotalPages() { if (!bValid) { CalcPages(); RecalcPages(); } return nTotalPages; }
diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
index 9ba5a366b132..b30f34a6e920 100644
--- a/sc/source/ui/inc/printfun.hxx
+++ b/sc/source/ui/inc/printfun.hxx
@@ -261,7 +261,7 @@ public:
// Query values - immediately
- Size GetPageSize() const { return aPageSize; }
+ const Size& GetPageSize() const { return aPageSize; }
Size GetDataSize() const;
void GetScaleData( Size& rPhysSize, long& rDocHdr, long& rDocFtr );
long GetFirstPageNo() const { return aTableParam.nFirstPageNo; }
@@ -277,8 +277,8 @@ public:
sal_uInt16 GetRightMargin() const{return nRightMargin;}
sal_uInt16 GetTopMargin() const{return nTopMargin;}
sal_uInt16 GetBottomMargin() const{return nBottomMargin;}
- ScPrintHFParam GetHeader(){return aHdr;}
- ScPrintHFParam GetFooter(){return aFtr;}
+ const ScPrintHFParam& GetHeader(){return aHdr;}
+ const ScPrintHFParam& GetFooter(){return aFtr;}
bool HasPrintRange() const { return mbHasPrintRange;}
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index 3fa7e27a1e7a..fcb829f0472e 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -126,7 +126,7 @@ public:
void SetPopupMenu(PopupMenu* pPopUp);
sal_uInt16 GetSelected() const { return nSelected;}
- OString GetSelectedIdent() const { return aSelectedIdent;}
+ const OString& GetSelectedIdent() const { return aSelectedIdent;}
void SetMenuHdl( const Link<ScExtIButton&,void>& rLink ) { aMLink = rLink; }
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 7b190b5aba36..1a7d43f40857 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -443,7 +443,7 @@ public:
void UpdateScreenZoom( const Fraction& rNewX, const Fraction& rNewY );
- Size GetScrSize() const { return aScrSize; }
+ const Size& GetScrSize() const { return aScrSize; }
void RecalcPixPos();
Point GetPixPos( ScSplitPos eWhich ) const
diff --git a/sc/source/ui/namedlg/namepast.cxx b/sc/source/ui/namedlg/namepast.cxx
index a73d3723ec69..f53d761ed87e 100644
--- a/sc/source/ui/namedlg/namepast.cxx
+++ b/sc/source/ui/namedlg/namepast.cxx
@@ -101,7 +101,7 @@ IMPL_LINK_TYPED( ScNamePasteDlg, ButtonHdl, Button *, pButton, void )
}
}
-std::vector<OUString> ScNamePasteDlg::GetSelectedNames() const
+const std::vector<OUString>& ScNamePasteDlg::GetSelectedNames() const
{
return maSelectedNames;
}
diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx
index 21c1e9065742..0f1dedde38c9 100644
--- a/sc/source/ui/vba/vbachart.hxx
+++ b/sc/source/ui/vba/vbachart.hxx
@@ -64,7 +64,7 @@ public:
ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart );
// Non-interface
- css::uno::Reference< css::beans::XPropertySet > xDiagramPropertySet() const { return mxDiagramPropertySet; }
+ const css::uno::Reference< css::beans::XPropertySet >& xDiagramPropertySet() const { return mxDiagramPropertySet; }
bool is3D() throw ( css::uno::RuntimeException );
css::uno::Reference< css::beans::XPropertySet > getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) throw ( css::script::BasicErrorException, css::uno::RuntimeException );
// Methods
diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx
index 78b04166f237..c7b14aa21f49 100644
--- a/sc/source/ui/vba/vbaformat.hxx
+++ b/sc/source/ui/vba/vbaformat.hxx
@@ -38,7 +38,7 @@ class ScVbaFormat : public InheritedHelperInterfaceWeakImpl< Ifc... >
typedef InheritedHelperInterfaceWeakImpl< Ifc... > ScVbaFormat_BASE;
css::lang::Locale m_aDefaultLocale;
protected:
- css::lang::Locale getDefaultLocale() { return m_aDefaultLocale; }
+ const css::lang::Locale& getDefaultLocale() { return m_aDefaultLocale; }
css::uno::Reference< css::beans::XPropertySet > mxPropertySet;
css::uno::Reference< css::util::XNumberFormatsSupplier > mxNumberFormatsSupplier;
css::uno::Reference< css::util::XNumberFormats > xNumberFormats;
diff --git a/sc/source/ui/vba/vbaformatconditions.hxx b/sc/source/ui/vba/vbaformatconditions.hxx
index ece34c0af811..01baceee11a2 100644
--- a/sc/source/ui/vba/vbaformatconditions.hxx
+++ b/sc/source/ui/vba/vbaformatconditions.hxx
@@ -51,7 +51,7 @@ public:
static OUString getA1Formula(const css::uno::Any& _aFormula) throw ( css::script::BasicErrorException );
OUString getStyleName();
void removeFormatCondition( const OUString& _sStyleName, bool _bRemoveStyle) throw ( css::script::BasicErrorException );
- css::uno::Reference< css::sheet::XSheetConditionalEntries > getSheetConditionalEntries() const { return mxSheetConditionalEntries; }
+ const css::uno::Reference< css::sheet::XSheetConditionalEntries >& getSheetConditionalEntries() const { return mxSheetConditionalEntries; }
// XFormatConditions
virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) override;
virtual css::uno::Reference< ov::excel::XFormatCondition > SAL_CALL Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2 ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) override;
diff --git a/sc/source/ui/vba/vbanames.hxx b/sc/source/ui/vba/vbanames.hxx
index 661f3a509d71..1e16fe38ec4e 100644
--- a/sc/source/ui/vba/vbanames.hxx
+++ b/sc/source/ui/vba/vbanames.hxx
@@ -36,7 +36,7 @@ class ScVbaNames : public ScVbaNames_BASE
css::uno::Reference< css::sheet::XNamedRanges > mxNames;
protected:
- css::uno::Reference< css::frame::XModel > getModel() { return mxModel; }
+ const css::uno::Reference< css::frame::XModel >& getModel() { return mxModel; }
public:
ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx
index d61c5d8e0e73..bfbd4c55a7bb 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -71,9 +71,9 @@ public:
virtual ~ScVbaWorksheet();
- css::uno::Reference< css::frame::XModel > getModel()
+ const css::uno::Reference< css::frame::XModel >& getModel()
{ return mxModel; }
- css::uno::Reference< css::sheet::XSpreadsheet > getSheet()
+ const css::uno::Reference< css::sheet::XSpreadsheet >& getSheet()
{ return mxSheet; }
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
css::uno::Reference< ov::excel::XWorksheet > createSheetCopyInNewDoc( const OUString& );