summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-12-31 21:34:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-02 12:19:10 +0100
commit4855257e52056241633c2b1d8159c3f0e71e05f3 (patch)
tree4a56a5ead5cacdf70ed7fb31bf8a949aba774030 /sw/source
parent884cbe174ee5e343e9ed56093421aad3e467bf57 (diff)
loplugin:passstuffbyref improved return in sw
Change-Id: I4484ac461761e4c46364b4f473c7e62f8ec72103 Reviewed-on: https://gerrit.libreoffice.org/47243 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/accpara.cxx2
-rw-r--r--sw/source/core/access/accpara.hxx2
-rw-r--r--sw/source/core/doc/docfld.cxx2
-rw-r--r--sw/source/core/doc/list.cxx4
-rw-r--r--sw/source/core/doc/number.cxx2
-rw-r--r--sw/source/core/docnode/section.cxx2
-rw-r--r--sw/source/core/edit/edfld.cxx2
-rw-r--r--sw/source/core/edit/edtox.cxx2
-rw-r--r--sw/source/core/fields/ddefld.cxx2
-rw-r--r--sw/source/core/inc/flyfrms.hxx2
-rw-r--r--sw/source/core/inc/unometa.hxx2
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx4
-rw-r--r--sw/source/core/layout/flyincnt.cxx2
-rw-r--r--sw/source/core/layout/pagedesc.cxx2
-rw-r--r--sw/source/core/ole/ndole.cxx2
-rw-r--r--sw/source/core/swg/swblocks.cxx4
-rw-r--r--sw/source/core/unocore/unorefmk.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/filter/html/htmlctxt.cxx4
-rw-r--r--sw/source/filter/html/htmlfly.hxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx2
-rw-r--r--sw/source/filter/ww8/ww8toolbar.hxx2
-rw-r--r--sw/source/uibase/app/swmodul1.cxx2
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx26
-rw-r--r--sw/source/uibase/inc/mmconfigitem.hxx26
-rw-r--r--sw/source/uibase/inc/prcntfld.hxx2
-rw-r--r--sw/source/uibase/inc/uivwimp.hxx2
-rw-r--r--sw/source/uibase/sidebar/PageStylesPanel.cxx10
-rw-r--r--sw/source/uibase/sidebar/PageStylesPanel.hxx10
-rw-r--r--sw/source/uibase/uiview/view0.cxx2
31 files changed, 67 insertions, 67 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 4fb50f858d8d..8b101756331d 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -127,7 +127,7 @@ const SwTextNode* SwAccessibleParagraph::GetTextNode() const
return pNode;
}
-OUString SwAccessibleParagraph::GetString()
+OUString const & SwAccessibleParagraph::GetString()
{
return GetPortionData().GetAccessibleString();
}
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index f6c89632afb3..c96001afb2b8 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -92,7 +92,7 @@ class SwAccessibleParagraph :
const SwTextNode* GetTextNode() const;
/// get the (accessible) text string (requires frame; check before)
- OUString GetString();
+ OUString const & GetString();
static OUString GetDescription();
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index d63795dfe189..27fafaf0de90 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -340,7 +340,7 @@ OUString LookString( SwHash** ppTable, sal_uInt16 nSize, const OUString& rName )
return OUString();
}
-SwDBData SwDoc::GetDBData()
+SwDBData const & SwDoc::GetDBData()
{
return GetDBDesc();
}
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx
index 711ebbfd1804..46be497f77ad 100644
--- a/sw/source/core/doc/list.cxx
+++ b/sw/source/core/doc/list.cxx
@@ -220,12 +220,12 @@ SwList::~SwList()
{
}
-const OUString SwList::GetListId() const
+const OUString & SwList::GetListId() const
{
return mpListImpl->GetListId();
}
-const OUString SwList::GetDefaultListStyleName() const
+const OUString & SwList::GetDefaultListStyleName() const
{
return mpListImpl->GetDefaultListStyleName();
}
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 1117de69cc03..b60a20168802 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -1257,7 +1257,7 @@ namespace numfunc
{
}
- OUString GetDefBulletFontname()
+ OUString const & GetDefBulletFontname()
{
return SwDefBulletConfig::getInstance().GetFontname();
}
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 469024234ec6..1930db0fb453 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -542,7 +542,7 @@ void SwSection::SetCondHidden(bool const bFlag)
}
// Set/remove the linked FileName
-OUString SwSection::GetLinkFileName() const
+OUString const & SwSection::GetLinkFileName() const
{
if (m_RefLink.is())
{
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index 4737f411cd8d..d57da627a3cc 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -295,7 +295,7 @@ void SwEditShell::UpdateFields( SwField &rField )
EndAllAction();
}
-SwDBData SwEditShell::GetDBData() const
+SwDBData const & SwEditShell::GetDBData() const
{
return GetDoc()->GetDBData();
}
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 0af2a5d91ee4..35afdd5654e6 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -263,7 +263,7 @@ bool SwEditShell::IsUpdateTOX() const
return GetDoc()->IsUpdateTOX();
}
-OUString SwEditShell::GetTOIAutoMarkURL() const
+OUString const & SwEditShell::GetTOIAutoMarkURL() const
{
return GetDoc()->GetTOIAutoMarkURL();
}
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index 3ff14069088a..d9c9993dcdd5 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -273,7 +273,7 @@ void SwDDEFieldType::SetCmd( const OUString& _aStr )
refLink->SetLinkSourceName( aStr );
}
-OUString SwDDEFieldType::GetCmd() const
+OUString const & SwDDEFieldType::GetCmd() const
{
return refLink->GetLinkSourceName();
}
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 1bde38f6784b..c0fafd733efc 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -218,7 +218,7 @@ public:
void SetRefPoint( const Point& rPoint, const Point &rRelAttr,
const Point &rRelPos );
const Point &GetRefPoint() const { return aRef; }
- const Point GetRelPos() const;
+ Point const & GetRelPos() const;
// (26.11.93, see tabfrm.hxx, but might also be valid for others)
// For creation of a Fly after a FlyCnt was created _and_ inserted.
diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx
index 525e29d76e98..ff6188a6d078 100644
--- a/sw/source/core/inc/unometa.hxx
+++ b/sw/source/core/inc/unometa.hxx
@@ -101,7 +101,7 @@ public:
/// init params with position of the attribute content (w/out CH_TXTATR)
bool SetContentRange( SwTextNode *& rpNode, sal_Int32 & rStart, sal_Int32 & rEnd) const;
- css::uno::Reference< css::text::XText > GetParentText() const;
+ css::uno::Reference< css::text::XText > const & GetParentText() const;
/// @throws css::lang::IllegalArgumentException
/// @throws css::uno::RuntimeException
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index dfbdce3021bb..bc7d76bae69e 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -48,7 +48,7 @@ class SwPosNotify
explicit SwPosNotify( SwAnchoredDrawObject* _pAnchoredDrawObj );
~SwPosNotify() COVERITY_NOEXCEPT_FALSE;
// #i32795#
- Point LastObjPos() const;
+ Point const & LastObjPos() const;
};
SwPosNotify::SwPosNotify( SwAnchoredDrawObject* _pAnchoredDrawObj ) :
@@ -123,7 +123,7 @@ SwPosNotify::~SwPosNotify() COVERITY_NOEXCEPT_FALSE
}
// --> #i32795#
-Point SwPosNotify::LastObjPos() const
+Point const & SwPosNotify::LastObjPos() const
{
return maOldObjRect.Pos();
}
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index af87a79ea1bd..a89ea5871609 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -191,7 +191,7 @@ void SwFlyInContentFrame::NotifyBackground( SwPageFrame *, const SwRect& rRect,
AnchorFrame()->Prepare( eHint, static_cast<void const *>(&rRect) );
}
-const Point SwFlyInContentFrame::GetRelPos() const
+Point const & SwFlyInContentFrame::GetRelPos() const
{
Calc(getRootFrame()->GetCurrShell()->GetOut());
return GetCurrRelPos();
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 38d56884e609..26cfde205d6f 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -457,7 +457,7 @@ SwPageDescExt::~SwPageDescExt()
{
}
-OUString SwPageDescExt::GetName() const
+OUString const & SwPageDescExt::GetName() const
{
return m_PageDesc.GetName();
}
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index bcefe2a10130..b08dc6fe9d8e 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -872,7 +872,7 @@ bool SwOLEObj::IsOleRef() const
return m_xOLERef.is();
}
-const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef()
+uno::Reference < embed::XEmbeddedObject > const & SwOLEObj::GetOleRef()
{
if( !m_xOLERef.is() )
{
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index 079984ed9635..c3e891d080cd 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -368,7 +368,7 @@ void SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString* l )
}
}
-ErrCode SwTextBlocks::CopyBlock( SwTextBlocks const & rSource, OUString& rSrcShort,
+ErrCode const & SwTextBlocks::CopyBlock( SwTextBlocks const & rSource, OUString& rSrcShort,
const OUString& rLong )
{
bool bIsOld = false;
@@ -525,7 +525,7 @@ void SwTextBlocks::ClearDoc()
}
}
-OUString SwTextBlocks::GetFileName() const
+OUString const & SwTextBlocks::GetFileName() const
{
return pImp->GetFileName();
}
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 3722a5296ea7..49dfa4a0c56c 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -681,7 +681,7 @@ void SwXMeta::Impl::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
m_EventListeners.disposeAndClear(ev);
}
-uno::Reference<text::XText> SwXMeta::GetParentText() const
+uno::Reference<text::XText> const & SwXMeta::GetParentText() const
{
return m_pImpl->m_xParentText;
}
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index c560c3acf941..cb9b4c1d58ae 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -3351,7 +3351,7 @@ class SwAutoStylesEnumImpl
public:
SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAutoStyleFamily eFam );
bool hasMoreElements() { return aIter != mAutoStyles.end(); }
- std::shared_ptr<SfxItemSet> nextElement() { return *(aIter++); }
+ std::shared_ptr<SfxItemSet> const & nextElement() { return *(aIter++); }
IStyleAccess::SwAutoStyleFamily getFamily() const { return eFamily; }
SwDoc* getDoc() const { return pDoc; }
};
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index bd48c6a9c223..19657967268f 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -76,7 +76,7 @@ public:
void SetNumInfo( const SwHTMLNumRuleInfo& rInf ) { aNumRuleInfo.Set(rInf); }
const SwHTMLNumRuleInfo& GetNumInfo() const { return aNumRuleInfo; }
- std::shared_ptr<HTMLAttrTable> GetAttrTab(bool bCreate = false);
+ std::shared_ptr<HTMLAttrTable> const & GetAttrTab(bool bCreate = false);
void SetContextStMin( size_t nMin ) { nContextStMin = nMin; }
size_t GetContextStMin() const { return nContextStMin; }
@@ -97,7 +97,7 @@ public:
bool GetFixFooterDist() const { return bFixFooterDist; }
};
-std::shared_ptr<HTMLAttrTable> HTMLAttrContext_SaveDoc::GetAttrTab( bool bCreate )
+std::shared_ptr<HTMLAttrTable> const & HTMLAttrContext_SaveDoc::GetAttrTab( bool bCreate )
{
if (!xAttrTab && bCreate)
{
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index 9f01ef648038..e3ea1101be48 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -116,7 +116,7 @@ public:
const SdrObject* GetSdrObject() const { return pSdrObject; }
const SwNodeIndex& GetNdIndex() const { return *pNdIdx; }
sal_Int32 GetContentIndex() const { return nContentIdx; }
- AllHtmlFlags GetOutMode() const { return nAllFlags; }
+ AllHtmlFlags const & GetOutMode() const { return nAllFlags; }
HtmlOut GetOutFn() const { return nAllFlags.nOut; }
HtmlPosition GetOutPos() const { return nAllFlags.nPosition; }
};
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index eaa3b84af42b..4c160c5376eb 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -213,7 +213,7 @@ class FieldMarkParamsHelper
const sw::mark::IFieldmark& mrFieldmark;
public:
explicit FieldMarkParamsHelper( const sw::mark::IFieldmark& rFieldmark ) : mrFieldmark( rFieldmark ) {}
- OUString getName() { return mrFieldmark.GetName(); }
+ OUString const & getName() { return mrFieldmark.GetName(); }
template < typename T >
bool extractParam( const OUString& rKey, T& rResult )
{
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 93f4d392c0d9..6fc71a97b624 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -306,7 +306,7 @@ public:
void Write( SvStream *pTableStram ) const;
void WriteDocx( DocxAttributeOutput* rAttrOutput ) const;
void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const;
- OUString GetFamilyName() const { return msFamilyNm; }
+ OUString const & GetFamilyName() const { return msFamilyNm; }
friend bool operator < (const wwFont &r1, const wwFont &r2);
};
diff --git a/sw/source/filter/ww8/ww8toolbar.hxx b/sw/source/filter/ww8/ww8toolbar.hxx
index b5b9bc2a9d74..ec51bcfdc987 100644
--- a/sw/source/filter/ww8/ww8toolbar.hxx
+++ b/sw/source/filter/ww8/ww8toolbar.hxx
@@ -72,7 +72,7 @@ public:
bool IsMenuToolbar();
bool ImportCustomToolBar( SwCTBWrapper&, CustomToolBarImportHelper& );
bool ImportMenuTB( SwCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
- OUString GetName() { return tb.getName().getString(); }
+ OUString const & GetName() { return tb.getName().getString(); }
};
class TBDelta : public TBBase
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index 565e07f6b2b1..1e82eaf98bd2 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -584,7 +584,7 @@ const SwViewOption* SwModule::GetViewOption(bool bWeb)
return GetUsrPref( bWeb );
}
-OUString SwModule::GetDocStatWordDelim() const
+OUString const & SwModule::GetDocStatWordDelim() const
{
return m_pModuleConfig->GetWordDelimiter();
}
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 9c97e831ee25..9170ffe1cb14 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -822,17 +822,17 @@ void SwMailMergeConfigItem::SetCurrentConnection(
m_pImpl->SetModified();
}
-Reference< XDataSource> SwMailMergeConfigItem::GetSource()
+Reference< XDataSource> const & SwMailMergeConfigItem::GetSource()
{
return m_pImpl->m_xSource;
}
-SharedConnection SwMailMergeConfigItem::GetConnection()
+SharedConnection const & SwMailMergeConfigItem::GetConnection()
{
return m_pImpl->m_xConnection;
}
-Reference< XColumnsSupplier> SwMailMergeConfigItem::GetColumnsSupplier()
+Reference< XColumnsSupplier> const & SwMailMergeConfigItem::GetColumnsSupplier()
{
if(!m_pImpl->m_xColumnsSupplier.is() && m_pImpl->m_xConnection.is())
{
@@ -862,7 +862,7 @@ void SwMailMergeConfigItem::SetCurrentDBData( const SwDBData& rDBData)
}
}
-Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
+Reference< XResultSet> const & SwMailMergeConfigItem::GetResultSet() const
{
if(!m_pImpl->m_xConnection.is() && !m_pImpl->m_aDBData.sDataSource.isEmpty())
{
@@ -1306,7 +1306,7 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const
return bResult;
}
-OUString SwMailMergeConfigItem::GetMailDisplayName() const
+OUString const & SwMailMergeConfigItem::GetMailDisplayName() const
{
return m_pImpl->m_sMailDisplayName;
}
@@ -1320,7 +1320,7 @@ void SwMailMergeConfigItem::SetMailDisplayName(const OUString& rName)
}
}
-OUString SwMailMergeConfigItem::GetMailAddress() const
+OUString const & SwMailMergeConfigItem::GetMailAddress() const
{
return m_pImpl->m_sMailAddress;
}
@@ -1348,7 +1348,7 @@ void SwMailMergeConfigItem::SetMailReplyTo(bool bSet)
}
}
-OUString SwMailMergeConfigItem::GetMailReplyTo() const
+OUString const & SwMailMergeConfigItem::GetMailReplyTo() const
{
return m_pImpl->m_sMailReplyTo;
}
@@ -1362,7 +1362,7 @@ void SwMailMergeConfigItem::SetMailReplyTo(const OUString& rReplyTo)
}
}
-OUString SwMailMergeConfigItem::GetMailServer() const
+OUString const & SwMailMergeConfigItem::GetMailServer() const
{
return m_pImpl->m_sMailServer;
}
@@ -1421,7 +1421,7 @@ void SwMailMergeConfigItem::SetAuthentication(bool bSet)
}
}
-OUString SwMailMergeConfigItem::GetMailUserName() const
+OUString const & SwMailMergeConfigItem::GetMailUserName() const
{
return m_pImpl->m_sMailUserName;
}
@@ -1435,7 +1435,7 @@ void SwMailMergeConfigItem::SetMailUserName(const OUString& rName)
}
}
-OUString SwMailMergeConfigItem::GetMailPassword() const
+OUString const & SwMailMergeConfigItem::GetMailPassword() const
{
return m_pImpl->m_sMailPassword;
}
@@ -1463,7 +1463,7 @@ void SwMailMergeConfigItem::SetSMTPAfterPOP(bool bSet)
}
}
-OUString SwMailMergeConfigItem::GetInServerName() const
+OUString const & SwMailMergeConfigItem::GetInServerName() const
{
return m_pImpl->m_sInServerName;
}
@@ -1505,7 +1505,7 @@ void SwMailMergeConfigItem::SetInServerPOP(bool bSet)
}
}
-OUString SwMailMergeConfigItem::GetInServerUserName() const
+OUString const & SwMailMergeConfigItem::GetInServerUserName() const
{
return m_pImpl->m_sInServerUserName;
}
@@ -1519,7 +1519,7 @@ void SwMailMergeConfigItem::SetInServerUserName(const OUString& rName)
}
}
-OUString SwMailMergeConfigItem::GetInServerPassword() const
+OUString const & SwMailMergeConfigItem::GetInServerPassword() const
{
return m_pImpl->m_sInServerPassword;
}
diff --git a/sw/source/uibase/inc/mmconfigitem.hxx b/sw/source/uibase/inc/mmconfigitem.hxx
index 72ad3253a103..9064bd2b220b 100644
--- a/sw/source/uibase/inc/mmconfigitem.hxx
+++ b/sw/source/uibase/inc/mmconfigitem.hxx
@@ -85,13 +85,13 @@ public:
css::uno::Reference< css::sdbcx::XColumnsSupplier> const & xColumnsSupplier,
const SwDBData& rDBData);
- css::uno::Reference< css::sdbc::XDataSource> GetSource();
+ css::uno::Reference< css::sdbc::XDataSource> const & GetSource();
- SharedConnection GetConnection();
+ SharedConnection const & GetConnection();
- css::uno::Reference< css::sdbcx::XColumnsSupplier> GetColumnsSupplier();
+ css::uno::Reference< css::sdbcx::XColumnsSupplier> const & GetColumnsSupplier();
- css::uno::Reference< css::sdbc::XResultSet> GetResultSet() const;
+ css::uno::Reference< css::sdbc::XResultSet> const & GetResultSet() const;
void DisposeResultSet();
@@ -157,19 +157,19 @@ public:
bool IsGreetingFieldsAssigned() const;
//e-Mail settings:
- OUString GetMailDisplayName() const;
+ OUString const & GetMailDisplayName() const;
void SetMailDisplayName(const OUString& rName);
- OUString GetMailAddress() const;
+ OUString const & GetMailAddress() const;
void SetMailAddress(const OUString& rAddress);
bool IsMailReplyTo() const;
void SetMailReplyTo(bool bSet);
- OUString GetMailReplyTo() const;
+ OUString const & GetMailReplyTo() const;
void SetMailReplyTo(const OUString& rReplyTo);
- OUString GetMailServer() const;
+ OUString const & GetMailServer() const;
void SetMailServer(const OUString& rAddress);
sal_Int16 GetMailPort() const;
@@ -181,16 +181,16 @@ public:
bool IsAuthentication() const;
void SetAuthentication(bool bSet);
- OUString GetMailUserName() const;
+ OUString const & GetMailUserName() const;
void SetMailUserName(const OUString& rName);
- OUString GetMailPassword() const;
+ OUString const & GetMailPassword() const;
void SetMailPassword(const OUString& rPassword);
bool IsSMTPAfterPOP() const;
void SetSMTPAfterPOP(bool bSet);
- OUString GetInServerName() const;
+ OUString const & GetInServerName() const;
void SetInServerName(const OUString& rServer);
sal_Int16 GetInServerPort() const;
@@ -199,10 +199,10 @@ public:
bool IsInServerPOP() const;
void SetInServerPOP(bool bSet);
- OUString GetInServerUserName() const;
+ OUString const & GetInServerUserName() const;
void SetInServerUserName(const OUString& rName);
- OUString GetInServerPassword() const;
+ OUString const & GetInServerPassword() const;
void SetInServerPassword(const OUString& rPassword);
//session information
diff --git a/sw/source/uibase/inc/prcntfld.hxx b/sw/source/uibase/inc/prcntfld.hxx
index e28d7e2dd989..06021f4fb52e 100644
--- a/sw/source/uibase/inc/prcntfld.hxx
+++ b/sw/source/uibase/inc/prcntfld.hxx
@@ -60,7 +60,7 @@ public:
void SetText(const OUString& rStr) { m_pField->SetText(rStr); }
void SaveValue() { m_pField->SaveValue(); }
void ClearModifyFlag() { m_pField->ClearModifyFlag(); }
- OUString GetSavedValue() const { return m_pField->GetSavedValue(); }
+ OUString const & GetSavedValue() const { return m_pField->GetSavedValue(); }
OUString GetText() const { return m_pField->GetText(); }
void SetMetricFieldMin(sal_Int64 nNewMin) { m_pField->SetMin(nNewMin); }
void SetMetricFieldMax(sal_Int64 nNewMax) { m_pField->SetMax(nNewMax); }
diff --git a/sw/source/uibase/inc/uivwimp.hxx b/sw/source/uibase/inc/uivwimp.hxx
index ed2f1912fbf8..46b627c518b7 100644
--- a/sw/source/uibase/inc/uivwimp.hxx
+++ b/sw/source/uibase/inc/uivwimp.hxx
@@ -138,7 +138,7 @@ public:
{
xConfigItem = rItem;
}
- std::shared_ptr<SwMailMergeConfigItem> GetMailMergeConfigItem() {return xConfigItem;}
+ std::shared_ptr<SwMailMergeConfigItem> const & GetMailMergeConfigItem() {return xConfigItem;}
//#i33307# restore editing position
void SetRestorePosition(const Point& rCursorPos, bool bSelectObj)
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx
index d8e4eec4fd58..25dfef9adf95 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.cxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx
@@ -252,7 +252,7 @@ void PageStylesPanel::Update()
}
}
-Color PageStylesPanel::GetColorSetOrDefault()
+Color const & PageStylesPanel::GetColorSetOrDefault()
{
if ( !mpBgColorItem )
mpBgColorItem.reset( new XFillColorItem( OUString(), Color(0x72, 0x9f, 0xcf) ) );
@@ -260,7 +260,7 @@ Color PageStylesPanel::GetColorSetOrDefault()
return mpBgColorItem->GetColorValue();
}
-XGradient PageStylesPanel::GetGradientSetOrDefault()
+XGradient const & PageStylesPanel::GetGradientSetOrDefault()
{
if( !mpBgGradientItem )
{
@@ -275,7 +275,7 @@ XGradient PageStylesPanel::GetGradientSetOrDefault()
return mpBgGradientItem->GetGradientValue();
}
-const OUString PageStylesPanel::GetHatchingSetOrDefault()
+OUString const & PageStylesPanel::GetHatchingSetOrDefault()
{
if( !mpBgHatchItem )
{
@@ -290,7 +290,7 @@ const OUString PageStylesPanel::GetHatchingSetOrDefault()
return mpBgHatchItem->GetName();
}
-const OUString PageStylesPanel::GetBitmapSetOrDefault()
+OUString const & PageStylesPanel::GetBitmapSetOrDefault()
{
if( !mpBgBitmapItem || mpBgBitmapItem->isPattern() )
{
@@ -305,7 +305,7 @@ const OUString PageStylesPanel::GetBitmapSetOrDefault()
return mpBgBitmapItem->GetName();
}
-const OUString PageStylesPanel::GetPatternSetOrDefault()
+OUString const & PageStylesPanel::GetPatternSetOrDefault()
{
if( !mpBgBitmapItem || !mpBgBitmapItem->isPattern() )
{
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.hxx b/sw/source/uibase/sidebar/PageStylesPanel.hxx
index d7d364f0d055..27890af084e8 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.hxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.hxx
@@ -107,11 +107,11 @@ private:
void Initialize();
void Update();
- Color GetColorSetOrDefault();
- XGradient GetGradientSetOrDefault();
- const OUString GetHatchingSetOrDefault();
- const OUString GetBitmapSetOrDefault();
- const OUString GetPatternSetOrDefault();
+ Color const & GetColorSetOrDefault();
+ XGradient const & GetGradientSetOrDefault();
+ OUString const & GetHatchingSetOrDefault();
+ OUString const & GetBitmapSetOrDefault();
+ OUString const & GetPatternSetOrDefault();
void ModifyFillColor();
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 9345af5541f2..6abebf33b8ed 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -137,7 +137,7 @@ void SwView::SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem> const
UIFeatureChanged();
}
-std::shared_ptr<SwMailMergeConfigItem> SwView::GetMailMergeConfigItem() const
+std::shared_ptr<SwMailMergeConfigItem> const & SwView::GetMailMergeConfigItem() const
{
return m_pViewImpl->GetMailMergeConfigItem();
}