summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/SidebarWin.hxx2
-rw-r--r--sw/inc/SwAppletImpl.hxx2
-rw-r--r--sw/inc/ToxWhitespaceStripper.hxx2
-rw-r--r--sw/inc/accmap.hxx2
-rw-r--r--sw/inc/anchoredobject.hxx2
-rw-r--r--sw/inc/authfld.hxx2
-rw-r--r--sw/inc/cellfml.hxx2
-rw-r--r--sw/inc/chpfld.hxx8
-rw-r--r--sw/inc/dbfld.hxx2
-rw-r--r--sw/inc/dbmgr.hxx2
-rw-r--r--sw/inc/ddefld.hxx2
-rw-r--r--sw/inc/doc.hxx10
-rw-r--r--sw/inc/docufld.hxx14
-rw-r--r--sw/inc/expfld.hxx32
-rw-r--r--sw/inc/fmtautofmt.hxx4
-rw-r--r--sw/inc/fmtftn.hxx2
-rw-r--r--sw/inc/fmtmeta.hxx2
-rw-r--r--sw/inc/fmtpdsc.hxx2
-rw-r--r--sw/inc/fmtruby.hxx4
-rw-r--r--sw/inc/fmturl.hxx6
-rw-r--r--sw/inc/format.hxx2
-rw-r--r--sw/inc/hints.hxx2
-rw-r--r--sw/inc/lineinfo.hxx2
-rw-r--r--sw/inc/modcfg.hxx8
-rw-r--r--sw/inc/modeltoviewhelper.hxx2
-rw-r--r--sw/inc/ndgrf.hxx2
-rw-r--r--sw/inc/ndole.hxx4
-rw-r--r--sw/inc/numrule.hxx4
-rw-r--r--sw/inc/pagedesc.hxx2
-rw-r--r--sw/inc/printdata.hxx4
-rw-r--r--sw/inc/reffld.hxx2
-rw-r--r--sw/inc/rubylist.hxx2
-rw-r--r--sw/inc/section.hxx8
-rw-r--r--sw/inc/shellio.hxx12
-rw-r--r--sw/inc/splargs.hxx2
-rw-r--r--sw/inc/swmodule.hxx4
-rw-r--r--sw/inc/swtable.hxx2
-rw-r--r--sw/inc/tblafmt.hxx2
-rw-r--r--sw/inc/tox.hxx38
-rw-r--r--sw/inc/unodraw.hxx2
-rw-r--r--sw/inc/unosett.hxx2
-rw-r--r--sw/source/core/doc/list.cxx4
-rw-r--r--sw/source/core/doc/number.cxx2
-rw-r--r--sw/source/core/edit/edlingu.cxx4
-rw-r--r--sw/source/core/fields/expfld.cxx4
-rw-r--r--sw/source/core/fields/reffld.cxx2
-rw-r--r--sw/source/core/inc/swblocks.hxx6
-rw-r--r--sw/source/core/text/guess.hxx2
-rw-r--r--sw/source/core/text/inftxt.hxx2
-rw-r--r--sw/source/core/text/porfld.hxx2
-rw-r--r--sw/source/core/text/porftn.hxx2
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx4
-rw-r--r--sw/source/filter/ascii/wrtasc.hxx2
-rw-r--r--sw/source/filter/html/htmltab.cxx2
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.hxx8
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx2
-rw-r--r--sw/source/filter/ww8/docxexport.hxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx4
-rw-r--r--sw/source/filter/ww8/ww8par.hxx6
-rw-r--r--sw/source/filter/ww8/ww8toolbar.hxx2
-rw-r--r--sw/source/filter/xml/xmlimpit.hxx4
-rw-r--r--sw/source/ui/vba/vbafield.cxx2
-rw-r--r--sw/source/ui/vba/vbalisthelper.hxx2
-rw-r--r--sw/source/ui/vba/vbapalette.hxx2
-rw-r--r--sw/source/ui/vba/vbarange.hxx4
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx2
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx2
-rw-r--r--sw/source/uibase/inc/break.hxx4
-rw-r--r--sw/source/uibase/inc/concustomshape.hxx2
-rw-r--r--sw/source/uibase/inc/edtwin.hxx4
-rw-r--r--sw/source/uibase/inc/fldmgr.hxx8
-rw-r--r--sw/source/uibase/inc/insfnote.hxx2
-rw-r--r--sw/source/uibase/inc/javaedit.hxx4
-rw-r--r--sw/source/uibase/inc/mailmergewizard.hxx2
-rw-r--r--sw/source/uibase/inc/mailmrge.hxx2
-rw-r--r--sw/source/uibase/inc/pview.hxx2
-rw-r--r--sw/source/uibase/inc/swuicnttab.hxx4
-rw-r--r--sw/source/uibase/inc/toxmgr.hxx8
-rw-r--r--sw/source/uibase/ribbar/concustomshape.cxx2
80 files changed, 169 insertions, 169 deletions
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
index c6738fac6132..7bb7d123a17a 100644
--- a/sw/inc/SidebarWin.hxx
+++ b/sw/inc/SidebarWin.hxx
@@ -161,7 +161,7 @@ class SwSidebarWin : public vcl::Window
void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus,
const Color& aColor);
SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; }
- Color GetChangeColor() { return mChangeColor; }
+ const Color& GetChangeColor() { return mChangeColor; }
virtual bool IsProtected()
{
diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx
index 16595d1e7891..13b8e6184e3e 100644
--- a/sw/inc/SwAppletImpl.hxx
+++ b/sw/inc/SwAppletImpl.hxx
@@ -63,7 +63,7 @@ public:
void AppendParam( const OUString& rName, const OUString& rValue );
#endif
void FinishApplet();
- css::uno::Reference < css::embed::XEmbeddedObject > GetApplet() { return xApplet; }
+ const css::uno::Reference < css::embed::XEmbeddedObject >& GetApplet() { return xApplet; }
SfxItemSet& GetItemSet() { return aItemSet; }
const OUString& GetAltText() const { return sAlt; }
void SetAltText( const OUString& rAlt ) {sAlt = rAlt;}
diff --git a/sw/inc/ToxWhitespaceStripper.hxx b/sw/inc/ToxWhitespaceStripper.hxx
index db27fec04a2c..835ed8ae87fe 100644
--- a/sw/inc/ToxWhitespaceStripper.hxx
+++ b/sw/inc/ToxWhitespaceStripper.hxx
@@ -38,7 +38,7 @@ public:
sal_Int32
GetPositionInStrippedString(sal_Int32 pos) const;
- OUString
+ const OUString&
GetStrippedString() const { return mStripped;}
private:
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index bce4ccb46e48..885892d35797 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -298,7 +298,7 @@ private:
public:
virtual bool IsDocumentSelAll() override;
- css::uno::WeakReference < css::accessibility::XAccessible >
+ const css::uno::WeakReference < css::accessibility::XAccessible >&
GetCursorContext() const { return mxCursorContext; }
//Para Container for InvalidateCursorPosition
diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
index e1907b3279a3..e82d9ffb7788 100644
--- a/sw/inc/anchoredobject.hxx
+++ b/sw/inc/anchoredobject.hxx
@@ -351,7 +351,7 @@ class SW_DLLPUBLIC SwAnchoredObject
// accessors to the current relative position (relative to anchor
// position of anchor frame)
- const Point GetCurrRelPos() const { return maRelPos;}
+ const Point& GetCurrRelPos() const { return maRelPos;}
void SetCurrRelPos( Point _aRelPos );
// accessors to the format
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 7228b63b27dc..219335120d9b 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -138,7 +138,7 @@ public:
LanguageType GetLanguage() const {return m_eLanguage;}
void SetLanguage(LanguageType nLang) {m_eLanguage = nLang;}
- OUString GetSortAlgorithm() const {return m_sSortAlgorithm;}
+ const OUString& GetSortAlgorithm() const {return m_sSortAlgorithm;}
void SetSortAlgorithm(const OUString& rSet) {m_sSortAlgorithm = rSet;}
};
diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx
index e681a25fead8..f00f80bed351 100644
--- a/sw/inc/cellfml.hxx
+++ b/sw/inc/cellfml.hxx
@@ -132,7 +132,7 @@ public:
bool IsValid() const { return m_bValidValue; }
void ChgValid( bool bNew ) { m_bValidValue = bNew; }
- OUString GetFormula() const { return m_sFormula; }
+ const OUString& GetFormula() const { return m_sFormula; }
void SetFormula( const OUString& rNew )
{
m_sFormula = rNew;
diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx
index 9889ecbc49eb..575bdb2540d5 100644
--- a/sw/inc/chpfld.hxx
+++ b/sw/inc/chpfld.hxx
@@ -71,16 +71,16 @@ public:
inline sal_uInt8 GetLevel() const;
inline void SetLevel(sal_uInt8);
- inline OUString GetNumber() const;
- inline OUString GetTitle() const;
+ inline const OUString& GetNumber() const;
+ inline const OUString& GetTitle() const;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
};
inline sal_uInt8 SwChapterField::GetLevel() const { return nLevel; }
inline void SwChapterField::SetLevel(sal_uInt8 nLev) { nLevel = nLev; }
-inline OUString SwChapterField::GetNumber() const { return sNumber; }
-inline OUString SwChapterField::GetTitle() const { return sTitle; }
+inline const OUString& SwChapterField::GetNumber() const { return sNumber; }
+inline const OUString& SwChapterField::GetTitle() const { return sTitle; }
#endif // INCLUDED_SW_INC_CHPFLD_HXX
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index ef00108213e1..5a9d07564bd3 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -46,7 +46,7 @@ public:
inline void AddRef() { nRefCnt++; }
void ReleaseRef();
- OUString GetColumnName() const {return sColumn;}
+ const OUString& GetColumnName() const {return sColumn;}
const SwDBData& GetDBData() const {return aDBData;}
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 583e902b3958..c916542ca462 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -451,7 +451,7 @@ public:
);
void setEmbeddedName(const OUString& rEmbeddedName, SwDocShell& rDocShell);
- OUString getEmbeddedName() const;
+ const OUString& getEmbeddedName() const;
static void StoreEmbeddedDataSource(const css::uno::Reference<css::frame::XStorable>& xStorable,
const css::uno::Reference<css::embed::XStorage>& xStorage,
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
index 7b9868638ac4..953f0ee6af06 100644
--- a/sw/inc/ddefld.hxx
+++ b/sw/inc/ddefld.hxx
@@ -45,7 +45,7 @@ public:
SfxLinkUpdateMode = SfxLinkUpdateMode::ONCALL );
virtual ~SwDDEFieldType();
- OUString GetExpansion() const { return aExpansion; }
+ const OUString& GetExpansion() const { return aExpansion; }
void SetExpansion( const OUString& rStr ) { aExpansion = rStr;
bCRLFFlag = false; }
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 1dbf4adb07f2..7b64365e679c 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -589,7 +589,7 @@ public:
bool getDocReadOnly() const { return mbReadOnly; }
void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; }
- const OUString getDocAccTitle() const { return msDocAccTitle; }
+ const OUString& getDocAccTitle() const { return msDocAccTitle; }
// INextInterface here
DECL_LINK_TYPED(CalcFieldValueHdl, EditFieldInfo*, void);
@@ -975,7 +975,7 @@ public:
void SetUpdateTOX( bool bFlag = true ) { mbUpdateTOX = bFlag; }
bool IsUpdateTOX() const { return mbUpdateTOX; }
- OUString GetTOIAutoMarkURL() const {return msTOIAutoMarkURL;}
+ const OUString& GetTOIAutoMarkURL() const {return msTOIAutoMarkURL;}
void SetTOIAutoMarkURL(const OUString& rSet) {msTOIAutoMarkURL = rSet;}
bool IsInReading() const { return mbInReading; }
@@ -1357,7 +1357,7 @@ public:
/** in case during copying of embedded object a new shell is created,
it should be set here and cleaned later */
void SetTmpDocShell( SfxObjectShellLock rLock ) { mxTmpDocShell = rLock; }
- SfxObjectShellLock GetTmpDocShell() { return mxTmpDocShell; }
+ const SfxObjectShellLock& GetTmpDocShell() { return mxTmpDocShell; }
// For Autotexts? (text modules) They have only one SVPersist at their disposal.
SfxObjectShell* GetPersist() const;
@@ -1596,7 +1596,7 @@ public:
// access methods for XForms model(s)
// access container for XForms model; will be NULL if !isXForms()
- css::uno::Reference<css::container::XNameContainer>
+ const css::uno::Reference<css::container::XNameContainer>&
getXForms() const { return mxXForms;}
css::uno::Reference< css::linguistic2::XProofreadingIterator > GetGCIterator() const;
@@ -1616,7 +1616,7 @@ public:
css::uno::Reference< css::script::vba::XVBAEventProcessor > GetVbaEventProcessor();
void SetVBATemplateToProjectCache( css::uno::Reference< css::container::XNameContainer >& xCache ) { m_xTemplateToProjectCache = xCache; };
- css::uno::Reference< css::container::XNameContainer > GetVBATemplateToProjectCache() { return m_xTemplateToProjectCache; };
+ const css::uno::Reference< css::container::XNameContainer >& GetVBATemplateToProjectCache() { return m_xTemplateToProjectCache; };
::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
::sw::MetaFieldManager & GetMetaFieldManager();
::sw::UndoManager & GetUndoManager();
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 18f6b70fdb97..32eb94b39139 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -173,7 +173,7 @@ public:
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
- OUString GetUserString() const { return sUserStr; }
+ const OUString& GetUserString() const { return sUserStr; }
void SetUserString( const OUString& rS ) { sUserStr = rS; }
};
@@ -197,7 +197,7 @@ public:
virtual SwField* Copy() const override;
inline void SetExpansion(const OUString& rStr) { aContent = rStr; }
- inline OUString GetContent() const { return aContent; }
+ const OUString& GetContent() const { return aContent; }
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
@@ -224,7 +224,7 @@ public:
virtual SwField* Copy() const override;
inline void SetExpansion(const OUString& rStr) { aContent = rStr; }
- inline OUString GetContent() const { return aContent; }
+ const OUString& GetContent() const { return aContent; }
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
@@ -402,7 +402,7 @@ public:
SwMacroField( SwMacroFieldType*, const OUString& rLibAndName,
const OUString& rText);
- inline OUString GetMacro() const { return aMacro; }
+ const OUString& GetMacro() const { return aMacro; }
OUString GetLibName() const;
OUString GetMacroName() const;
SvxMacro GetSvxMacro() const;
@@ -463,7 +463,7 @@ public:
virtual OUString Expand() const override;
virtual SwField* Copy() const override;
- inline const DateTime GetDateTime() const { return aDateTime; }
+ const DateTime& GetDateTime() const { return aDateTime; }
inline const Date GetDate() const { return aDateTime.GetDate(); }
inline const tools::Time GetTime() const { return aDateTime.GetTime(); }
@@ -513,10 +513,10 @@ public:
SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, const OUString& rValue, sal_uInt32 nFormat=0);
virtual void SetSubType(sal_uInt16) override;
- virtual sal_uInt16 GetSubType() const override;
+ virtual sal_uInt16 GetSubType() const override;
virtual void SetLanguage(sal_uInt16 nLng) override;
virtual OUString GetFieldName() const override;
- OUString GetName() const { return aName; }
+ const OUString& GetName() const { return aName; }
void SetName( const OUString& rName ) { aName = rName; }
inline void SetExpansion(const OUString& rStr) { aContent = rStr; }
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index c51f1bddf163..99c9c6e612a3 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -100,7 +100,7 @@ public:
virtual void SetValue( const double& rVal ) override;
virtual void SetLanguage(sal_uInt16 nLng) override;
- inline OUString GetExpStr() const;
+ inline const OUString& GetExpStr() const;
inline void ChgExpStr(const OUString& rExpand);
/// Called by formatting.
@@ -132,7 +132,7 @@ public:
inline void SwGetExpField::ChgExpStr(const OUString& rExpand)
{ sExpand = rExpand;}
-inline OUString SwGetExpField::GetExpStr() const
+inline const OUString& SwGetExpField::GetExpStr() const
{ return sExpand; }
/// Called by formatting.
@@ -173,16 +173,16 @@ public:
void SetDeleted( bool b ) { bDeleted = b; }
/// Overlay, because set-field takes care for its being updated by itself.
- inline OUString GetSetRefName() const;
+ inline const OUString& GetSetRefName() const;
void SetSeqRefNo( SwSetExpField& rField );
size_t GetSeqFieldList( SwSeqFieldList& rList );
/// Number sequence fields chapterwise if required.
- OUString GetDelimiter() const { return sDelim; }
+ const OUString& GetDelimiter() const { return sDelim; }
void SetDelimiter( const OUString& s ) { sDelim = s; }
- sal_uInt8 GetOutlineLvl() const { return nLevel; }
+ sal_uInt8 GetOutlineLvl() const { return nLevel; }
void SetOutlineLvl( sal_uInt8 n ) { nLevel = n; }
void SetChapter( SwSetExpField& rField, const SwNode& rNd );
@@ -204,7 +204,7 @@ inline void SwSetExpFieldType::SetType( sal_uInt16 nTyp )
inline sal_uInt16 SwSetExpFieldType::GetType() const
{ return nType; }
-inline OUString SwSetExpFieldType::GetSetRefName() const
+inline const OUString& SwSetExpFieldType::GetSetRefName() const
{ return sName; }
class SW_DLLPUBLIC SwSetExpField : public SwFormulaField
@@ -227,12 +227,12 @@ public:
virtual void SetValue( const double& rVal ) override;
- inline OUString GetExpStr() const;
+ inline const OUString& GetExpStr() const;
inline void ChgExpStr( const OUString& rExpand );
inline void SetPromptText(const OUString& rStr);
- inline OUString GetPromptText() const;
+ inline const OUString& GetPromptText() const;
inline void SetInputFlag(bool bInp);
inline bool GetInputFlag() const;
@@ -258,7 +258,7 @@ public:
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
};
-inline OUString SwSetExpField::GetExpStr() const
+inline const OUString& SwSetExpField::GetExpStr() const
{ return sExpand; }
inline void SwSetExpField::ChgExpStr( const OUString& rExpand )
@@ -267,7 +267,7 @@ inline void SwSetExpField::ChgExpStr( const OUString& rExpand )
inline void SwSetExpField::SetPromptText(const OUString& rStr)
{ aPText = rStr; }
-inline OUString SwSetExpField::GetPromptText() const
+inline const OUString& SwSetExpField::GetPromptText() const
{ return aPText; }
inline void SwSetExpField::SetInputFlag(bool bInp)
@@ -340,11 +340,11 @@ public:
virtual OUString GetPar2() const override;
virtual void SetPar2(const OUString& rStr) override;
- OUString GetHelp() const;
- void SetHelp(const OUString & rStr);
+ const OUString& GetHelp() const;
+ void SetHelp(const OUString & rStr);
- OUString GetToolTip() const;
- void SetToolTip(const OUString & rStr);
+ const OUString& GetToolTip() const;
+ void SetToolTip(const OUString & rStr);
virtual sal_uInt16 GetSubType() const override;
virtual void SetSubType(sal_uInt16 nSub) override;
@@ -403,10 +403,10 @@ public:
sal_uInt16 nSubType = 0, sal_uLong nFormat = 0);
virtual void SetValue( const double& rVal ) override;
- virtual sal_uInt16 GetSubType() const override;
+ virtual sal_uInt16 GetSubType() const override;
virtual void SetSubType(sal_uInt16 nType) override;
- OUString GetExpStr() const { return sExpand; }
+ const OUString& GetExpStr() const { return sExpand; }
void ChgExpStr(const OUString& rStr) { sExpand = rStr; }
void CalcField( SwTableCalcPara& rCalcPara );
diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx
index c736476060fa..4fb85b4c24e0 100644
--- a/sw/inc/fmtautofmt.hxx
+++ b/sw/inc/fmtautofmt.hxx
@@ -53,8 +53,8 @@ public:
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;
- void SetStyleHandle( std::shared_ptr<SfxItemSet> pHandle ) { mpHandle = pHandle; }
- const std::shared_ptr<SfxItemSet> GetStyleHandle() const { return mpHandle; }
+ void SetStyleHandle( const std::shared_ptr<SfxItemSet>& pHandle ) { mpHandle = pHandle; }
+ const std::shared_ptr<SfxItemSet>& GetStyleHandle() const { return mpHandle; }
void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
};
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
index 96f53dcf7845..eadf2320240b 100644
--- a/sw/inc/fmtftn.hxx
+++ b/sw/inc/fmtftn.hxx
@@ -64,7 +64,7 @@ public:
void InvalidateFootnote();
- OUString GetNumStr() const { return m_aNumber; }
+ const OUString& GetNumStr() const { return m_aNumber; }
sal_uInt16 GetNumber() const { return m_nNumber; }
bool IsEndNote() const { return m_bEndNote;}
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index b4ba789d582a..d660f9973153 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -212,7 +212,7 @@ public:
::std::vector< css::uno::Reference<css::text::XTextField> > getMetaFields();
/// Copy document properties from rSource to m_xDocumentProperties.
void copyDocumentProperties(const SwDoc& rSource);
- css::uno::Reference<css::document::XDocumentProperties> getDocumentProperties();
+ const css::uno::Reference<css::document::XDocumentProperties>& getDocumentProperties();
};
} // namespace sw
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 63018fda786f..e62120fdc759 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -67,7 +67,7 @@ public:
SwPageDesc *GetPageDesc() { return static_cast<SwPageDesc*>(GetRegisteredIn()); }
const SwPageDesc *GetPageDesc() const { return static_cast<const SwPageDesc*>(GetRegisteredIn()); }
- ::boost::optional<sal_uInt16> GetNumOffset() const { return oNumOffset; }
+ const ::boost::optional<sal_uInt16>& GetNumOffset() const { return oNumOffset; }
void SetNumOffset( const ::boost::optional<sal_uInt16>& oNum ) { oNumOffset = oNum; }
/// Query / set where attribute is anchored.
diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
index 62f27043e5de..8f8b68515a69 100644
--- a/sw/inc/fmtruby.hxx
+++ b/sw/inc/fmtruby.hxx
@@ -56,10 +56,10 @@ public:
const SwTextRuby* GetTextRuby() const { return pTextAttr; }
- OUString GetText() const { return sRubyText; }
+ const OUString& GetText() const { return sRubyText; }
void SetText( const OUString& rText ) { sRubyText = rText; }
- OUString GetCharFormatName() const { return sCharFormatName; }
+ const OUString& GetCharFormatName() const { return sCharFormatName; }
void SetCharFormatName( const OUString& rNm ) { sCharFormatName = rNm; }
sal_uInt16 GetCharFormatId() const { return nCharFormatId; }
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
index 20eb332719fa..b1de04e06685 100644
--- a/sw/inc/fmturl.hxx
+++ b/sw/inc/fmturl.hxx
@@ -63,13 +63,13 @@ public:
void SetURL(const OUString &rURL, bool bServerMap);
void SetMap( const ImageMap *pM ); ///< Pointer will be copied.
- OUString GetTargetFrameName()const { return sTargetFrameName; }
- OUString GetURL() const { return sURL; }
+ const OUString& GetTargetFrameName()const { return sTargetFrameName; }
+ const OUString& GetURL() const { return sURL; }
bool IsServerMap() const { return bIsServerMap; }
const ImageMap *GetMap() const { return pMap; }
ImageMap *GetMap() { return pMap; }
- OUString GetName() const { return sName; }
+ const OUString& GetName() const { return sName; }
void SetName( const OUString& rNm ) { sName = rNm; }
};
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index f629093fff73..747c6a8b448d 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -109,7 +109,7 @@ public:
inline SwFormat* DerivedFrom() const { return const_cast<SwFormat*>(static_cast<const SwFormat*>(GetRegisteredIn())); }
inline bool IsDefault() const { return DerivedFrom() == nullptr; }
- inline OUString GetName() const { return m_aFormatName; }
+ const OUString& GetName() const { return m_aFormatName; }
inline bool HasName(const OUString &rName) const { return m_aFormatName == rName; }
void SetName( const OUString& rNewName, bool bBroadcast=false );
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 6294d6a1c2f9..2748fa02abc1 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -255,7 +255,7 @@ class SwStringMsgPoolItem : public SwMsgPoolItem
OUString m_sStr;
public:
- OUString GetString() const { return m_sStr; }
+ const OUString& GetString() const { return m_sStr; }
SwStringMsgPoolItem( sal_uInt16 nId, const OUString& rStr )
: SwMsgPoolItem( nId ), m_sStr( rStr )
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
index 341e560109c3..4cd232e32479 100644
--- a/sw/inc/lineinfo.hxx
+++ b/sw/inc/lineinfo.hxx
@@ -64,7 +64,7 @@ public:
const SvxNumberType &GetNumType() const { return aType; }
void SetNumType( SvxNumberType aNew ){ aType = aNew; }
- OUString GetDivider() const { return aDivider; }
+ const OUString& GetDivider() const { return aDivider; }
void SetDivider( const OUString &r ) { aDivider = r; }
sal_uInt16 GetDividerCountBy() const { return nDividerCountBy; }
void SetDividerCountBy( sal_uInt16 n ) { nDividerCountBy = n; }
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index 0a58737c3ba3..543e6afb95b6 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -291,7 +291,7 @@ public:
{ bHTML ? (aWebTableConfig.bInsTableAlignNum = b) : (aTableConfig.bInsTableAlignNum = b);
bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
- SwInsertTableOptions GetInsTableFlags(bool bHTML) const
+ const SwInsertTableOptions& GetInsTableFlags(bool bHTML) const
{ return bHTML ? aWebInsertConfig.aInsTableOpts : aInsertConfig.aInsTableOpts;}
void SetInsTableFlags( bool bHTML, const SwInsertTableOptions& rOpts ) {
bHTML ? (aWebInsertConfig.aInsTableOpts = rOpts) : (aInsertConfig.aInsTableOpts = rOpts);
@@ -320,15 +320,15 @@ public:
bool IsAskForMailMerge() const { return aMiscConfig.bAskForMailMergeInPrint;}
- OUString GetNameFromColumn() const { return aMiscConfig.sNameFromColumn; }
+ const OUString& GetNameFromColumn() const { return aMiscConfig.sNameFromColumn; }
void SetNameFromColumn( const OUString& rSet ) { aMiscConfig.sNameFromColumn = rSet;
aMiscConfig.SetModified();}
- OUString GetMailingPath() const { return aMiscConfig.sMailingPath; }
+ const OUString& GetMailingPath() const { return aMiscConfig.sMailingPath; }
void SetMailingPath(const OUString& sPath) { aMiscConfig.sMailingPath = sPath;
aMiscConfig.SetModified();}
- OUString GetWordDelimiter() const { return aMiscConfig.sWordDelimiter; }
+ const OUString& GetWordDelimiter() const { return aMiscConfig.sWordDelimiter; }
void SetWordDelimiter(const OUString& sDelim) { aMiscConfig.sWordDelimiter = sDelim;
aMiscConfig.SetModified();}
diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx
index 15bf06052554..d05630f91789 100644
--- a/sw/inc/modeltoviewhelper.hxx
+++ b/sw/inc/modeltoviewhelper.hxx
@@ -162,7 +162,7 @@ public:
*/
ModelPosition ConvertToModelPosition( sal_Int32 nViewPos ) const;
- OUString getViewText() const { return m_aRetText; }
+ const OUString& getViewText() const { return m_aRetText; }
Positions const& getFieldPositions() const { return m_FieldPositions; }
Positions const& getFootnotePositions() const { return m_FootnotePositions;}
};
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index 3c29befdf9d2..776cdf7aedcf 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -180,7 +180,7 @@ public:
bool IsGrfLink() const { return refLink.Is(); }
bool IsLinkedFile() const;
bool IsLinkedDDE() const;
- tools::SvRef<sfx2::SvBaseLink> GetLink() const { return refLink; }
+ const tools::SvRef<sfx2::SvBaseLink>& GetLink() const { return refLink; }
bool GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const;
void ReleaseLink();
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index d5c78b7ae072..fe1bab2f599d 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -59,7 +59,7 @@ public:
const css::uno::Reference < css::embed::XEmbeddedObject > GetOleRef();
svt::EmbeddedObjectRef& GetObject();
- OUString GetCurrentPersistName() const { return aName; }
+ const OUString& GetCurrentPersistName() const { return aName; }
OUString GetStyleString();
bool IsOleRef() const; ///< To avoid unnecessary loading of object.
};
@@ -133,7 +133,7 @@ public:
// #i99665#
bool IsChart() const;
- OUString GetChartTableName() const { return sChartTableName; }
+ const OUString& GetChartTableName() const { return sChartTableName; }
void SetChartTableName( const OUString& rNm ) { sChartTableName = rNm; }
};
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index f6c8ec9321b4..1d7f8b7d1e60 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -194,7 +194,7 @@ public:
{
msDefaultListId = sDefaultListId;
}
- inline OUString GetDefaultListId() const
+ const OUString& GetDefaultListId() const
{
return msDefaultListId;
}
@@ -224,7 +224,7 @@ public:
and copies them if appropriate. */
void CheckCharFormats( SwDoc* pDoc );
- OUString GetName() const { return msName; }
+ const OUString& GetName() const { return msName; }
void SetName( const OUString& rNm,
IDocumentListsAccess& rDocListAccess );
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 4553d81849e5..d55e85117808 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -166,7 +166,7 @@ protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue ) override;
public:
- OUString GetName() const { return m_StyleName; }
+ const OUString& GetName() const { return m_StyleName; }
void SetName(const OUString& rNewName) { m_StyleName = rNewName; }
bool GetLandscape() const { return m_IsLandscape; }
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index 52710893ffdc..f51bf9fa4edb 100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -153,7 +153,7 @@ public:
bool IsPrintBlackFont() const { return m_bPrintBlackFont; }
bool IsPrintSingleJobs() const { return m_bPrintSingleJobs; }
SwPostItMode GetPrintPostIts() const { return m_nPrintPostIts; }
- const OUString GetFaxName() const { return m_sFaxName; }
+ const OUString& GetFaxName() const { return m_sFaxName; }
bool IsPrintHiddenText() const { return m_bPrintHiddenText; }
bool IsPrintTextPlaceholder() const { return m_bPrintTextPlaceholder; }
@@ -290,7 +290,7 @@ public:
PagePairsVec_t & GetPagePairsForProspectPrinting() { return m_aPagePairs; }
const PagePairsVec_t & GetPagePairsForProspectPrinting() const { return m_aPagePairs; }
- OUString GetPageRange() const { return m_aPageRange; }
+ const OUString& GetPageRange() const { return m_aPageRange; }
void SetPageRange( const OUString &rRange ) { m_aPageRange = rRange; }
};
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 010e08a82dec..5257afea4ba1 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -103,7 +103,7 @@ public:
virtual OUString GetFieldName() const override;
- OUString GetSetRefName() const { return sSetRefName; }
+ const OUString& GetSetRefName() const { return sSetRefName; }
// #i81002#
/** The <SwTextField> instance, which represents the text attribute for the
diff --git a/sw/inc/rubylist.hxx b/sw/inc/rubylist.hxx
index 9de8d05f782f..680379f3d2e3 100644
--- a/sw/inc/rubylist.hxx
+++ b/sw/inc/rubylist.hxx
@@ -33,7 +33,7 @@ public:
SwRubyListEntry() : m_aRubyAttr( OUString() ) {}
~SwRubyListEntry();
- OUString GetText() const { return m_sText; }
+ const OUString& GetText() const { return m_sText; }
void SetText( const OUString& rStr ) { m_sText = rStr; }
const SwFormatRuby& GetRubyAttr() const { return m_aRubyAttr; }
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index d98df2cf3993..4fea7232048c 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -90,7 +90,7 @@ public:
SwSectionData & operator=(SwSectionData const&);
bool operator==(SwSectionData const&) const;
- OUString GetSectionName() const { return m_sSectionName; }
+ const OUString& GetSectionName() const { return m_sSectionName; }
void SetSectionName(OUString const& rName){ m_sSectionName = rName; }
SectionType GetType() const { return m_eType; }
void SetType(SectionType const eNew) { m_eType = eNew; }
@@ -111,16 +111,16 @@ public:
void SetCondHidden(bool const bFlag = true) { m_bCondHiddenFlag = bFlag; }
bool IsCondHidden() const { return m_bCondHiddenFlag; }
- OUString GetCondition() const { return m_sCondition; }
+ const OUString& GetCondition() const { return m_sCondition; }
void SetCondition(OUString const& rNew) { m_sCondition = rNew; }
- OUString GetLinkFileName() const { return m_sLinkFileName; }
+ const OUString& GetLinkFileName() const { return m_sLinkFileName; }
void SetLinkFileName(OUString const& rNew)
{
m_sLinkFileName = rNew;
}
- OUString GetLinkFilePassword() const { return m_sLinkFilePassword; }
+ const OUString& GetLinkFilePassword() const { return m_sLinkFilePassword; }
void SetLinkFilePassword(OUString const& rS){ m_sLinkFilePassword = rS; }
css::uno::Sequence<sal_Int8> const& GetPassword() const
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 6c6160224602..d3b7f200733b 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -67,7 +67,7 @@ class SW_DLLPUBLIC SwAsciiOptions
public:
- OUString GetFontName() const { return sFont; }
+ const OUString& GetFontName() const { return sFont; }
void SetFontName( const OUString& rFont ) { sFont = rFont; }
rtl_TextEncoding GetCharSet() const { return eCharSet; }
@@ -167,7 +167,7 @@ public:
bool HasGlossaries( const Reader& );
bool ReadGlossaries( const Reader&, SwTextBlocks&, bool bSaveRelFiles );
- OUString GetBaseURL() const { return sBaseURL;}
+ const OUString& GetBaseURL() const { return sBaseURL;}
protected:
void SetBaseURL( const OUString& rURL ) { sBaseURL = rURL; }
@@ -251,8 +251,8 @@ public:
virtual size_t GetSectionList( SfxMedium& rMedium,
std::vector<OUString*>& rStrings ) const;
- tools::SvRef<SotStorage> getSotStorageRef() { return pStg; };
- void setSotStorageRef(tools::SvRef<SotStorage> pStgRef) { pStg = pStgRef; };
+ const tools::SvRef<SotStorage>& getSotStorageRef() { return pStg; };
+ void setSotStorageRef(const tools::SvRef<SotStorage>& pStgRef) { pStg = pStgRef; };
private:
virtual sal_uLong Read(SwDoc &, const OUString& rBaseURL, SwPaM &, const OUString &)=0;
@@ -276,7 +276,7 @@ class SW_DLLPUBLIC StgReader : public Reader
public:
virtual int GetReaderType() override;
- OUString GetFltName() { return aFltName; }
+ const OUString& GetFltName() { return aFltName; }
virtual void SetFltName( const OUString& r ) override;
};
@@ -421,7 +421,7 @@ public:
const SwAsciiOptions& GetAsciiOptions() const { return aAscOpts; }
void SetAsciiOptions( const SwAsciiOptions& rOpt ) { aAscOpts = rOpt; }
- OUString GetBaseURL() const { return sBaseURL;}
+ const OUString& GetBaseURL() const { return sBaseURL;}
// Look up next bookmark position from bookmark-table.
sal_Int32 FindPos_Bkmk( const SwPosition& rPos ) const;
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index 9b1457dc6b0e..e601d71f5586 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -146,7 +146,7 @@ public:
{
xHyphWord = rxHW;
}
- css::uno::Reference< css::linguistic2::XHyphenatedWord > GetHyphWord()
+ const css::uno::Reference< css::linguistic2::XHyphenatedWord >& GetHyphWord()
{
return xHyphWord;
}
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
index 05b74ee71a07..eb5607e8d709 100644
--- a/sw/inc/swmodule.hxx
+++ b/sw/inc/swmodule.hxx
@@ -229,7 +229,7 @@ public:
static void CheckSpellChanges( bool bOnlineSpelling,
bool bIsSpellWrongAgain, bool bIsSpellAllAgain, bool bSmartTags );
- inline css::uno::Reference< css::linguistic2::XLinguServiceEventListener >
+ inline const css::uno::Reference< css::linguistic2::XLinguServiceEventListener >&
GetLngSvcEvtListener();
void CreateLngSvcEvtListener();
@@ -240,7 +240,7 @@ public:
GetLanguageGuesser();
};
-inline css::uno::Reference< css::linguistic2::XLinguServiceEventListener >
+inline const css::uno::Reference< css::linguistic2::XLinguServiceEventListener >&
SwModule::GetLngSvcEvtListener()
{
return m_xLinguServiceEventListener;
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 09ad765a8e6c..327e168da7f3 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -177,7 +177,7 @@ public:
bool IsNewModel() const { return m_bNewModel; }
/// Return the table style name of this table.
- OUString GetTableStyleName() const { return maTableStyleName; }
+ const OUString& GetTableStyleName() const { return maTableStyleName; }
/// Set the new table style name for this table.
void SetTableStyleName(const OUString& rName) { maTableStyleName = rName; }
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index 38dbe06aacab..016fdfc041ab 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -266,7 +266,7 @@ public:
const SwBoxAutoFormat& GetBoxFormat( sal_uInt8 nPos ) const;
void SetName( const OUString& rNew ) { m_aName = rNew; nStrResId = USHRT_MAX; }
- OUString GetName() const { return m_aName; }
+ const OUString& GetName() const { return m_aName; }
enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 };
void UpdateFromSet( sal_uInt8 nPos, const SfxItemSet& rSet,
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 13d1e15d1df8..a025b7d699df 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -100,17 +100,17 @@ public:
OUString GetText() const;
inline bool IsAlternativeText() const;
- inline OUString GetAlternativeText() const;
+ inline const OUString& GetAlternativeText() const;
inline void SetAlternativeText( const OUString& rAlt );
// content or user defined index
inline void SetLevel(sal_uInt16 nLevel);
- inline sal_uInt16 GetLevel() const;
+ inline sal_uInt16 GetLevel() const;
inline void SetBookmarkName( const OUString& bName);
- inline OUString GetBookmarkName() const;
+ inline const OUString& GetBookmarkName() const;
inline void SetEntryTypeName( const OUString& sName);
- inline OUString GetEntryTypeName() const;
+ inline const OUString& GetEntryTypeName() const;
// for alphabetical index only
inline void SetPrimaryKey(const OUString& rStr );
@@ -155,7 +155,7 @@ public:
// @@@ public copy ctor, but no copy assignment?
SwTOXType(const SwTOXType& rCopy);
- inline OUString GetTypeName() const;
+ inline const OUString& GetTypeName() const;
inline TOXTypes GetType() const;
private:
@@ -438,7 +438,7 @@ public:
sal_uInt16 GetCreateType() const; // creation types
- OUString GetTOXName() const {return m_aName;}
+ const OUString& GetTOXName() const {return m_aName;}
void SetTOXName(const OUString& rSet) {m_aName = rSet;}
// for record the TOC field expression of MS Word binary format
@@ -447,8 +447,8 @@ public:
void EnableKeepExpression() {mbKeepExpression = true;}
void DisableKeepExpression() {mbKeepExpression = false;}
- OUString GetTitle() const; // Title
- OUString GetBookmarkName() const;
+ const OUString& GetTitle() const; // Title
+ const OUString& GetBookmarkName() const;
OUString GetTypeName() const; // Name
const SwForm& GetTOXForm() const; // description of the lines
@@ -459,11 +459,11 @@ public:
TOXTypes GetType() const;
- OUString GetMainEntryCharStyle() const {return m_sMainEntryCharStyle;}
+ const OUString& GetMainEntryCharStyle() const {return m_sMainEntryCharStyle;}
void SetMainEntryCharStyle(const OUString& rSet) {m_sMainEntryCharStyle = rSet;}
// for record the Index field expression of MS Word
- OUString GetEntryTypeName() const;
+ const OUString& GetEntryTypeName() const;
void SetEntryTypeName(const OUString& sName);
// content index only
@@ -502,7 +502,7 @@ public:
bool IsProtected() const { return m_bProtected; }
void SetProtected(bool bSet) { m_bProtected = bSet; }
- OUString GetSequenceName() const {return m_sSequenceName;}
+ const OUString& GetSequenceName() const {return m_sSequenceName;}
void SetSequenceName(const OUString& rSet) {m_sSequenceName = rSet;}
SwCaptionDisplay GetCaptionDisplay() const { return m_eCaptionDisplay;}
@@ -516,7 +516,7 @@ public:
LanguageType GetLanguage() const {return m_eLanguage;}
void SetLanguage(LanguageType nLang) {m_eLanguage = nLang;}
- OUString GetSortAlgorithm()const {return m_sSortAlgorithm;}
+ const OUString& GetSortAlgorithm()const {return m_sSortAlgorithm;}
void SetSortAlgorithm(const OUString& rSet) {m_sSortAlgorithm = rSet;}
// #i21237#
void AdjustTabStops( SwDoc & rDoc )
@@ -530,13 +530,13 @@ public:
//SwTOXMark
-inline OUString SwTOXMark::GetAlternativeText() const
+inline const OUString& SwTOXMark::GetAlternativeText() const
{ return m_aAltText; }
-inline OUString SwTOXMark::GetBookmarkName() const
+inline const OUString& SwTOXMark::GetBookmarkName() const
{ return m_aBookmarkName; }
-inline OUString SwTOXMark::GetEntryTypeName() const
+inline const OUString& SwTOXMark::GetEntryTypeName() const
{ return m_aEntryTypeName; }
inline const SwTOXType* SwTOXMark::GetTOXType() const
@@ -663,7 +663,7 @@ inline sal_uInt16 SwForm::GetFormMax() const
//SwTOXType
-inline OUString SwTOXType::GetTypeName() const
+inline const OUString& SwTOXType::GetTypeName() const
{ return m_aName; }
inline TOXTypes SwTOXType::GetType() const
@@ -677,13 +677,13 @@ inline const SwTOXType* SwTOXBase::GetTOXType() const
inline sal_uInt16 SwTOXBase::GetCreateType() const
{ return m_nCreateType; }
-inline OUString SwTOXBase::GetTitle() const
+inline const OUString& SwTOXBase::GetTitle() const
{ return m_aTitle; }
-inline OUString SwTOXBase::GetBookmarkName() const
+inline const OUString& SwTOXBase::GetBookmarkName() const
{ return m_aBookmarkName; }
-inline OUString SwTOXBase::GetEntryTypeName() const
+inline const OUString& SwTOXBase::GetEntryTypeName() const
{ return m_aEntryTypeName; }
inline OUString SwTOXBase::GetTypeName() const
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index 8a14e748f377..1f66b81c81f0 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -272,7 +272,7 @@ public:
SwShapeDescriptor_Impl* GetDescImpl() {return pImpl;}
SwFrameFormat* GetFrameFormat() const { return const_cast<SwFrameFormat*>(static_cast<const SwFrameFormat*>(GetRegisteredIn())); }
- css::uno::Reference< css::uno::XAggregation > GetAggregationInterface() {return xShapeAgg;}
+ const css::uno::Reference< css::uno::XAggregation >& GetAggregationInterface() {return xShapeAgg;}
// helper
static void AddExistingShapeToFormat( SdrObject& _rObj );
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index 7e10aca52564..dff4f1f8aee0 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -204,7 +204,7 @@ public:
static bool isInvalidStyle(const OUString &rName);
void Invalidate() {pDocShell = nullptr;}
- OUString GetCreatedNumRuleName() const {return m_sCreatedNumRuleName;}
+ const OUString& GetCreatedNumRuleName() const {return m_sCreatedNumRuleName;}
static css::uno::Sequence<css::beans::PropertyValue> GetPropertiesForNumFormat(
const SwNumFormat& rFormat, OUString const& rCharFormatName,
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx
index 4976f07ca99e..2e3f9bbc3971 100644
--- a/sw/source/core/doc/list.cxx
+++ b/sw/source/core/doc/list.cxx
@@ -35,9 +35,9 @@ class SwListImpl
const SwNodes& rNodes );
~SwListImpl();
- const OUString GetListId() const { return msListId;}
+ const OUString& GetListId() const { return msListId;}
- const OUString GetDefaultListStyleName() const { return msDefaultListStyleName;}
+ const OUString& GetDefaultListStyleName() const { return msDefaultListStyleName;}
void InsertListItem( SwNodeNum& rNodeNum,
const int nLevel );
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 6ab9acca5ece..b6bc8cfc5491 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -1070,7 +1070,7 @@ namespace numfunc
public:
static SwDefBulletConfig& getInstance();
- inline OUString GetFontname() const
+ const OUString& GetFontname() const
{
return msFontname;
}
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index c4e59c7083c5..185e17e14b7c 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -132,8 +132,8 @@ public:
bool SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCheck);
void ToSentenceStart();
- const svx::SpellPortions GetLastPortions() const { return aLastPortions;}
- SpellContentPositions GetLastPositions() const {return aLastPositions;}
+ const svx::SpellPortions& GetLastPortions() const { return aLastPortions;}
+ const SpellContentPositions& GetLastPositions() const {return aLastPositions;}
void ContinueAfterThisSentence() { bMoveToEndOfSentence = true; }
};
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index bba4902f21eb..64c9948da397 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1316,7 +1316,7 @@ void SwInputField::SetHelp(const OUString & rStr)
aHelp = rStr;
}
-OUString SwInputField::GetHelp() const
+const OUString& SwInputField::GetHelp() const
{
return aHelp;
}
@@ -1326,7 +1326,7 @@ void SwInputField::SetToolTip(const OUString & rStr)
aToolTip = rStr;
}
-OUString SwInputField::GetToolTip() const
+const OUString& SwInputField::GetToolTip() const
{
return aToolTip;
}
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index ada742b128d2..dbd1d94cba8e 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -941,7 +941,7 @@ public:
void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rField, bool bField );
- OUString GetName() { return aName; }
+ const OUString& GetName() { return aName; }
};
/// Get a sorted list of the field IDs from a document.
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index 8736273ee4c4..df6686a5bbf4 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -94,13 +94,13 @@ public:
OUString GetLongName( sal_uInt16 ) const; /// Return longname for index
OUString GetPackageName( sal_uInt16 ) const; /// Return packagename for index
- OUString GetFileName() const {return aFile;} /// Return physical file name
+ const OUString& GetFileName() const {return aFile;} /// Return physical file name
void SetName( const OUString& rName ) /// Logic name
{ aName = rName; bInfoChanged = true; }
- OUString GetName()
+ const OUString& GetName()
{ return aName; }
- OUString GetBaseURL() const { return sBaseURL;}
+ const OUString& GetBaseURL() const { return sBaseURL;}
void SetBaseURL( const OUString& rURL ) { sBaseURL = rURL; }
virtual sal_uLong Delete( sal_uInt16 ) = 0;
diff --git a/sw/source/core/text/guess.hxx b/sw/source/core/text/guess.hxx
index 750acf5d764a..e8023c26ed47 100644
--- a/sw/source/core/text/guess.hxx
+++ b/sw/source/core/text/guess.hxx
@@ -54,7 +54,7 @@ public:
inline sal_Int32 BreakStart() const { return nBreakStart; }
inline sal_Int32 BreakPos() const {return nBreakPos; }
inline sal_Int32 FieldDiff() const {return nFieldDiff; }
- inline css::uno::Reference< css::linguistic2::XHyphenatedWord > HyphWord() const
+ const css::uno::Reference< css::linguistic2::XHyphenatedWord >& HyphWord() const
{ return xHyphWord; }
};
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 941589c9baaf..d62e1725e7d7 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -344,7 +344,7 @@ public:
{ return ( m_pKanaComp && m_nKanaIdx < m_pKanaComp->size() )
? (*m_pKanaComp)[m_nKanaIdx] : 0; }
- std::shared_ptr<vcl::TextLayoutCache> GetCachedVclData() const
+ const std::shared_ptr<vcl::TextLayoutCache>& GetCachedVclData() const
{
return m_pCachedVclData;
}
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 06e6ca84b9c9..cc5e350dbefa 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -64,7 +64,7 @@ public:
// #i89179# - made public
inline const SwFont *GetFont() const { return pFnt; }
- inline OUString GetExp() const { return aExpand; }
+ const OUString& GetExp() const { return aExpand; }
virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
virtual bool Format( SwTextFormatInfo &rInf ) override;
virtual void Paint( const SwTextPaintInfo &rInf ) const override;
diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx
index e5fe68a125c4..2d4e9aaddd41 100644
--- a/sw/source/core/text/porftn.hxx
+++ b/sw/source/core/text/porftn.hxx
@@ -68,7 +68,7 @@ public:
virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
void SetNumber( const OUString& rStr ) { aErgo = rStr; }
- const OUString GetQuoText() const { return aExpand; }
+ const OUString& GetQuoText() const { return aExpand; }
const OUString &GetContText() const { return aErgo; }
// Field cloner for SplitGlue
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index d4a481268029..01cae73ed3b3 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -840,7 +840,7 @@ void MetaFieldManager::copyDocumentProperties(const SwDoc& rSource)
m_xDocumentProperties.set(xCloneable->createClone(), uno::UNO_QUERY);
}
-uno::Reference<document::XDocumentProperties> MetaFieldManager::getDocumentProperties()
+const uno::Reference<document::XDocumentProperties>& MetaFieldManager::getDocumentProperties()
{
return m_xDocumentProperties;
}
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 5e07f5ef668b..4682d407616e 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -362,12 +362,12 @@ public:
//SfxListener
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
- OUString GetStyleName() const { return m_sStyleName;}
+ const OUString& GetStyleName() const { return m_sStyleName;}
SfxStyleFamily GetFamily() const {return m_rEntry.m_eFamily;}
bool IsDescriptor() const {return m_bIsDescriptor;}
bool IsConditional() const { return m_bIsConditional;}
- OUString GetParentStyleName() const { return m_sParentStyleName;}
+ const OUString& GetParentStyleName() const { return m_sParentStyleName;}
void SetDoc(SwDoc* pDc, SfxStyleSheetBasePool* pPool)
{
m_bIsDescriptor = false; m_pDoc = pDc;
diff --git a/sw/source/filter/ascii/wrtasc.hxx b/sw/source/filter/ascii/wrtasc.hxx
index fa58306acf04..cf315afdceef 100644
--- a/sw/source/filter/ascii/wrtasc.hxx
+++ b/sw/source/filter/ascii/wrtasc.hxx
@@ -36,7 +36,7 @@ public:
SwASCWriter( const OUString& rFilterName );
virtual ~SwASCWriter();
- OUString GetLineEnd() const { return m_sLineEnd; }
+ const OUString& GetLineEnd() const { return m_sLineEnd; }
};
#endif // _ INCLUDED_SW_SOURCE_FILTER_ASCII_WRTASC_HXX
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 9c798ab5fcb0..4649e0015b92 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -250,7 +250,7 @@ public:
inline void SetWidth( sal_uInt16 nWidth, bool bRelWidth );
const SvxBrushItem *GetBGBrush() const { return pBGBrush; }
- std::shared_ptr<SvxBoxItem> GetBoxItem() const { return m_pBoxItem; }
+ const std::shared_ptr<SvxBoxItem>& GetBoxItem() const { return m_pBoxItem; }
inline bool GetNumFormat( sal_uInt32& rNumFormat ) const;
inline bool GetValue( double& rValue ) const;
diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx
index 24f7cae08a1f..f77c3ec14e95 100644
--- a/sw/source/filter/ww8/WW8TableInfo.hxx
+++ b/sw/source/filter/ww8/WW8TableInfo.hxx
@@ -138,7 +138,7 @@ public:
long right() const { return m_aRect.Right(); }
long width() const { return m_aRect.Width(); }
long height() const { return m_aRect.Height(); }
- SwRect getRect() const { return m_aRect; }
+ const SwRect& getRect() const { return m_aRect; }
WW8TableNodeInfo * getTableNodeInfo() const
{ return m_pNodeInfo; }
unsigned long getFormatFrameWidth() const
@@ -250,9 +250,9 @@ public:
void setWidths(WidthsPtr pGridCols);
void setRowSpans(RowSpansPtr pRowSpans);
- TableBoxVectorPtr getTableBoxVector() const { return m_pTableBoxVector;}
- WidthsPtr getWidths() const { return m_pWidths;}
- RowSpansPtr getRowSpans() const { return m_pRowSpans;}
+ const TableBoxVectorPtr& getTableBoxVector() const { return m_pTableBoxVector;}
+ const WidthsPtr& getWidths() const { return m_pWidths;}
+ const RowSpansPtr& getRowSpans() const { return m_pRowSpans;}
};
class WW8TableCellGrid
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 4089d295eb44..1190d3aa8a45 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -949,7 +949,7 @@ public:
void SetSerializer( ::sax_fastparser::FSHelperPtr pSerializer );
/// Occasionally need to use this serializer from the outside
- ::sax_fastparser::FSHelperPtr GetSerializer( ) { return m_pSerializer; }
+ const ::sax_fastparser::FSHelperPtr& GetSerializer( ) { return m_pSerializer; }
/// Do we have any footnotes?
bool HasFootnotes() const;
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 30fe79528a9d..047b497dcce5 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -268,7 +268,7 @@ public:
/// Set the document default tab stop.
void setDefaultTabStop( int stop ) { m_aSettings.defaultTabStop = stop; }
- ::sax_fastparser::FSHelperPtr GetFS() { return mpFS; }
+ const ::sax_fastparser::FSHelperPtr& GetFS() { return mpFS; }
void SetFS(::sax_fastparser::FSHelperPtr mpFS);
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index 5be0823fed39..df227a8d2f96 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -189,7 +189,7 @@ namespace ww8
@return
the best size to use to export to word
*/
- const Size GetSize() const { return maSize; }
+ const Size& GetSize() const { return maSize; }
/** The layout size of the contained element
@@ -197,7 +197,7 @@ namespace ww8
@return layout size
*/
- const Size GetLayoutSize() const
+ const Size& GetLayoutSize() const
{
return maLayoutSize;
}
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index a9e1b77872ce..b0b970e1c7b7 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -557,7 +557,7 @@ namespace sw
explicit Position(const SwPosition &rPos);
Position(const Position &rPos);
operator SwPosition() const;
- SwNodeIndex GetPtNode() { return maPtNode; };
+ const SwNodeIndex& GetPtNode() { return maPtNode; };
sal_Int32 GetPtContent() { return mnPtContent; };
};
}
@@ -583,8 +583,8 @@ class WW8FieldEntry
SwNodeIndex GetPtNode() { return maStartPos.GetPtNode(); };
sal_Int32 GetPtContent() { return maStartPos.GetPtContent(); };
- OUString GetBookmarkName() { return msBookmarkName;}
- OUString GetBookmarkCode() { return msMarkCode;}
+ const OUString& GetBookmarkName() { return msBookmarkName;}
+ const OUString& GetBookmarkCode() { return msMarkCode;}
void SetBookmarkName(const OUString& bookmarkName);
void SetBookmarkType(const OUString& bookmarkType);
void SetBookmarkCode(const OUString& bookmarkCode);
diff --git a/sw/source/filter/ww8/ww8toolbar.hxx b/sw/source/filter/ww8/ww8toolbar.hxx
index 0f84cf35bb6c..dce6ea9e053c 100644
--- a/sw/source/filter/ww8/ww8toolbar.hxx
+++ b/sw/source/filter/ww8/ww8toolbar.hxx
@@ -18,7 +18,7 @@ class Xst : public TBBase
public:
Xst(){}
bool Read(SvStream &rS) override;
- OUString getString() { return sString; }
+ const OUString& getString() const { return sString; }
#if OSL_DEBUG_LEVEL > 1
virtual void Print( FILE* fp ) override;
#endif
diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx
index 0a959a757e83..0a5231a20790 100644
--- a/sw/source/filter/xml/xmlimpit.hxx
+++ b/sw/source/filter/xml/xmlimpit.hxx
@@ -71,7 +71,7 @@ public:
SvXMLUnitConverter const& rUnitConverter) const;
virtual void setMapEntries( SvXMLItemMapEntriesRef rMapEntries );
- inline SvXMLItemMapEntriesRef getMapEntries() const;
+ inline const SvXMLItemMapEntriesRef& getMapEntries() const;
/** This method is called for every item that should be set based
upon an XML attribute value. */
@@ -82,7 +82,7 @@ public:
const SvXMLUnitConverter& rUnitConverter );
};
-inline SvXMLItemMapEntriesRef
+inline const SvXMLItemMapEntriesRef&
SvXMLImportItemMapper::getMapEntries() const
{
return mrMapEntries;
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index c1bd01a8f8a2..bbae48f0f564 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -85,7 +85,7 @@ public:
sal_Int32 FindNextStringPiece( sal_Int32 _nStart = -1 );
OUString GetResult() const;
- OUString GetFieldName()const { return aFieldName; }
+ const OUString& GetFieldName()const { return aFieldName; }
};
SwVbaReadFieldParams::SwVbaReadFieldParams( const OUString& _rData )
diff --git a/sw/source/ui/vba/vbalisthelper.hxx b/sw/source/ui/vba/vbalisthelper.hxx
index 88a773ec340c..86c449fa7072 100644
--- a/sw/source/ui/vba/vbalisthelper.hxx
+++ b/sw/source/ui/vba/vbalisthelper.hxx
@@ -45,7 +45,7 @@ public:
SwVbaListHelper( const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) throw( css::uno::RuntimeException );
sal_Int32 getGalleryType() const { return mnGalleryType; }
- css::uno::Reference< css::container::XIndexReplace > getNumberingRules() const { return mxNumberingRules; }
+ const css::uno::Reference< css::container::XIndexReplace >& getNumberingRules() const { return mxNumberingRules; }
css::uno::Any getPropertyValueWithNameAndLevel( sal_Int32 nLevel, const OUString& sName ) throw( css::uno::RuntimeException );
void setPropertyValueWithNameAndLevel( sal_Int32 nLevel, const OUString& sName, const css::uno::Any& aValue ) throw( css::uno::RuntimeException );
diff --git a/sw/source/ui/vba/vbapalette.hxx b/sw/source/ui/vba/vbapalette.hxx
index e20fba925800..a699681e02c5 100644
--- a/sw/source/ui/vba/vbapalette.hxx
+++ b/sw/source/ui/vba/vbapalette.hxx
@@ -28,7 +28,7 @@ public:
VbaPalette();
// if no palette available e.g. because the document doesn't have a
// palette defined then a default palette will be returned.
- css::uno::Reference< css::container::XIndexAccess > getPalette() const { return mxPalette;}
+ const css::uno::Reference< css::container::XIndexAccess >& getPalette() const { return mxPalette;}
};
#endif
diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx
index 83cb2c641751..c9e096660a6b 100644
--- a/sw/source/ui/vba/vbarange.hxx
+++ b/sw/source/ui/vba/vbarange.hxx
@@ -46,10 +46,10 @@ public:
SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, const css::uno::Reference< css::text::XText >& rText) throw (css::script::BasicErrorException, css::uno::RuntimeException);
virtual ~SwVbaRange();
- css::uno::Reference< css::text::XTextDocument > getDocument() const { return mxTextDocument; }
+ const css::uno::Reference< css::text::XTextDocument >& getDocument() const { return mxTextDocument; }
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() throw (css::uno::RuntimeException, std::exception) override;
- css::uno::Reference< css::text::XText > getXText() const { return mxText; }
+ const css::uno::Reference< css::text::XText >& getXText() const { return mxText; }
void setXTextCursor( const css::uno::Reference< css::text::XTextCursor >& xTextCursor ) { mxTextCursor = xTextCursor; }
// Attribute
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 5d4914f52962..92c6112919cc 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -3046,7 +3046,7 @@ void SwDBManager::setEmbeddedName(const OUString& rEmbeddedName, SwDocShell& rDo
pImpl->m_xDataSourceRemovedListener = new SwDataSourceRemovedListener(*this);
}
-OUString SwDBManager::getEmbeddedName() const
+const OUString& SwDBManager::getEmbeddedName() const
{
return m_sEmbeddedName;
}
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index f97f05b63d70..5e00af7fff22 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -81,7 +81,7 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper < XContainerListener >
bool HasContext();
SwWrtShell* GetWrtShell() { return m_pWrtShell;}
void SetWrtShell(SwWrtShell& rSh) { m_pWrtShell = &rSh;}
- Reference<XDatabaseContext> GetContext() const {return m_xDatabaseContext;}
+ const Reference<XDatabaseContext>& GetContext() const {return m_xDatabaseContext;}
Reference<XConnection> GetConnection(const OUString& rSourceName);
};
diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx
index 193db7105c78..2afa1f8cd21e 100644
--- a/sw/source/uibase/inc/break.hxx
+++ b/sw/source/uibase/inc/break.hxx
@@ -67,9 +67,9 @@ public:
virtual ~SwBreakDlg();
virtual void dispose() override;
- OUString GetTemplateName() { return aTemplate; }
+ const OUString& GetTemplateName() { return aTemplate; }
sal_uInt16 GetKind() { return nKind; }
- ::boost::optional<sal_uInt16> GetPageNumber() { return oPgNum; }
+ const ::boost::optional<sal_uInt16>& GetPageNumber() { return oPgNum; }
};
#endif
diff --git a/sw/source/uibase/inc/concustomshape.hxx b/sw/source/uibase/inc/concustomshape.hxx
index d49565d196ba..e18604a3fc4d 100644
--- a/sw/source/uibase/inc/concustomshape.hxx
+++ b/sw/source/uibase/inc/concustomshape.hxx
@@ -44,7 +44,7 @@ class ConstCustomShape : public SwDrawBase
virtual void Activate(const sal_uInt16 nSlotId) override; // activate function
- OUString GetShapeType() const;
+ const OUString& GetShapeType() const;
static OUString GetShapeTypeFromRequest( SfxRequest& rReq );
virtual void CreateDefaultObject() override;
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index 96c1d5a7898c..936bbbe301a8 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -248,11 +248,11 @@ public:
void StartExecuteDrag();
void DragFinished();
- static Color GetWaterCanTextColor() { return m_aWaterCanTextColor; }
+ static const Color& GetWaterCanTextColor() { return m_aWaterCanTextColor; }
static void SetWaterCanTextColor(const Color& rCol ) { m_aWaterCanTextColor = rCol; }
- static Color GetWaterCanTextBackColor()
+ static const Color& GetWaterCanTextBackColor()
{ return m_aWaterCanTextBackColor; }
static void SetWaterCanTextBackColor(const Color& rCol )
{ m_aWaterCanTextBackColor = rCol; }
diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx
index 0d479b19c0e1..ff6ae62304fe 100644
--- a/sw/source/uibase/inc/fldmgr.hxx
+++ b/sw/source/uibase/inc/fldmgr.hxx
@@ -133,8 +133,8 @@ public:
const OUString& rPar2,
SwField * _pField = nullptr);
- OUString GetCurFieldPar1() const { return aCurPar1; }
- OUString GetCurFieldPar2() const { return aCurPar2; }
+ const OUString& GetCurFieldPar1() const { return aCurPar1; }
+ const OUString& GetCurFieldPar2() const { return aCurPar2; }
// determine a field
SwField* GetCurField();
@@ -143,8 +143,8 @@ public:
bool ChooseMacro(const OUString &rSelMacro = OUString());
void SetMacroPath(const OUString& rPath);
- inline OUString GetMacroPath() const { return sMacroPath; }
- inline OUString GetMacroName() const { return sMacroName; }
+ const OUString& GetMacroPath() const { return sMacroPath; }
+ const OUString& GetMacroName() const { return sMacroName; }
// previous and next of the same type
bool GoNextPrev( bool bNext = true, SwFieldType* pTyp = nullptr );
diff --git a/sw/source/uibase/inc/insfnote.hxx b/sw/source/uibase/inc/insfnote.hxx
index 81dd8c12d7ea..18a0d8bf068b 100644
--- a/sw/source/uibase/inc/insfnote.hxx
+++ b/sw/source/uibase/inc/insfnote.hxx
@@ -69,7 +69,7 @@ public:
virtual ~SwInsFootNoteDlg();
virtual void dispose() override;
- OUString GetFontName() { return m_aFontName; }
+ const OUString& GetFontName() { return m_aFontName; }
bool IsEndNote() { return m_pEndNoteBtn->IsChecked(); }
OUString GetStr()
{
diff --git a/sw/source/uibase/inc/javaedit.hxx b/sw/source/uibase/inc/javaedit.hxx
index 43afc15e5c9c..f320cc9ce4c5 100644
--- a/sw/source/uibase/inc/javaedit.hxx
+++ b/sw/source/uibase/inc/javaedit.hxx
@@ -73,9 +73,9 @@ public:
virtual ~SwJavaEditDialog();
virtual void dispose() override;
- OUString GetScriptText() const { return aText; }
+ const OUString& GetScriptText() const { return aText; }
- OUString GetScriptType() const { return aType; }
+ const OUString& GetScriptType() const { return aType; }
bool IsUrl() const { return bIsUrl; }
bool IsNew() const { return bNew; }
diff --git a/sw/source/uibase/inc/mailmergewizard.hxx b/sw/source/uibase/inc/mailmergewizard.hxx
index cbee8a01a67b..93eb20507d76 100644
--- a/sw/source/uibase/inc/mailmergewizard.hxx
+++ b/sw/source/uibase/inc/mailmergewizard.hxx
@@ -67,7 +67,7 @@ public:
SwMailMergeConfigItem& GetConfigItem() { return m_rConfigItem;}
void SetReloadDocument(const OUString& rURL) {sDocumentURL = rURL;}
- OUString GetReloadDocument() const {return sDocumentURL;}
+ const OUString& GetReloadDocument() const {return sDocumentURL;}
//next step requires loading of document
void SetDocumentLoad(bool bSet) {m_bDocumentLoad = bSet;}
diff --git a/sw/source/uibase/inc/mailmrge.hxx b/sw/source/uibase/inc/mailmrge.hxx
index 59b8cc4a0392..0b53bb0894dc 100644
--- a/sw/source/uibase/inc/mailmrge.hxx
+++ b/sw/source/uibase/inc/mailmrge.hxx
@@ -135,7 +135,7 @@ public:
OUString GetTargetURL() const;
const OUString& GetSaveFilter() const {return m_sSaveFilter;}
- inline const css::uno::Sequence< css::uno::Any > GetSelection() const { return m_aSelection; }
+ const css::uno::Sequence< css::uno::Any >& GetSelection() const { return m_aSelection; }
css::uno::Reference< css::sdbc::XResultSet> GetResultSet() const;
};
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index 3efb56ca6001..8c541e9beda6 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -253,7 +253,7 @@ public:
bool HandleWheelCommands( const CommandEvent& );
- OUString GetPrevSwViewData() const { return sSwViewData; }
+ const OUString& GetPrevSwViewData() const { return sSwViewData; }
void SetNewCursorPos( const OUString& rStr ) { sNewCursorPos = rStr; }
const OUString& GetNewCursorPos() const { return sNewCursorPos; }
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index 29aabdf5d4f0..eda9017bd5ab 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -108,8 +108,8 @@ public:
SwForm* GetForm(CurTOXType eType);
- CurTOXType GetCurrentTOXType() const { return eCurrentTOXType;}
- void SetCurrentTOXType(CurTOXType eSet)
+ const CurTOXType& GetCurrentTOXType() const { return eCurrentTOXType;}
+ void SetCurrentTOXType(const CurTOXType& eSet)
{
eCurrentTOXType = eSet;
}
diff --git a/sw/source/uibase/inc/toxmgr.hxx b/sw/source/uibase/inc/toxmgr.hxx
index 528a564d8877..066ea5fd1ec4 100644
--- a/sw/source/uibase/inc/toxmgr.hxx
+++ b/sw/source/uibase/inc/toxmgr.hxx
@@ -143,7 +143,7 @@ public:
bool IsLevelFromChapter() const {return m_bLevelFromChapter;}
void SetLevelFromChapter(bool bSet) {m_bLevelFromChapter = bSet;}
- OUString GetAuthBrackets() const {return m_sAuthBrackets;}
+ const OUString& GetAuthBrackets() const {return m_sAuthBrackets;}
void SetAuthBrackets(const OUString& rSet) {m_sAuthBrackets = rSet;}
bool IsAuthSequence() const {return m_bIsAuthSequence;}
@@ -156,9 +156,9 @@ public:
SwTOXSortKey eKey2,
SwTOXSortKey eKey3);
- SwTOXSortKey GetSortKey1() const {return m_eSortKey1;}
- SwTOXSortKey GetSortKey2() const {return m_eSortKey2;}
- SwTOXSortKey GetSortKey3() const {return m_eSortKey3;}
+ const SwTOXSortKey& GetSortKey1() const {return m_eSortKey1;}
+ const SwTOXSortKey& GetSortKey2() const {return m_eSortKey2;}
+ const SwTOXSortKey& GetSortKey3() const {return m_eSortKey3;}
LanguageType GetLanguage() const {return m_eLanguage;}
void SetLanguage(LanguageType nLang) {m_eLanguage = nLang;}
diff --git a/sw/source/uibase/ribbar/concustomshape.cxx b/sw/source/uibase/ribbar/concustomshape.cxx
index 0c7bf74f6371..96e660790cb3 100644
--- a/sw/source/uibase/ribbar/concustomshape.cxx
+++ b/sw/source/uibase/ribbar/concustomshape.cxx
@@ -53,7 +53,7 @@ ConstCustomShape::ConstCustomShape( SwWrtShell* pWrtShell, SwEditWin* pEditWin,
aCustomShape = ConstCustomShape::GetShapeTypeFromRequest( rReq );
}
-OUString ConstCustomShape::GetShapeType() const
+const OUString& ConstCustomShape::GetShapeType() const
{
return aCustomShape;
}