summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-01-25 20:31:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-26 08:30:42 +0100
commitc83166ce7126b3c3c6aca8f6d2ab9cd9e16f5763 (patch)
tree2760b4870bf080fedcb40bf8c6f93c32030c4f7d
parenta553c85cbd80a045b2e4742eefaa7fcc3953cb08 (diff)
loplugin:passstuffbyref
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--avmedia/source/framework/mediaitem.cxx2
-rw-r--r--basic/source/inc/buffer.hxx4
-rw-r--r--chart2/source/controller/inc/CommandDispatchContainer.hxx2
-rw-r--r--chart2/source/view/axes/Tickmarks.cxx2
-rw-r--r--chart2/source/view/axes/Tickmarks.hxx2
-rw-r--r--connectivity/source/drivers/firebird/DatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/firebird/DatabaseMetaData.hxx2
-rw-r--r--cui/source/dialogs/AdditionsDialog.cxx2
-rw-r--r--cui/source/inc/AdditionsDialog.hxx2
-rw-r--r--cui/source/inc/cuihyperdlg.hxx2
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx2
-rw-r--r--dbaccess/source/ui/inc/opendoccontrols.hxx2
-rw-r--r--editeng/source/editeng/editview.cxx2
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--editeng/source/editeng/impedit.hxx2
-rw-r--r--framework/source/services/desktop.cxx2
-rw-r--r--framework/source/uiconfiguration/ImageList.cxx2
-rw-r--r--framework/source/uiconfiguration/ImageList.hxx2
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx4
-rw-r--r--i18npool/inc/breakiteratorImpl.hxx2
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx2
-rw-r--r--include/avmedia/mediaitem.hxx2
-rw-r--r--include/editeng/editview.hxx2
-rw-r--r--include/framework/desktop.hxx2
-rw-r--r--include/oox/dump/dumperbase.hxx2
-rw-r--r--include/sfx2/docfile.hxx2
-rw-r--r--include/sfx2/lokhelper.hxx2
-rw-r--r--include/svx/svdobj.hxx2
-rw-r--r--include/vcl/SwapFile.hxx2
-rw-r--r--include/vcl/event.hxx2
-rw-r--r--include/vcl/filter/PDFiumLibrary.hxx2
-rw-r--r--include/vcl/graph.hxx2
-rw-r--r--include/vcl/notebookbar/notebookbar.hxx2
-rw-r--r--include/vcl/uitest/logger.hxx2
-rw-r--r--linguistic/source/hyphdsp.hxx8
-rw-r--r--linguistic/source/spelldsp.hxx8
-rw-r--r--linguistic/source/thesdsp.hxx4
-rw-r--r--oox/source/drawingml/diagram/diagram.hxx2
-rw-r--r--oox/source/dump/dumperbase.cxx2
-rw-r--r--sdext/source/presenter/PresenterToolBar.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx2
-rw-r--r--sfx2/source/view/lokhelper.cxx2
-rw-r--r--starmath/inc/ElementsDockingWindow.hxx2
-rw-r--r--svx/source/svdraw/presetooxhandleadjustmentrelations.cxx2
-rw-r--r--svx/source/svdraw/svdobj.cxx2
-rw-r--r--sw/inc/fldbas.hxx2
-rw-r--r--sw/source/core/fields/fldbas.cxx2
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx2
-rw-r--r--sw/source/uibase/inc/fldmgr.hxx2
-rw-r--r--sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx4
-rw-r--r--uui/source/iahndl.hxx2
-rw-r--r--vcl/inc/image.h2
-rw-r--r--vcl/inc/impgraph.hxx2
-rw-r--r--vcl/inc/sft.hxx2
-rw-r--r--vcl/inc/unx/freetype_glyphcache.hxx2
-rw-r--r--vcl/inc/unx/glyphcache.hxx2
-rw-r--r--vcl/inc/verticaltabctrl.hxx4
-rw-r--r--vcl/source/control/ivctrl.cxx2
-rw-r--r--vcl/source/gdi/graph.cxx2
-rw-r--r--vcl/source/gdi/impgraph.cxx2
-rw-r--r--vcl/source/gdi/pdfbuildin_fonts.cxx2
-rw-r--r--vcl/source/gdi/pdfbuildin_fonts.hxx2
-rw-r--r--vcl/source/uitest/logger.cxx6
-rw-r--r--vcl/source/window/NotebookBarAddonsMerger.cxx2
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.hxx2
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx2
-rw-r--r--writerfilter/source/dmapper/NumberingManager.hxx4
-rw-r--r--writerfilter/source/dmapper/SettingsTable.cxx4
-rw-r--r--writerfilter/source/dmapper/SettingsTable.hxx4
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.hxx2
73 files changed, 91 insertions, 89 deletions
diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx
index 54db2e3bc6bf..b2b2b8d72b82 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -268,7 +268,7 @@ void MediaItem::setGraphic(const Graphic& rGraphic)
m_pImpl->m_aGraphic = rGraphic;
}
-Graphic MediaItem::getGraphic() const { return m_pImpl->m_aGraphic; }
+const Graphic & MediaItem::getGraphic() const { return m_pImpl->m_aGraphic; }
void MediaItem::setState( MediaState eState )
{
diff --git a/basic/source/inc/buffer.hxx b/basic/source/inc/buffer.hxx
index 233d94fec177..3115a01a6c98 100644
--- a/basic/source/inc/buffer.hxx
+++ b/basic/source/inc/buffer.hxx
@@ -45,8 +45,8 @@ public:
void operator += (sal_Int32); // save integer
std::vector<sal_uInt8>&& GetBuffer() { return std::move(m_aBuf); } // pass ownership
sal_uInt32 GetSize() const { return m_aBuf.size(); }
- ErrCode GetErrCode() const { return m_aErrCode; }
- OUString GetErrMessage() const { return m_sErrMsg; }
+ const ErrCode & GetErrCode() const { return m_aErrCode; }
+ const OUString & GetErrMessage() const { return m_sErrMsg; }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/CommandDispatchContainer.hxx b/chart2/source/controller/inc/CommandDispatchContainer.hxx
index b23fc28f7199..523b798c7893 100644
--- a/chart2/source/controller/inc/CommandDispatchContainer.hxx
+++ b/chart2/source/controller/inc/CommandDispatchContainer.hxx
@@ -102,7 +102,7 @@ public:
const css::uno::Reference< css::frame::XController > & xChartController,
const css::util::URL & rURL );
- css::uno::Reference< css::frame::XDispatch > getChartDispatcher() const { return m_xChartDispatcher; }
+ const css::uno::Reference< css::frame::XDispatch > & getChartDispatcher() const { return m_xChartDispatcher; }
void setDrawCommandDispatch( DrawCommandDispatch* pDispatch );
DrawCommandDispatch* getDrawCommandDispatch() { return m_pDrawCommandDispatch; }
diff --git a/chart2/source/view/axes/Tickmarks.cxx b/chart2/source/view/axes/Tickmarks.cxx
index 8332f01ff9a2..73c8e041cf40 100644
--- a/chart2/source/view/axes/Tickmarks.cxx
+++ b/chart2/source/view/axes/Tickmarks.cxx
@@ -203,7 +203,7 @@ sal_Int32 TickFactory2D::getTickScreenDistance( TickIter& rIter )
return pFirstTickInfo->getScreenDistanceBetweenTicks( *pSecondTickInfo );
}
-B2DVector TickFactory2D::getXaxisStartPos() const
+const B2DVector & TickFactory2D::getXaxisStartPos() const
{
return m_aAxisStartScreenPosition2D;
}
diff --git a/chart2/source/view/axes/Tickmarks.hxx b/chart2/source/view/axes/Tickmarks.hxx
index 039b6a75ff9a..77b9a2b85bdc 100644
--- a/chart2/source/view/axes/Tickmarks.hxx
+++ b/chart2/source/view/axes/Tickmarks.hxx
@@ -134,7 +134,7 @@ public:
bool isHorizontalAxis() const;
bool isVerticalAxis() const;
- ::basegfx::B2DVector getXaxisStartPos() const;
+ const ::basegfx::B2DVector & getXaxisStartPos() const;
private:
::basegfx::B2DVector getTickScreenPosition2D( double fScaledLogicTickValue ) const;
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index fdea4e4026eb..15e89f86859d 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -1475,7 +1475,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys(
return ODatabaseMetaData::lcl_getKeys(true, table);
}
-uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool& bIsImport, std::u16string_view table )
+uno::Reference< XResultSet > ODatabaseMetaData::lcl_getKeys(const bool bIsImport, std::u16string_view table )
{
ODatabaseMetaDataResultSet* pResultSet = new
ODatabaseMetaDataResultSet(ODatabaseMetaDataResultSet::eImportedKeys);
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.hxx b/connectivity/source/drivers/firebird/DatabaseMetaData.hxx
index fda5bb31bc88..f64766fe4846 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.hxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.hxx
@@ -42,7 +42,7 @@ namespace connectivity::firebird
{
::rtl::Reference<Connection> m_pConnection;
private:
- css::uno::Reference< css::sdbc::XResultSet > lcl_getKeys( const bool& bIsImport, std::u16string_view table );
+ css::uno::Reference< css::sdbc::XResultSet > lcl_getKeys( bool bIsImport, std::u16string_view table );
public:
explicit ODatabaseMetaData(Connection* _pCon);
diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx
index 832a7314b440..a6f21fe6bdda 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -289,7 +289,7 @@ void LoadImage(const OUString& rPreviewFile, std::shared_ptr<AdditionsItem> pCur
} // End of the anonymous namespace
-SearchAndParseThread::SearchAndParseThread(AdditionsDialog* pDialog, const bool& isFirstLoading)
+SearchAndParseThread::SearchAndParseThread(AdditionsDialog* pDialog, const bool isFirstLoading)
: Thread("cuiAdditionsSearchThread")
, m_pAdditionsDialog(pDialog)
, m_bExecute(true)
diff --git a/cui/source/inc/AdditionsDialog.hxx b/cui/source/inc/AdditionsDialog.hxx
index f11c4ee24691..0e7620b38268 100644
--- a/cui/source/inc/AdditionsDialog.hxx
+++ b/cui/source/inc/AdditionsDialog.hxx
@@ -152,7 +152,7 @@ private:
virtual void execute() override;
public:
- SearchAndParseThread(AdditionsDialog* pDialog, const bool& bIsFirstLoading);
+ SearchAndParseThread(AdditionsDialog* pDialog, bool bIsFirstLoading);
void StopExecution() { m_bExecute = false; }
};
diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx
index d5842369f45a..af0124239563 100644
--- a/cui/source/inc/cuihyperdlg.hxx
+++ b/cui/source/inc/cuihyperdlg.hxx
@@ -116,7 +116,7 @@ public:
void AddTabPage(const OString &rId, CreatePage pCreateFunc /* != NULL */);
void SetCurPageId( const OString& rId ) { msCurrentPageId = rId; SwitchPage(rId ); }
- OString GetCurPageId() const { return msCurrentPageId; }
+ const OString & GetCurPageId() const { return msCurrentPageId; }
void ShowPage( const OString& rId );
/// gives via map converted local slots if applicable
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index 699eae894d89..52c3bb6fb816 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -186,7 +186,7 @@ namespace dbaui
return sURL;
}
- OpenDocumentListBox::StringPair OpenDocumentListBox::impl_getDocumentAtIndex( sal_uInt16 _nListIndex ) const
+ const OpenDocumentListBox::StringPair & OpenDocumentListBox::impl_getDocumentAtIndex( sal_uInt16 _nListIndex ) const
{
return m_aURLs[_nListIndex];
}
diff --git a/dbaccess/source/ui/inc/opendoccontrols.hxx b/dbaccess/source/ui/inc/opendoccontrols.hxx
index 777a8dd148f0..8448a047dc7b 100644
--- a/dbaccess/source/ui/inc/opendoccontrols.hxx
+++ b/dbaccess/source/ui/inc/opendoccontrols.hxx
@@ -68,7 +68,7 @@ namespace dbaui
void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
private:
- StringPair impl_getDocumentAtIndex( sal_uInt16 _nListIndex ) const;
+ const StringPair & impl_getDocumentAtIndex( sal_uInt16 _nListIndex ) const;
void impl_init( const char* _pAsciiModuleName );
};
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 901e29e756c6..0434b06703b2 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1655,7 +1655,7 @@ void EditView::SetLOKSpecialOutputArea(const tools::Rectangle& rOutputArea)
pImpEditView->SetLOKSpecialOutputArea(rOutputArea);
}
-tools::Rectangle EditView::GetLOKSpecialOutputArea() const
+const tools::Rectangle & EditView::GetLOKSpecialOutputArea() const
{
return pImpEditView->GetLOKSpecialOutputArea();
}
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 4f0f4ccac865..389b9d5bca20 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -2686,7 +2686,7 @@ void ImpEditView::SetLOKSpecialOutputArea(const tools::Rectangle& rOutputArea)
mpLOKSpecialPositioning->SetOutputArea(rOutputArea);
}
-tools::Rectangle ImpEditView::GetLOKSpecialOutputArea() const
+const tools::Rectangle & ImpEditView::GetLOKSpecialOutputArea() const
{
assert(mpLOKSpecialPositioning);
return mpLOKSpecialPositioning->GetOutputArea();
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index e5eb5b0703c0..8f124dd4ed84 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -460,7 +460,7 @@ public:
void InitLOKSpecialPositioning(MapUnit eUnit, const tools::Rectangle& rOutputArea,
const Point& rVisDocStartPos);
void SetLOKSpecialOutputArea(const tools::Rectangle& rOutputArea);
- tools::Rectangle GetLOKSpecialOutputArea() const;
+ const tools::Rectangle & GetLOKSpecialOutputArea() const;
void SetLOKSpecialVisArea(const tools::Rectangle& rVisArea);
tools::Rectangle GetLOKSpecialVisArea() const;
bool HasLOKSpecialPositioning() const;
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 8f9f3f0bac85..c9b5ed8d5b2b 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -1762,7 +1762,7 @@ rtl::Reference<framework::Desktop> createDesktop(
}
-rtl::Reference<framework::Desktop> framework::getDesktop(
+const rtl::Reference<framework::Desktop> & framework::getDesktop(
css::uno::Reference<css::uno::XComponentContext> const & context)
{
static auto const instance = createDesktop(context);
diff --git a/framework/source/uiconfiguration/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx
index e047e6a340c7..0e64d219c166 100644
--- a/framework/source/uiconfiguration/ImageList.cxx
+++ b/framework/source/uiconfiguration/ImageList.cxx
@@ -158,7 +158,7 @@ sal_uInt16 ImageList::GetImageId( sal_uInt16 nPos ) const
return maImages[ nPos ]->mnId;
}
-OUString ImageList::GetImageName( sal_uInt16 nPos ) const
+const OUString & ImageList::GetImageName( sal_uInt16 nPos ) const
{
return maImages[ nPos ]->maName;
}
diff --git a/framework/source/uiconfiguration/ImageList.hxx b/framework/source/uiconfiguration/ImageList.hxx
index 668b958a07c4..0951b8369d2a 100644
--- a/framework/source/uiconfiguration/ImageList.hxx
+++ b/framework/source/uiconfiguration/ImageList.hxx
@@ -59,7 +59,7 @@ public:
sal_uInt16 GetImageId( sal_uInt16 nPos ) const;
- OUString GetImageName( sal_uInt16 nPos ) const;
+ const OUString & GetImageName( sal_uInt16 nPos ) const;
void GetImageNames( ::std::vector< OUString >& rNames ) const;
private:
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index ef5e4cf518a4..d5b1dcd1e2a6 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -291,7 +291,7 @@ private:
OUString getRegion() const;
OUString const & getVariants() const;
bool hasScript() const;
- OUString getGlibcLocaleString() const;
+ OUString const & getGlibcLocaleString() const;
void setScriptType(LanguageTag::ScriptType st);
LanguageTag::ScriptType getScriptType() const;
@@ -1927,7 +1927,7 @@ OUString LanguageTag::getVariants() const
return aRet;
}
-OUString LanguageTagImpl::getGlibcLocaleString() const
+OUString const & LanguageTagImpl::getGlibcLocaleString() const
{
if (mbCachedGlibcString)
return maCachedGlibcString;
diff --git a/i18npool/inc/breakiteratorImpl.hxx b/i18npool/inc/breakiteratorImpl.hxx
index cc5bd31a28ec..a90f06182777 100644
--- a/i18npool/inc/breakiteratorImpl.hxx
+++ b/i18npool/inc/breakiteratorImpl.hxx
@@ -116,7 +116,7 @@ private:
/// @throws css::uno::RuntimeException
bool createLocaleSpecificBreakIterator( const OUString& aLocaleName );
/// @throws css::uno::RuntimeException
- css::uno::Reference < XBreakIterator > getLocaleSpecificBreakIterator( const css::lang::Locale& rLocale );
+ const css::uno::Reference < XBreakIterator > & getLocaleSpecificBreakIterator( const css::lang::Locale& rLocale );
};
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 11149be7558f..a449be4d17fe 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -605,7 +605,7 @@ bool BreakIteratorImpl::createLocaleSpecificBreakIterator(const OUString& aLocal
return false;
}
-Reference < XBreakIterator >
+const Reference < XBreakIterator > &
BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale)
{
if (xBI.is() && rLocale == aLocale)
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx
index 9e3fb4cd4530..a19c2319315b 100644
--- a/include/avmedia/mediaitem.hxx
+++ b/include/avmedia/mediaitem.hxx
@@ -118,7 +118,7 @@ public:
void setMimeType( const OUString& rMimeType );
OUString getMimeType() const;
void setGraphic(const Graphic& rGraphic);
- Graphic getGraphic() const;
+ const Graphic & getGraphic() const;
const OUString& getTempURL() const;
const OUString& getReferer() const;
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index bcf031559bed..9fdb08ebc1d9 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -354,7 +354,7 @@ public:
void InitLOKSpecialPositioning(MapUnit eUnit, const tools::Rectangle& rOutputArea,
const Point& rVisDocStartPos);
void SetLOKSpecialOutputArea(const tools::Rectangle& rOutputArea);
- tools::Rectangle GetLOKSpecialOutputArea() const;
+ const tools::Rectangle & GetLOKSpecialOutputArea() const;
void SetLOKSpecialVisArea(const tools::Rectangle& rVisArea);
tools::Rectangle GetLOKSpecialVisArea() const;
bool HasLOKSpecialPositioning() const;
diff --git a/include/framework/desktop.hxx b/include/framework/desktop.hxx
index 3e6e327bddb6..3bc6a08edea2 100644
--- a/include/framework/desktop.hxx
+++ b/include/framework/desktop.hxx
@@ -446,7 +446,7 @@ class FWK_DLLPUBLIC Desktop final : private cppu::BaseMutex,
}; // class Desktop
-FWK_DLLPUBLIC rtl::Reference<Desktop> getDesktop(
+FWK_DLLPUBLIC const rtl::Reference<Desktop> & getDesktop(
css::uno::Reference<css::uno::XComponentContext> const & context);
} // namespace framework
diff --git a/include/oox/dump/dumperbase.hxx b/include/oox/dump/dumperbase.hxx
index 9be2b341ff48..7b7f4fd9ad8c 100644
--- a/include/oox/dump/dumperbase.hxx
+++ b/include/oox/dump/dumperbase.hxx
@@ -726,7 +726,7 @@ public:
/*implicit*/ NameListWrapper( const NameListRef& rxList ) : mxList( rxList ) {}
bool isEmpty() const { return !mxList && !maName.has(); }
- NameListRef getNameList( const Config& rCfg ) const;
+ const NameListRef & getNameList( const Config& rCfg ) const;
private:
String maName;
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 8dbe60fa1445..ad316dd2fca8 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -113,7 +113,7 @@ public:
SfxItemSet * GetItemSet() const;
void SetArgs(const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
- css::uno::Sequence<css::beans::PropertyValue> GetArgs() const;
+ const css::uno::Sequence<css::beans::PropertyValue> & GetArgs() const;
void Close(bool bInDestruction = false);
void CloseAndRelease();
void ReOpen();
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 847a6bc06c25..34023d8d8bd3 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -64,7 +64,7 @@ public:
/// Get the document id for a view
static int getDocumentIdOfView(int nViewId);
/// Get the default language that should be used for views
- static LanguageTag getDefaultLanguage();
+ static const LanguageTag & getDefaultLanguage();
/// Set language of the given view.
static void setViewLanguage(int nId, const OUString& rBcp47LanguageTag);
/// Set the default language for views.
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 5beb682c6b32..a944345eac99 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -334,7 +334,7 @@ public:
sal_Int16 GetRelativeHeightRelation() const;
void SetDiagramData(std::shared_ptr<DiagramDataInterface> pDiagramData);
- std::shared_ptr<DiagramDataInterface> GetDiagramData() const;
+ const std::shared_ptr<DiagramDataInterface> & GetDiagramData() const;
/// @param bNotMyself = true: set only ObjList to dirty, don't mark this object as dirty.
///
diff --git a/include/vcl/SwapFile.hxx b/include/vcl/SwapFile.hxx
index 55146d608eb8..bcfa0232c62c 100644
--- a/include/vcl/SwapFile.hxx
+++ b/include/vcl/SwapFile.hxx
@@ -43,7 +43,7 @@ public:
utl::UCBContentHelper::Kill(maSwapURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
- INetURLObject getSwapURL() const { return maSwapURL; }
+ const INetURLObject& getSwapURL() const { return maSwapURL; }
OUString getSwapURLString() const
{
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index 9173ce0e7d00..ef87d7728f6d 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -127,7 +127,7 @@ public:
maLogicPosition = aLogicPosition;
}
- std::optional<Point> getLogicPosition() const
+ const std::optional<Point> & getLogicPosition() const
{
return maLogicPosition;
}
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx
index f0ef24b348ea..0fbcf4fe2199 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -65,7 +65,7 @@ public:
PDFium();
~PDFium();
- OUString getLastError() const { return maLastError; }
+ const OUString& getLastError() const { return maLastError; }
std::unique_ptr<PDFiumDocument> openDocument(const void* pData, int nSize);
std::unique_ptr<PDFiumBitmap> createBitmap(int nWidth, int nHeight, int nAlpha);
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 79083bb5a224..f74cfe91ae30 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -182,7 +182,7 @@ public:
bool IsDummyContext() const;
void SetGfxLink(const std::shared_ptr<GfxLink>& rGfxLink);
- std::shared_ptr<GfxLink> GetSharedGfxLink() const;
+ const std::shared_ptr<GfxLink> & GetSharedGfxLink() const;
GfxLink GetGfxLink() const;
bool IsGfxLink() const;
diff --git a/include/vcl/notebookbar/notebookbar.hxx b/include/vcl/notebookbar/notebookbar.hxx
index 35d37aec7b8d..4e5c24631eb0 100644
--- a/include/vcl/notebookbar/notebookbar.hxx
+++ b/include/vcl/notebookbar/notebookbar.hxx
@@ -49,7 +49,7 @@ public:
bool IsWelded() const { return m_bIsWelded; }
VclPtr<vcl::Window>& GetMainContainer() { return m_xVclContentArea; }
- OUString GetUIFilePath() const { return m_sUIXMLDescription; }
+ const OUString & GetUIFilePath() const { return m_sUIXMLDescription; }
void SetDisposeCallback(const Link<const SfxViewShell*, void> rDisposeCallback, const SfxViewShell* pViewShell);
private:
diff --git a/include/vcl/uitest/logger.hxx b/include/vcl/uitest/logger.hxx
index 8a929cf578b3..2500c0d6f58e 100644
--- a/include/vcl/uitest/logger.hxx
+++ b/include/vcl/uitest/logger.hxx
@@ -60,7 +60,7 @@ public:
void setAppName(OUString name) { app_name = name; }
- OUString getAppName() const { return app_name; }
+ const OUString& getAppName() const { return app_name; }
};
#endif
diff --git a/linguistic/source/hyphdsp.hxx b/linguistic/source/hyphdsp.hxx
index 0061e9255401..a119224ca09a 100644
--- a/linguistic/source/hyphdsp.hxx
+++ b/linguistic/source/hyphdsp.hxx
@@ -55,9 +55,9 @@ class HyphenatorDispatcher :
HyphenatorDispatcher(const HyphenatorDispatcher &) = delete;
HyphenatorDispatcher & operator = (const HyphenatorDispatcher &) = delete;
- inline css::uno::Reference< css::linguistic2::XLinguProperties >
+ inline const css::uno::Reference< css::linguistic2::XLinguProperties > &
GetPropSet();
- inline css::uno::Reference< css::linguistic2::XSearchableDictionaryList >
+ inline const css::uno::Reference< css::linguistic2::XSearchableDictionaryList > &
GetDicList();
void ClearSvcList();
@@ -108,7 +108,7 @@ public:
};
-inline css::uno::Reference< css::linguistic2::XLinguProperties >
+inline const css::uno::Reference< css::linguistic2::XLinguProperties > &
HyphenatorDispatcher::GetPropSet()
{
if (!xPropSet.is())
@@ -117,7 +117,7 @@ inline css::uno::Reference< css::linguistic2::XLinguProperties >
}
-inline css::uno::Reference< css::linguistic2::XSearchableDictionaryList >
+inline const css::uno::Reference< css::linguistic2::XSearchableDictionaryList > &
HyphenatorDispatcher::GetDicList()
{
if (!xDicList.is())
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx
index 492321527595..b617f749877e 100644
--- a/linguistic/source/spelldsp.hxx
+++ b/linguistic/source/spelldsp.hxx
@@ -61,9 +61,9 @@ class SpellCheckerDispatcher :
inline linguistic::SpellCache & GetCache() const;
- inline css::uno::Reference< css::linguistic2::XLinguProperties >
+ inline const css::uno::Reference< css::linguistic2::XLinguProperties > &
GetPropSet();
- inline css::uno::Reference< css::linguistic2::XSearchableDictionaryList >
+ inline const css::uno::Reference< css::linguistic2::XSearchableDictionaryList > &
GetDicList();
/// @throws css::uno::RuntimeException
@@ -118,7 +118,7 @@ inline linguistic::SpellCache & SpellCheckerDispatcher::GetCache() const
}
-inline css::uno::Reference< css::linguistic2::XLinguProperties >
+inline const css::uno::Reference< css::linguistic2::XLinguProperties > &
SpellCheckerDispatcher::GetPropSet()
{
if (!m_xPropSet.is())
@@ -127,7 +127,7 @@ inline css::uno::Reference< css::linguistic2::XLinguProperties >
}
-inline css::uno::Reference< css::linguistic2::XSearchableDictionaryList >
+inline const css::uno::Reference< css::linguistic2::XSearchableDictionaryList > &
SpellCheckerDispatcher::GetDicList()
{
if (!m_xDicList.is())
diff --git a/linguistic/source/thesdsp.hxx b/linguistic/source/thesdsp.hxx
index 077413d6e791..80cafe29cc4b 100644
--- a/linguistic/source/thesdsp.hxx
+++ b/linguistic/source/thesdsp.hxx
@@ -48,7 +48,7 @@ class ThesaurusDispatcher :
ThesaurusDispatcher(const ThesaurusDispatcher &) = delete;
ThesaurusDispatcher & operator = (const ThesaurusDispatcher &) = delete;
- inline css::uno::Reference< css::linguistic2::XLinguProperties >
+ inline const css::uno::Reference< css::linguistic2::XLinguProperties > &
GetPropSet();
void ClearSvcList();
@@ -78,7 +78,7 @@ public:
};
-inline css::uno::Reference< css::linguistic2::XLinguProperties >
+inline const css::uno::Reference< css::linguistic2::XLinguProperties > &
ThesaurusDispatcher::GetPropSet()
{
if (!xPropSet.is())
diff --git a/oox/source/drawingml/diagram/diagram.hxx b/oox/source/drawingml/diagram/diagram.hxx
index 1bd6dd9f7df9..6aad2705f264 100644
--- a/oox/source/drawingml/diagram/diagram.hxx
+++ b/oox/source/drawingml/diagram/diagram.hxx
@@ -149,7 +149,7 @@ public:
void addTo( const ShapePtr & pShape );
css::uno::Sequence<css::beans::PropertyValue> getDomsAsPropertyValues() const;
- ShapePtr getShape() const { return mpShape; }
+ const ShapePtr & getShape() const { return mpShape; }
private:
ShapePtr mpShape;
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 231b9cd37306..c6d61bb21186 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -1247,7 +1247,7 @@ void UnitConverter::implIncludeList( const NameListBase& /*rList*/ )
{
}
-NameListRef NameListWrapper::getNameList( const Config& rCfg ) const
+const NameListRef & NameListWrapper::getNameList( const Config& rCfg ) const
{
if (!mxList)
mxList = rCfg.getNameList( maName );
diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx
index b83f7cac7ab7..db679d94d4ee 100644
--- a/sdext/source/presenter/PresenterToolBar.cxx
+++ b/sdext/source/presenter/PresenterToolBar.cxx
@@ -1897,7 +1897,7 @@ void PresentationTimeLabel::TimeHasChanged (const oslDateTime& rCurrentTime)
TimeValue pauseTime_(0, 0);
setPauseTimeValue(pauseTime_);
- }
+ }
}
else
{
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 7a1bf5a7f2c9..66e95d348b24 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3294,7 +3294,7 @@ void SfxMedium::SetArgs(const uno::Sequence<beans::PropertyValue>& rArgs)
pImpl->m_aArgs = aArgsMap.getAsConstPropertyValueList();
}
-uno::Sequence<beans::PropertyValue> SfxMedium::GetArgs() const { return pImpl->m_aArgs; }
+const uno::Sequence<beans::PropertyValue> & SfxMedium::GetArgs() const { return pImpl->m_aArgs; }
SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const OUString& rBaseURL, const std::shared_ptr<SfxItemSet>& p ) :
pImpl(new SfxMedium_Impl)
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 42e0d60b3382..7c7511fbfbd4 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -253,7 +253,7 @@ int SfxLokHelper::getDocumentIdOfView(int nViewId)
return -1;
}
-LanguageTag SfxLokHelper::getDefaultLanguage()
+const LanguageTag & SfxLokHelper::getDefaultLanguage()
{
return g_defaultLanguageTag;
}
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index e10273b88aca..1deafb09b805 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -152,7 +152,7 @@ public:
void SetSelectHdl(const Link<SmElement&,void>& rLink) { maSelectHdlLink = rLink; }
- rtl::Reference<AccessibleSmElementsControl> GetAccessible() const { return m_xAccessible; }
+ const rtl::Reference<AccessibleSmElementsControl> & GetAccessible() const { return m_xAccessible; }
static Color GetTextColor();
static Color GetControlBackground();
diff --git a/svx/source/svdraw/presetooxhandleadjustmentrelations.cxx b/svx/source/svdraw/presetooxhandleadjustmentrelations.cxx
index 22f7a40503b9..8a8932014011 100644
--- a/svx/source/svdraw/presetooxhandleadjustmentrelations.cxx
+++ b/svx/source/svdraw/presetooxhandleadjustmentrelations.cxx
@@ -282,7 +282,7 @@ const HandleAdjRel aHandleAdjRelArray[]
{ "wedgeRoundRectCallout_0", "RefX|adj1|RefY|adj2" } };
}
-static sal_Int32 lcl_getAdjIndexFromToken(const sal_Int32& nTokenPos, const OUString& rMapValue)
+static sal_Int32 lcl_getAdjIndexFromToken(const sal_Int32 nTokenPos, const OUString& rMapValue)
{
OUString sAdjRef = rMapValue.getToken(nTokenPos, '|');
OUString sNumber; // number part from "adj1", "adj2" etc.
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index a3ef40271c6f..02cc13ccd7be 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -540,7 +540,7 @@ void SdrObject::SetDiagramData(std::shared_ptr<DiagramDataInterface> pDiagramDat
mpImpl->mpDiagramData = pDiagramData;
}
-std::shared_ptr<DiagramDataInterface> SdrObject::GetDiagramData() const
+const std::shared_ptr<DiagramDataInterface> & SdrObject::GetDiagramData() const
{
return mpImpl->mpDiagramData;
}
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 5c13eece54ea..e38122ec390d 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -261,7 +261,7 @@ public:
m_wXFieldMaster = xFieldMaster;
}
- static OUString GetTypeStr( SwFieldTypesEnum nTypeId );
+ static const OUString & GetTypeStr( SwFieldTypesEnum nTypeId );
/// Only in derived classes.
virtual OUString GetName() const;
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index b1220181df54..26588ea50199 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -118,7 +118,7 @@ namespace
}
-OUString SwFieldType::GetTypeStr(SwFieldTypesEnum nTypeId)
+const OUString & SwFieldType::GetTypeStr(SwFieldTypesEnum nTypeId)
{
if (!s_pFieldNames)
GetFieldName_();
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index dcf02a29de31..cad12473184f 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -524,7 +524,7 @@ SwFieldTypesEnum SwFieldMgr::GetTypeId(sal_uInt16 nPos)
return aSwFields[ nPos ].nTypeId;
}
-OUString SwFieldMgr::GetTypeStr(sal_uInt16 nPos)
+const OUString & SwFieldMgr::GetTypeStr(sal_uInt16 nPos)
{
OSL_ENSURE(nPos < ::GetPackCount(), "forbidden TypeId");
diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx
index ebc5c4966c09..bd353d6542c5 100644
--- a/sw/source/uibase/inc/fldmgr.hxx
+++ b/sw/source/uibase/inc/fldmgr.hxx
@@ -174,7 +174,7 @@ public:
// TypeId for a concrete position in the list
static SwFieldTypesEnum GetTypeId(sal_uInt16 nPos);
// name of the type in the list of fields
- static OUString GetTypeStr(sal_uInt16 nPos);
+ static const OUString & GetTypeStr(sal_uInt16 nPos);
// Pos in the list of fields
static sal_uInt16 GetPos(SwFieldTypesEnum nTypeId);
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index e2c3c15d0e24..05a1cff79097 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -367,7 +367,7 @@ static svx::sidebar::TreeNode LocaleToTreeNode(const OUString& rName, const css:
static svx::sidebar::TreeNode
PropertyToTreeNode(const css::beans::Property& rProperty,
- const uno::Reference<beans::XPropertySet>& xPropertiesSet, const bool& rIsGrey)
+ const uno::Reference<beans::XPropertySet>& xPropertiesSet, const bool rIsGrey)
{
const OUString& rPropName = rProperty.Name;
svx::sidebar::TreeNode aCurNode;
@@ -401,7 +401,7 @@ PropertyToTreeNode(const css::beans::Property& rProperty,
static void InsertValues(const css::uno::Reference<css::uno::XInterface>& rSource,
std::unordered_map<OUString, bool>& rIsDefined,
- svx::sidebar::TreeNode& rNode, const bool& isRoot,
+ svx::sidebar::TreeNode& rNode, const bool isRoot,
const std::vector<OUString>& rHiddenProperty)
{
uno::Reference<beans::XPropertySet> xPropertiesSet(rSource, uno::UNO_QUERY_THROW);
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 872bc13ac469..b1ffb347a23f 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -88,7 +88,7 @@ public:
explicit UUIInteractionHelper(
css::uno::Reference< css::uno::XComponentContext > const & rxContext);
- css::uno::Reference<css::awt::XWindow> GetParentWindow() const { return m_xWindowParam; }
+ const css::uno::Reference<css::awt::XWindow> & GetParentWindow() const { return m_xWindowParam; }
void SetParentWindow(const css::uno::Reference<css::awt::XWindow>& rWindow) { m_xWindowParam = rWindow; }
~UUIInteractionHelper();
diff --git a/vcl/inc/image.h b/vcl/inc/image.h
index 6fb19bd615da..633c38c4a34e 100644
--- a/vcl/inc/image.h
+++ b/vcl/inc/image.h
@@ -47,7 +47,7 @@ public:
return maStockName.getLength() > 0;
}
- OUString getStock() const
+ const OUString & getStock() const
{
return maStockName;
}
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index 6287be0df1b1..a9b75697d399 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -192,7 +192,7 @@ private:
void setDummyContext( bool value ) { mbDummyContext = value; }
bool isDummyContext() const { return mbDummyContext; }
void setGfxLink( const std::shared_ptr<GfxLink>& );
- std::shared_ptr<GfxLink> getSharedGfxLink() const;
+ const std::shared_ptr<GfxLink> & getSharedGfxLink() const;
GfxLink getGfxLink();
bool isGfxLink() const;
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index 6a844002711d..aabdfdb7368f 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -741,7 +741,7 @@ public:
sal_uInt32 horzMetricCount() const { return m_nHorzMetrics; }
sal_uInt32 vertMetricCount() const { return m_nVertMetrics; }
sal_uInt32 unitsPerEm() const { return m_nUnitsPerEm; }
- FontCharMapRef GetCharMap() const { return m_xCharMap; }
+ const FontCharMapRef & GetCharMap() const { return m_xCharMap; }
virtual bool hasTable(sal_uInt32 ord) const = 0;
virtual const sal_uInt8* table(sal_uInt32 ord, sal_uInt32& size) const = 0;
diff --git a/vcl/inc/unx/freetype_glyphcache.hxx b/vcl/inc/unx/freetype_glyphcache.hxx
index 4586c6fd2e6d..625f7c828d80 100644
--- a/vcl/inc/unx/freetype_glyphcache.hxx
+++ b/vcl/inc/unx/freetype_glyphcache.hxx
@@ -72,7 +72,7 @@ public:
void AnnounceFont( PhysicalFontCollection* );
- FontCharMapRef GetFontCharMap() const;
+ const FontCharMapRef & GetFontCharMap() const;
bool GetFontCapabilities(vcl::FontCapabilities&) const;
private:
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 21b196623f30..b41076844df2 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -122,7 +122,7 @@ public:
void GetFontMetric(ImplFontMetricDataRef const &) const;
const unsigned char* GetTable( const char* pName, sal_uLong* pLength ) const;
- FontCharMapRef GetFontCharMap() const;
+ const FontCharMapRef & GetFontCharMap() const;
bool GetFontCapabilities(vcl::FontCapabilities &) const;
bool GetGlyphBoundRect(sal_GlyphId, tools::Rectangle&, bool) const;
diff --git a/vcl/inc/verticaltabctrl.hxx b/vcl/inc/verticaltabctrl.hxx
index 1152d702ea60..f3522c2fe697 100644
--- a/vcl/inc/verticaltabctrl.hxx
+++ b/vcl/inc/verticaltabctrl.hxx
@@ -54,11 +54,11 @@ public:
sal_uInt16 GetPageCount() const { return m_xChooser->GetEntryCount(); }
- OString GetCurPageId() const { return m_sCurrentPageId; }
+ const OString& GetCurPageId() const { return m_sCurrentPageId; }
void SetCurPageId(const OString& rId);
sal_uInt16 GetPagePos(std::string_view rPageId) const;
- OString GetPageId(sal_uInt16 nIndex) const;
+ const OString& GetPageId(sal_uInt16 nIndex) const;
VclPtr<vcl::Window> GetPage(std::string_view rPageId);
void RemovePage(std::string_view rPageId);
diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index f59e6784c7da..998a44888aee 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -547,7 +547,7 @@ void VerticalTabControl::SetCurPageId(const OString& rId)
collectUIInformation(get_id(),OStringToOUString(m_sCurrentPageId,RTL_TEXTENCODING_UTF8), GetPageParent()->get_id());
}
-OString VerticalTabControl::GetPageId(sal_uInt16 nIndex) const
+const OString & VerticalTabControl::GetPageId(sal_uInt16 nIndex) const
{
return maPageList[nIndex]->sId;
}
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 74a61e871e78..ac47534058bb 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -500,7 +500,7 @@ void Graphic::SetGfxLink( const std::shared_ptr<GfxLink>& rGfxLink )
mxImpGraphic->setGfxLink(rGfxLink);
}
-std::shared_ptr<GfxLink> Graphic::GetSharedGfxLink() const
+const std::shared_ptr<GfxLink> & Graphic::GetSharedGfxLink() const
{
return mxImpGraphic->getSharedGfxLink();
}
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 99fe4d8ca63a..9e57ff26ce98 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1659,7 +1659,7 @@ void ImpGraphic::setGfxLink(const std::shared_ptr<GfxLink>& rGfxLink)
mpGfxLink = rGfxLink;
}
-std::shared_ptr<GfxLink> ImpGraphic::getSharedGfxLink() const
+const std::shared_ptr<GfxLink> & ImpGraphic::getSharedGfxLink() const
{
return mpGfxLink;
}
diff --git a/vcl/source/gdi/pdfbuildin_fonts.cxx b/vcl/source/gdi/pdfbuildin_fonts.cxx
index 4d74cf899069..92cf2c7e2145 100644
--- a/vcl/source/gdi/pdfbuildin_fonts.cxx
+++ b/vcl/source/gdi/pdfbuildin_fonts.cxx
@@ -41,7 +41,7 @@ OString BuildinFont::getNameObject() const
return aBuf.makeStringAndClear();
}
-FontCharMapRef BuildinFont::GetFontCharMap() const
+const FontCharMapRef& BuildinFont::GetFontCharMap() const
{
assert(false && "pdf::BuildinFont doesn't provide correct char maps!");
if (m_xFontCharMap.is())
diff --git a/vcl/source/gdi/pdfbuildin_fonts.hxx b/vcl/source/gdi/pdfbuildin_fonts.hxx
index b7bf17fdb405..6c3c03ffc7ea 100644
--- a/vcl/source/gdi/pdfbuildin_fonts.hxx
+++ b/vcl/source/gdi/pdfbuildin_fonts.hxx
@@ -41,7 +41,7 @@ struct BuildinFont
mutable FontCharMapRef m_xFontCharMap;
OString getNameObject() const;
- FontCharMapRef GetFontCharMap() const;
+ const FontCharMapRef& GetFontCharMap() const;
FontAttributes GetFontAttributes() const;
};
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 0193bf76074e..13eea80c71e1 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -345,7 +345,8 @@ OUString StringMapToOUString(const std::map<OUString, OUString>& rParameters)
return aParameterString.makeStringAndClear();
}
-OUString GetValueInMapWithIndex(const std::map<OUString, OUString>& rParameters, sal_Int32 index)
+const OUString& GetValueInMapWithIndex(const std::map<OUString, OUString>& rParameters,
+ sal_Int32 index)
{
sal_Int32 j = 0;
@@ -359,7 +360,8 @@ OUString GetValueInMapWithIndex(const std::map<OUString, OUString>& rParameters,
return itr->second;
}
-OUString GetKeyInMapWithIndex(const std::map<OUString, OUString>& rParameters, sal_Int32 index)
+const OUString& GetKeyInMapWithIndex(const std::map<OUString, OUString>& rParameters,
+ sal_Int32 index)
{
sal_Int32 j = 0;
diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx b/vcl/source/window/NotebookBarAddonsMerger.cxx
index f6f9fe37db56..d5446032a248 100644
--- a/vcl/source/window/NotebookBarAddonsMerger.cxx
+++ b/vcl/source/window/NotebookBarAddonsMerger.cxx
@@ -65,7 +65,7 @@ static void GetAddonNotebookBarItem(const css::uno::Sequence<css::beans::Propert
static void CreateNotebookBarToolBox(vcl::Window* pNotebookbarToolBox,
const css::uno::Reference<css::frame::XFrame>& m_xFrame,
const AddonNotebookBarItem& aAddonNotebookBarItem,
- const std::vector<Image>& aImageVec, const tools::ULong& nIter)
+ const std::vector<Image>& aImageVec, const tools::ULong nIter)
{
sal_uInt16 nItemId = 0;
ToolBox* pToolbox = dynamic_cast<ToolBox*>(pNotebookbarToolBox);
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 9e4a4d44974c..cdbbb58a42b6 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -673,7 +673,7 @@ bool FreetypeFont::GetAntialiasAdvice() const
// determine unicode ranges in font
-FontCharMapRef FreetypeFont::GetFontCharMap() const
+const FontCharMapRef & FreetypeFont::GetFontCharMap() const
{
return mxFontInfo->GetFontCharMap();
}
@@ -683,7 +683,7 @@ bool FreetypeFont::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities)
return mxFontInfo->GetFontCapabilities(rFontCapabilities);
}
-FontCharMapRef FreetypeFontInfo::GetFontCharMap() const
+const FontCharMapRef & FreetypeFontInfo::GetFontCharMap() const
{
// check if the charmap is already cached
if( mxFontCharMap.is() )
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index cefe801145c5..da78cb682e5c 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -413,7 +413,7 @@ TablePositionHandler* DomainMapperTableManager::getCurrentTableRealPosition()
return nullptr;
}
-TableParagraphVectorPtr DomainMapperTableManager::getCurrentParagraphs( )
+const TableParagraphVectorPtr & DomainMapperTableManager::getCurrentParagraphs( )
{
return m_aParagraphsToEndTable.top( );
}
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
index 1eb61b6df309..9b30e6dd8315 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
@@ -89,7 +89,7 @@ public:
IntVectorPtr const & getCurrentGrid( );
IntVectorPtr const & getCurrentCellWidths( );
- TableParagraphVectorPtr getCurrentParagraphs( );
+ const TableParagraphVectorPtr & getCurrentParagraphs( );
/// Turn the attributes collected so far in m_aTableLook into a property and clear the container.
void finishTableLook();
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index ec86b041e216..2143f3b2f04c 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -414,7 +414,7 @@ ListDef::~ListDef( )
{
}
-OUString ListDef::GetStyleName(sal_Int32 const nId,
+const OUString & ListDef::GetStyleName(sal_Int32 const nId,
uno::Reference<container::XNameContainer> const& xStyles)
{
if (xStyles.is())
diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx
index 86c8cfbfd9e1..0a4c3e18f8e6 100644
--- a/writerfilter/source/dmapper/NumberingManager.hxx
+++ b/writerfilter/source/dmapper/NumberingManager.hxx
@@ -193,8 +193,8 @@ public:
const AbstractListDef::Pointer& GetAbstractDefinition( ) const { return m_pAbstractDef; };
// Mapping functions
- OUString GetStyleName() const { return m_StyleName; };
- OUString GetStyleName(sal_Int32 nId, css::uno::Reference<css::container::XNameContainer> const& xStyles);
+ const OUString & GetStyleName() const { return m_StyleName; };
+ const OUString & GetStyleName(sal_Int32 nId, css::uno::Reference<css::container::XNameContainer> const& xStyles);
sal_Int16 GetDefaultParentLevels() const { return m_nDefaultParentLevels; };
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index 788fd93f25bc..24f0e26e0545 100644
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -693,12 +693,12 @@ sal_Int16 SettingsTable::GetHyphenationZone() const
return m_pImpl->m_nHyphenationZone;
}
-OUString SettingsTable::GetDecimalSymbol() const
+const OUString & SettingsTable::GetDecimalSymbol() const
{
return m_pImpl->m_sDecimalSymbol;
}
-OUString SettingsTable::GetListSeparator() const
+const OUString & SettingsTable::GetListSeparator() const
{
return m_pImpl->m_sListSeparator;
}
diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx
index 035384af52be..f7cf2793861a 100644
--- a/writerfilter/source/dmapper/SettingsTable.hxx
+++ b/writerfilter/source/dmapper/SettingsTable.hxx
@@ -79,8 +79,8 @@ public:
bool GetNoHyphenateCaps() const;
sal_Int16 GetHyphenationZone() const;
- OUString GetDecimalSymbol() const;
- OUString GetListSeparator() const;
+ const OUString& GetDecimalSymbol() const;
+ const OUString& GetListSeparator() const;
css::uno::Sequence<css::beans::PropertyValue> const& GetThemeFontLangProperties() const;
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index b8acdc059cf8..75db8de5bcb5 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -168,7 +168,7 @@ bool lcl_pathExists(const OUString& sPath)
} // namespace
-OUString ONSSInitializer::getMozillaCurrentProfile(const css::uno::Reference< css::uno::XComponentContext > &rxContext, bool bSetActive)
+const OUString & ONSSInitializer::getMozillaCurrentProfile(const css::uno::Reference< css::uno::XComponentContext > &rxContext, bool bSetActive)
{
if (m_bIsNSSinitialized)
return m_sNSSPath;
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
index 2dcd821c020d..fadda65e7ddc 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.hxx
@@ -47,7 +47,7 @@ public:
virtual ~ONSSInitializer() override;
static bool initNSS( const css::uno::Reference< css::uno::XComponentContext > &rxContext );
- static OUString getMozillaCurrentProfile(const css::uno::Reference< css::uno::XComponentContext > &rxContext, bool bSetActive = false);
+ static const OUString & getMozillaCurrentProfile(const css::uno::Reference< css::uno::XComponentContext > &rxContext, bool bSetActive = false);
/* XNSSInitializer */
virtual OUString SAL_CALL getNSSPath() override;