summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/misc/logging.cxx2
-rw-r--r--compilerplugins/clang/passstuffbyref.cxx12
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.cxx2
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.hxx2
-rw-r--r--cppcanvas/source/mtfrenderer/textlineshelper.hxx2
-rw-r--r--include/comphelper/logging.hxx2
-rw-r--r--include/sfx2/sidebar/SidebarController.hxx2
-rw-r--r--include/svl/itempool.hxx4
-rw-r--r--include/svx/charmap.hxx2
-rw-r--r--include/svx/svdlayer.hxx6
-rw-r--r--include/svx/unoshape.hxx2
-rw-r--r--include/vcl/menu.hxx2
-rw-r--r--include/vcl/menubtn.hxx2
-rw-r--r--oox/source/drawingml/texteffectscontext.cxx2
-rw-r--r--sc/source/filter/inc/stylesbuffer.hxx2
-rw-r--r--sc/source/ui/dataprovider/datatransformation.cxx12
-rw-r--r--sc/source/ui/inc/datatransformation.hxx12
-rw-r--r--sdext/source/minimizer/unodialog.hxx2
-rw-r--r--sfx2/inc/SfxRedactionHelper.hxx8
-rw-r--r--sfx2/inc/autoredactdialog.hxx4
-rw-r--r--sfx2/source/doc/SfxRedactionHelper.cxx12
-rw-r--r--sfx2/source/doc/autoredactdialog.cxx6
-rw-r--r--starmath/inc/ElementsDockingWindow.hxx2
-rw-r--r--svtools/source/control/tabbar.cxx2
-rw-r--r--svx/source/dialog/charmap.cxx2
-rw-r--r--svx/source/stbctrls/zoomctrl.cxx2
-rw-r--r--svx/source/unodraw/unoshape.cxx2
-rw-r--r--sw/inc/authfld.hxx2
-rw-r--r--sw/inc/viewsh.hxx2
-rw-r--r--sw/source/core/fields/authfld.cxx2
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.cxx2
-rw-r--r--vcl/inc/image.h4
-rw-r--r--vcl/inc/qt5/Qt5FontFace.hxx2
-rw-r--r--vcl/qt5/Qt5FontFace.cxx2
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx2
-rw-r--r--vcl/source/gdi/svmconverter.cxx2
-rw-r--r--vcl/source/image/ImplImage.cxx4
-rw-r--r--writerfilter/source/dmapper/SettingsTable.cxx2
-rw-r--r--writerfilter/source/dmapper/SettingsTable.hxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx2
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.hxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx4
-rw-r--r--writerperfect/source/writer/exp/xmlfmt.cxx2
-rw-r--r--xmlsecurity/inc/documentsignaturemanager.hxx2
44 files changed, 81 insertions, 71 deletions
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index dfd52f8d5bcb..d9b7caf52634 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -86,7 +86,7 @@ namespace comphelper
return false;
}
- const css::uno::Reference<css::logging::XLogger> EventLogger::getLogger()
+ const css::uno::Reference<css::logging::XLogger> & EventLogger::getLogger()
{
return m_pImpl->getLogger();
}
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx
index 1fd14619b62f..cff1e781455c 100644
--- a/compilerplugins/clang/passstuffbyref.cxx
+++ b/compilerplugins/clang/passstuffbyref.cxx
@@ -271,6 +271,18 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
.GlobalNamespace()) {
return;
}
+ // hides a constructor
+ if (dc.Function("createNonOwningCopy").Class("SortedAutoCompleteStrings").Namespace("editeng")
+ .GlobalNamespace()) {
+ return;
+ }
+ // template function
+ if (dc.Function("convertItems").Class("ValueParser").Namespace("configmgr").GlobalNamespace()
+ || dc.Function("parseListValue").AnonymousNamespace().Namespace("configmgr").GlobalNamespace()
+ || dc.Function("parseSingleValue").AnonymousNamespace().Namespace("configmgr").GlobalNamespace()
+ || dc.Function("Create").Class("HandlerComponentBase").Namespace("pcr").GlobalNamespace()) {
+ return;
+ }
if (startswith(type.getAsString(), "struct o3tl::strong_int")) {
return;
}
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index 38384282040b..d0c19c6dacf9 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -57,7 +57,7 @@ using namespace ::com::sun::star::util;
OResultSet::OResultSet(Connection* pConnection,
::osl::Mutex& rMutex,
const uno::Reference< XInterface >& xStatement,
- const isc_stmt_handle& aStatementHandle,
+ isc_stmt_handle aStatementHandle,
XSQLDA* pSqlda )
: OResultSet_BASE(rMutex)
, OPropertyContainer(OResultSet_BASE::rBHelper)
diff --git a/connectivity/source/drivers/firebird/ResultSet.hxx b/connectivity/source/drivers/firebird/ResultSet.hxx
index ca1804629b2a..000f749af9f8 100644
--- a/connectivity/source/drivers/firebird/ResultSet.hxx
+++ b/connectivity/source/drivers/firebird/ResultSet.hxx
@@ -121,7 +121,7 @@ namespace connectivity
OResultSet(Connection* pConnection,
::osl::Mutex& rMutex,
const css::uno::Reference< css::uno::XInterface >& xStatement,
- const isc_stmt_handle& aStatementHandle,
+ isc_stmt_handle aStatementHandle,
XSQLDA* aSqlda
);
diff --git a/cppcanvas/source/mtfrenderer/textlineshelper.hxx b/cppcanvas/source/mtfrenderer/textlineshelper.hxx
index ca13d9482ad2..d00be8bfa791 100644
--- a/cppcanvas/source/mtfrenderer/textlineshelper.hxx
+++ b/cppcanvas/source/mtfrenderer/textlineshelper.hxx
@@ -63,7 +63,7 @@ class TextLinesHelper
public:
TextLinesHelper(const CanvasSharedPtr& rCanvas, const OutDevState& rState);
- ::basegfx::B2DSize getOverallSize() const { return maOverallSize; }
+ ::basegfx::B2DSize const& getOverallSize() const { return maOverallSize; }
/** Init textlines with specified linewidth and TextLineInfo.
*/
diff --git a/include/comphelper/logging.hxx b/include/comphelper/logging.hxx
index e6e793c3c014..34d9f4cef5d2 100644
--- a/include/comphelper/logging.hxx
+++ b/include/comphelper/logging.hxx
@@ -124,7 +124,7 @@ namespace comphelper
impl_log(_nLogLevel, nullptr, nullptr, rMessage);
}
- const css::uno::Reference<css::logging::XLogger> getLogger();
+ const css::uno::Reference<css::logging::XLogger> & getLogger();
/** logs a given message, replacing a placeholder in the message with an argument
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index b4521bd4166c..d6c8d54f7e8a 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -162,7 +162,7 @@ public:
tools::Rectangle GetDeckDragArea() const;
- css::uno::Reference<css::frame::XFrame> getXFrame() {return mxFrame;}
+ css::uno::Reference<css::frame::XFrame> const & getXFrame() const {return mxFrame;}
sal_Int32 getMaximumWidth() { return mnMaximumSidebarWidth; }
void setMaximumWidth(sal_Int32 nMaximumWidth) { mnMaximumSidebarWidth = nMaximumWidth; }
diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index 4c9052df0a13..10dbd3252c9e 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -164,8 +164,8 @@ public:
{
o3tl::sorted_vector<SfxPoolItem*>::const_iterator m_begin;
o3tl::sorted_vector<SfxPoolItem*>::const_iterator m_end;
- o3tl::sorted_vector<SfxPoolItem*>::const_iterator begin() { return m_begin; }
- o3tl::sorted_vector<SfxPoolItem*>::const_iterator end() { return m_end; }
+ o3tl::sorted_vector<SfxPoolItem*>::const_iterator const & begin() const { return m_begin; }
+ o3tl::sorted_vector<SfxPoolItem*>::const_iterator const & end() const { return m_end; }
};
const SfxPoolItem * GetItem2Default(sal_uInt16 nWhich) const;
template<class T> const T* GetItem2Default( TypedWhichId<T> nWhich ) const
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index e4db794c1d57..1db1442fa7fe 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -76,7 +76,7 @@ public:
static sal_uInt32& getSelectedChar();
void SetFont( const vcl::Font& rFont );
vcl::Font const & GetFont() const { return maFont; }
- FontCharMapRef GetFontCharMap();
+ FontCharMapRef const & GetFontCharMap();
bool isFavChar(const OUString& sTitle, const OUString& rFont);
void getFavCharacterList(); //gets both Fav char and Fav char font list
void updateFavCharacterList(const OUString& rChar, const OUString& rFont);
diff --git a/include/svx/svdlayer.hxx b/include/svx/svdlayer.hxx
index e49e079c82c9..eb8e3672aa5c 100644
--- a/include/svx/svdlayer.hxx
+++ b/include/svx/svdlayer.hxx
@@ -82,13 +82,13 @@ public:
void SetDescription(const OUString& rDesc) { maDescription = rDesc; }
const OUString& GetDescription() const { return maDescription; }
- void SetVisibleODF(const bool& rVisibleODF) { mbVisibleODF = rVisibleODF; }
+ void SetVisibleODF(bool bVisibleODF) { mbVisibleODF = bVisibleODF; }
bool IsVisibleODF() const { return mbVisibleODF; }
- void SetPrintableODF(const bool& rPrintableODF) { mbPrintableODF = rPrintableODF; }
+ void SetPrintableODF(bool bPrintableODF) { mbPrintableODF = bPrintableODF; }
bool IsPrintableODF() const { return mbPrintableODF; }
- void SetLockedODF(const bool& rLockedODF) { mbLockedODF = rLockedODF; }
+ void SetLockedODF(bool bLockedODF) { mbLockedODF = bLockedODF; }
bool IsLockedODF() const { return mbLockedODF; }
SdrLayerID GetID() const { return nID; }
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 7c8b3cdc6f4d..8d522b3bcab7 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -259,7 +259,7 @@ public:
css::uno::Sequence< OUString > _getSupportedServiceNames();
/// @throws css::uno::RuntimeException
- css::uno::Sequence< css::uno::Type > _getTypes( );
+ css::uno::Sequence< css::uno::Type > const & _getTypes( );
void setMaster( SvxShapeMaster* pMaster );
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index a82af83f155e..76a39c813eef 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -263,7 +263,7 @@ public:
OString GetItemIdent(sal_uInt16 nItemId) const;
MenuItemType GetItemType( sal_uInt16 nPos ) const;
sal_uInt16 GetCurItemId() const { return nSelectedId;}
- OString GetCurItemIdent() const { return sSelectedIdent; }
+ OString const & GetCurItemIdent() const { return sSelectedIdent; }
void SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits );
MenuItemBits GetItemBits( sal_uInt16 nItemId ) const;
diff --git a/include/vcl/menubtn.hxx b/include/vcl/menubtn.hxx
index 90d42fc607fc..f087023af6aa 100644
--- a/include/vcl/menubtn.hxx
+++ b/include/vcl/menubtn.hxx
@@ -79,7 +79,7 @@ public:
void SetPopover(Window* pWindow);
sal_uInt16 GetCurItemId() const { return mnCurItemId; }
- OString GetCurItemIdent() const { return msCurItemIdent; }
+ OString const & GetCurItemIdent() const { return msCurItemIdent; }
void SetActivateHdl( const Link<MenuButton *, void>& rLink ) { maActivateHdl = rLink; }
void SetSelectHdl( const Link<MenuButton *, void>& rLink ) { maSelectHdl = rLink; }
diff --git a/oox/source/drawingml/texteffectscontext.cxx b/oox/source/drawingml/texteffectscontext.cxx
index 79d69408996d..4bf165fe9dae 100644
--- a/oox/source/drawingml/texteffectscontext.cxx
+++ b/oox/source/drawingml/texteffectscontext.cxx
@@ -75,7 +75,7 @@ OUString const & lclGetNameForElementId(sal_uInt32 aId)
return aIdMap.find(aId)->second;
}
-OUString lclGetGrabBagName(sal_uInt32 aId)
+OUString const & lclGetGrabBagName(sal_uInt32 aId)
{
static std::map<sal_uInt32, OUString> const aGrabBagNameMap
{
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index c3bd431b3f83..61d438684761 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -863,7 +863,7 @@ public:
/** Writes the cell formatting attributes of the specified XF to the passed property set. */
void writeCellXfToDoc( ScDocumentImport& rDoc, const ScRange& rRange, sal_Int32 nXfId ) const;
- RefVector< Dxf > getExtDxfs() { return maExtDxfs; }
+ const RefVector< Dxf >& getExtDxfs() { return maExtDxfs; }
private:
typedef RefVector< Font > FontVector;
diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx
index 2cb3f7495710..5f0346c71496 100644
--- a/sc/source/ui/dataprovider/datatransformation.cxx
+++ b/sc/source/ui/dataprovider/datatransformation.cxx
@@ -291,7 +291,7 @@ TEXT_TRANSFORM_TYPE TextTransformation::getTextTransformationType() const
return maType;
}
-std::set<SCCOL> TextTransformation::getColumns() const
+const std::set<SCCOL>& TextTransformation::getColumns() const
{
return mnCol;
}
@@ -398,7 +398,7 @@ AGGREGATE_FUNCTION AggregateFunction::getAggregateType() const
return maType;
}
-std::set<SCCOL> AggregateFunction::getColumns() const
+const std::set<SCCOL>& AggregateFunction::getColumns() const
{
return maColumns;
}
@@ -656,7 +656,7 @@ int NumberTransformation::getPrecision() const
return maPrecision;
}
-std::set<SCCOL> NumberTransformation::getColumn() const
+const std::set<SCCOL>& NumberTransformation::getColumn() const
{
return mnCol;
}
@@ -696,12 +696,12 @@ void ReplaceNullTransformation::Transform(ScDocument& rDoc) const
}
-std::set<SCCOL> ReplaceNullTransformation::getColumn() const
+const std::set<SCCOL>& ReplaceNullTransformation::getColumn() const
{
return mnCol;
}
-OUString ReplaceNullTransformation::getReplaceString() const
+const OUString& ReplaceNullTransformation::getReplaceString() const
{
return msReplaceWith;
}
@@ -1166,7 +1166,7 @@ DATETIME_TRANSFORMATION_TYPE DateTimeTransformation::getDateTimeTransfromationTy
return maType;
}
-std::set<SCCOL>DateTimeTransformation::getColumn() const
+const std::set<SCCOL>& DateTimeTransformation::getColumn() const
{
return mnCol;
}
diff --git a/sc/source/ui/inc/datatransformation.hxx b/sc/source/ui/inc/datatransformation.hxx
index 40e7002cc40e..53ddf991233d 100644
--- a/sc/source/ui/inc/datatransformation.hxx
+++ b/sc/source/ui/inc/datatransformation.hxx
@@ -122,7 +122,7 @@ class SC_DLLPUBLIC TextTransformation : public DataTransformation
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
TEXT_TRANSFORM_TYPE getTextTransformationType() const;
- std::set<SCCOL> getColumns() const;
+ const std::set<SCCOL>& getColumns() const;
};
class SC_DLLPUBLIC AggregateFunction : public DataTransformation
@@ -135,7 +135,7 @@ class SC_DLLPUBLIC AggregateFunction : public DataTransformation
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
AGGREGATE_FUNCTION getAggregateType() const;
- std::set<SCCOL> getColumns() const;
+ const std::set<SCCOL>& getColumns() const;
};
class SC_DLLPUBLIC NumberTransformation : public DataTransformation
@@ -152,7 +152,7 @@ class SC_DLLPUBLIC NumberTransformation : public DataTransformation
virtual TransformationType getTransformationType() const override;
NUMBER_TRANSFORM_TYPE getNumberTransfromationType() const;
int getPrecision() const;
- std::set<SCCOL> getColumn() const;
+ const std::set<SCCOL>& getColumn() const;
};
class SC_DLLPUBLIC ReplaceNullTransformation : public DataTransformation
@@ -164,8 +164,8 @@ class SC_DLLPUBLIC ReplaceNullTransformation : public DataTransformation
ReplaceNullTransformation(const std::set<SCCOL>& nCol, const OUString& sReplaceWith);
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
- std::set<SCCOL> getColumn() const;
- OUString getReplaceString() const;
+ const std::set<SCCOL>& getColumn() const;
+ const OUString& getReplaceString() const;
};
class SC_DLLPUBLIC DateTimeTransformation : public DataTransformation
@@ -179,7 +179,7 @@ class SC_DLLPUBLIC DateTimeTransformation : public DataTransformation
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
DATETIME_TRANSFORMATION_TYPE getDateTimeTransfromationType() const;
- std::set<SCCOL> getColumn() const;
+ const std::set<SCCOL>& getColumn() const;
};
}
diff --git a/sdext/source/minimizer/unodialog.hxx b/sdext/source/minimizer/unodialog.hxx
index 0022932f2416..9d056f88d0fa 100644
--- a/sdext/source/minimizer/unodialog.hxx
+++ b/sdext/source/minimizer/unodialog.hxx
@@ -98,7 +98,7 @@ public:
void reschedule() const { mxReschedule->reschedule(); }
bool endStatus() const { return mbStatus; }
css::uno::Reference<css::awt::XControl> getControl(const OUString& rControlName) const { return mxDialog->getControl(rControlName); }
- css::uno::Reference<css::frame::XController> controller() const { return mxController; }
+ const css::uno::Reference<css::frame::XController>& controller() const { return mxController; }
void setPropertyValues(const css::uno::Sequence<OUString>& rNameSeq, const css::uno::Sequence<css::uno::Any>& rValueSeq)
{ mxDialogModelMultiPropertySet->setPropertyValues(rNameSeq, rValueSeq); }
diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx
index ae72c39f4886..737357505e5d 100644
--- a/sfx2/inc/SfxRedactionHelper.hxx
+++ b/sfx2/inc/SfxRedactionHelper.hxx
@@ -60,24 +60,24 @@ public:
* Returns the value of the given string param as an OUString
* Returns empty OUString if no param
* */
- static OUString getStringParam(const SfxRequest& rReq, const sal_uInt16& nParamId);
+ static OUString getStringParam(const SfxRequest& rReq, sal_uInt16 nParamId);
/*
* Creates metafiles from the pages of the given document,
* and pushes into the given vector.
* */
static void getPageMetaFilesFromDoc(std::vector<GDIMetaFile>& aMetaFiles,
- std::vector<::Size>& aPageSizes, const sal_Int32& nPages,
+ std::vector<::Size>& aPageSizes, sal_Int32 nPages,
DocumentToGraphicRenderer& aRenderer);
/*
* Creates one shape and one draw page for each gdimetafile,
* and inserts the shapes into the newly created draw pages.
* */
static void
- addPagesToDraw(uno::Reference<XComponent>& xComponent, const sal_Int32& nPages,
+ addPagesToDraw(uno::Reference<XComponent>& xComponent, sal_Int32 nPages,
const std::vector<GDIMetaFile>& aMetaFiles,
const std::vector<::Size>& aPageSizes, const PageMargins& aPageMargins,
const std::vector<std::pair<RedactionTarget*, OUString>>& r_aTableTargets,
- const bool& bIsAutoRedact);
+ bool bIsAutoRedact);
/*
* Makes the Redaction toolbar visible to the user.
* Meant to be called after converting a document to a Draw doc
diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index bb633b9a9bb1..9734f236de10 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -83,7 +83,7 @@ public:
OUString get_id(int nRow) const { return m_xControl->get_id(nRow); }
// Sync data on the targets box with the data on the target
- void setRowData(const int& nRowIndex, const RedactionTarget* pTarget);
+ void setRowData(int nRowIndex, const RedactionTarget* pTarget);
//void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xControl->connect_changed(rLink); }
//void connect_row_activated(const Link<weld::TreeView&, void>& rLink) { m_xControl->connect_row_activated(rLink); }
@@ -168,7 +168,7 @@ public:
SfxAddTargetDialog(weld::Window* pWindow, const OUString& rName);
SfxAddTargetDialog(weld::Window* pWindow, const OUString& sName,
const RedactionTargetType& eTargetType, const OUString& sContent,
- const bool& bCaseSensitive, const bool& bWholeWords);
+ bool bCaseSensitive, bool bWholeWords);
OUString getName() const { return m_xName->get_text(); }
RedactionTargetType getType() const;
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx b/sfx2/source/doc/SfxRedactionHelper.cxx
index efd06b14fccd..310c0374ca35 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -75,7 +75,7 @@ bool SfxRedactionHelper::isRedactMode(const SfxRequest& rReq)
return false;
}
-OUString SfxRedactionHelper::getStringParam(const SfxRequest& rReq, const sal_uInt16& nParamId)
+OUString SfxRedactionHelper::getStringParam(const SfxRequest& rReq, sal_uInt16 nParamId)
{
OUString sStringParam;
@@ -128,7 +128,7 @@ void setPageMargins(uno::Reference<beans::XPropertySet>& xPageProperySet,
// #i10613# Extracted from ImplCheckRect::ImplCreate
tools::Rectangle ImplCalcActionBounds(const MetaAction& rAct, const OutputDevice& rOut,
- const sal_Int32& nStrStartPos, const sal_Int32& nStrEndPos)
+ sal_Int32 nStrStartPos, sal_Int32 nStrEndPos)
{
tools::Rectangle aActionBounds;
@@ -185,8 +185,7 @@ tools::Rectangle ImplCalcActionBounds(const MetaAction& rAct, const OutputDevice
} // End of anon namespace
void SfxRedactionHelper::getPageMetaFilesFromDoc(std::vector<GDIMetaFile>& aMetaFiles,
- std::vector<::Size>& aPageSizes,
- const sal_Int32& nPages,
+ std::vector<::Size>& aPageSizes, sal_Int32 nPages,
DocumentToGraphicRenderer& aRenderer)
{
for (sal_Int32 nPage = 1; nPage <= nPages; ++nPage)
@@ -219,11 +218,10 @@ void SfxRedactionHelper::getPageMetaFilesFromDoc(std::vector<GDIMetaFile>& aMeta
}
void SfxRedactionHelper::addPagesToDraw(
- uno::Reference<XComponent>& xComponent, const sal_Int32& nPages,
+ uno::Reference<XComponent>& xComponent, sal_Int32 nPages,
const std::vector<GDIMetaFile>& aMetaFiles, const std::vector<::Size>& aPageSizes,
const PageMargins& aPageMargins,
- const std::vector<std::pair<RedactionTarget*, OUString>>& r_aTableTargets,
- const bool& bIsAutoRedact)
+ const std::vector<std::pair<RedactionTarget*, OUString>>& r_aTableTargets, bool bIsAutoRedact)
{
// Access the draw pages
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(xComponent, uno::UNO_QUERY);
diff --git a/sfx2/source/doc/autoredactdialog.cxx b/sfx2/source/doc/autoredactdialog.cxx
index 2a11a2a6e63a..cc0aa1456db8 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -182,7 +182,7 @@ OUString TargetsTable::GetNameProposal()
return sDefaultTargetName + " " + OUString::number(nHighestTargetId + 1);
}
-void TargetsTable::setRowData(const int& nRowIndex, const RedactionTarget* pTarget)
+void TargetsTable::setRowData(int nRowIndex, const RedactionTarget* pTarget)
{
OUString sContent = pTarget->sContent;
@@ -675,8 +675,8 @@ SfxAddTargetDialog::SfxAddTargetDialog(weld::Window* pParent, const OUString& rN
SfxAddTargetDialog::SfxAddTargetDialog(weld::Window* pParent, const OUString& sName,
const RedactionTargetType& eTargetType,
- const OUString& sContent, const bool& bCaseSensitive,
- const bool& bWholeWords)
+ const OUString& sContent, bool bCaseSensitive,
+ bool bWholeWords)
: GenericDialogController(pParent, "sfx/ui/addtargetdialog.ui", "AddTargetDialog")
, m_xName(m_xBuilder->weld_entry("name"))
, m_xType(m_xBuilder->weld_combo_box("type"))
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index 2cf3a33e482c..dbfb3734b8d8 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -133,7 +133,7 @@ public:
static const auto& categories() { return m_aCategories; }
static size_t categoriesSize() { return m_aCategoriesSize; }
- OString elementSetId() const { return msCurrentSetId; }
+ const OString& elementSetId() const { return msCurrentSetId; }
void setElementSetId(const char* pSetId);
void setVerticalMode(bool bVertical);
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 8ee61e42cb61..2562903c6244 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -229,7 +229,7 @@ struct ImplTabBarItem
return mbSelect || (pCurItem == this);
}
- OUString GetRenderText() const
+ OUString const & GetRenderText() const
{
return maText;
}
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 52401b486bc8..718213bafb2e 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -851,7 +851,7 @@ sal_Int32 SvxShowCharSet::getMaxCharCount() const
return mxFontCharMap->GetCharCount();
}
-FontCharMapRef SvxShowCharSet::GetFontCharMap()
+FontCharMapRef const & SvxShowCharSet::GetFontCharMap()
{
RecalculateFont(*mxVirDev);
return mxFontCharMap;
diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx
index 34e0b26c5495..421fdb64704d 100644
--- a/svx/source/stbctrls/zoomctrl.cxx
+++ b/svx/source/stbctrls/zoomctrl.cxx
@@ -49,7 +49,7 @@ public:
ZoomPopup_Impl( sal_uInt16 nZ, SvxZoomEnableFlags nValueSet );
sal_uInt16 GetZoom();
- OString GetCurItemIdent() const { return m_xMenu->GetCurItemIdent(); }
+ OString const & GetCurItemIdent() const { return m_xMenu->GetCurItemIdent(); }
sal_uInt16 Execute(vcl::Window* pWindow, const Point& rPopupPos)
{
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 929e0350ec22..c34c3a153307 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -805,7 +805,7 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::getTypes()
}
-uno::Sequence< uno::Type > SvxShape::_getTypes()
+uno::Sequence< uno::Type > const & SvxShape::_getTypes()
{
switch( mpImpl->mnObjId )
{
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 9a9ba06c13c1..171febb19bed 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -165,7 +165,7 @@ public:
SwAuthorityField(SwAuthorityFieldType* pType, SwAuthEntry* pAuthEntry);
virtual ~SwAuthorityField() override;
- OUString GetFieldText(ToxAuthorityField eField) const;
+ const OUString & GetFieldText(ToxAuthorityField eField) const;
virtual void SetPar1(const OUString& rStr) override;
virtual SwFieldType* ChgTyp( SwFieldType* ) override;
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 641cbdfba6fb..4120288ca268 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -252,7 +252,7 @@ public:
const SwRect& VisArea() const;
/// The visible area in the client (set by setClientVisibleArea).
- const tools::Rectangle getLOKVisibleArea() const { return maLOKVisibleArea; }
+ const tools::Rectangle & getLOKVisibleArea() const { return maLOKVisibleArea; }
void setLOKVisibleArea(const tools::Rectangle& rArea) { maLOKVisibleArea = rArea; }
// If necessary scroll until passed Rect is situated in visible sector.
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 7d86f12541a0..92557eadf4d0 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -542,7 +542,7 @@ std::unique_ptr<SwField> SwAuthorityField::Copy() const
return std::make_unique<SwAuthorityField>(pAuthType, m_xAuthEntry.get());
}
-OUString SwAuthorityField::GetFieldText(ToxAuthorityField eField) const
+const OUString & SwAuthorityField::GetFieldText(ToxAuthorityField eField) const
{
return m_xAuthEntry->GetAuthorField( eField );
}
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index e797f85818a3..1057b1b6411e 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -43,7 +43,7 @@ public:
m_pSerializer = std::move(pSerializer);
}
- sax_fastparser::FSHelperPtr getSerializer() const { return m_pSerializer; }
+ const sax_fastparser::FSHelperPtr& getSerializer() const { return m_pSerializer; }
SwDoc* getDoc() const { return m_pDoc; }
diff --git a/vcl/inc/image.h b/vcl/inc/image.h
index 455ea209ccb4..e37ada46ef15 100644
--- a/vcl/inc/image.h
+++ b/vcl/inc/image.h
@@ -51,9 +51,9 @@ public:
/// get size in co-ordinates not scaled for HiDPI
Size getSizePixel();
/// Legacy - the original bitmap
- BitmapEx getBitmapEx(bool bDisabled = false);
+ BitmapEx const & getBitmapEx(bool bDisabled = false);
/// Taking account of HiDPI scaling
- BitmapEx getBitmapExForHiDPI(bool bDisabled = false);
+ BitmapEx const & getBitmapExForHiDPI(bool bDisabled = false);
bool isEqual(const ImplImage &ref) const;
bool isSizeEmpty() const
diff --git a/vcl/inc/qt5/Qt5FontFace.hxx b/vcl/inc/qt5/Qt5FontFace.hxx
index 350abd593d6a..c427a85445c3 100644
--- a/vcl/inc/qt5/Qt5FontFace.hxx
+++ b/vcl/inc/qt5/Qt5FontFace.hxx
@@ -42,7 +42,7 @@ public:
int GetFontTable(const char pTagName[5], unsigned char*) const;
- const FontCharMapRef GetFontCharMap() const;
+ const FontCharMapRef& GetFontCharMap() const;
bool GetFontCapabilities(vcl::FontCapabilities& rFontCapabilities) const;
bool HasChar(sal_uInt32 cChar) const;
diff --git a/vcl/qt5/Qt5FontFace.cxx b/vcl/qt5/Qt5FontFace.cxx
index ec304603b2f1..a7837667f1dd 100644
--- a/vcl/qt5/Qt5FontFace.cxx
+++ b/vcl/qt5/Qt5FontFace.cxx
@@ -143,7 +143,7 @@ Qt5FontFace::CreateFontInstance(const FontSelectPattern& rFSD) const
return new Qt5Font(*this, rFSD);
}
-const FontCharMapRef Qt5FontFace::GetFontCharMap() const
+const FontCharMapRef& Qt5FontFace::GetFontCharMap() const
{
if (m_xCharMap.is())
return m_xCharMap;
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 9c91681d1817..125fd677fe0d 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -71,7 +71,7 @@ std::shared_ptr<WidgetDefinition> getWidgetDefinition(OUString const& rDefinitio
return std::shared_ptr<WidgetDefinition>();
}
-std::shared_ptr<WidgetDefinition> getWidgetDefinitionForTheme(OUString const& rThemenName)
+std::shared_ptr<WidgetDefinition> const& getWidgetDefinitionForTheme(OUString const& rThemenName)
{
static std::shared_ptr<WidgetDefinition> spDefinition;
if (!spDefinition)
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 7c019534ffe1..7cb35deed5c8 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -245,7 +245,7 @@ namespace
#define LF_FACESIZE 32
-void static lcl_error( SvStream& rIStm, const SvStreamEndian& nOldFormat, const sal_uLong& nPos)
+void static lcl_error( SvStream& rIStm, const SvStreamEndian& nOldFormat, sal_uLong nPos)
{
rIStm.SetError(SVSTREAM_FILEFORMAT_ERROR);
rIStm.SetEndian(nOldFormat);
diff --git a/vcl/source/image/ImplImage.cxx b/vcl/source/image/ImplImage.cxx
index 7605f88d9767..2658aac303b7 100644
--- a/vcl/source/image/ImplImage.cxx
+++ b/vcl/source/image/ImplImage.cxx
@@ -93,7 +93,7 @@ Size ImplImage::getSizePixel()
}
/// non-HiDPI compatibility method.
-BitmapEx ImplImage::getBitmapEx(bool bDisabled)
+BitmapEx const & ImplImage::getBitmapEx(bool bDisabled)
{
getSizePixel(); // force load, and at unity scale.
if (bDisabled)
@@ -123,7 +123,7 @@ bool ImplImage::isEqual(const ImplImage &ref) const
return maBitmapEx == ref.maBitmapEx;
}
-BitmapEx ImplImage::getBitmapExForHiDPI(bool bDisabled)
+BitmapEx const & ImplImage::getBitmapExForHiDPI(bool bDisabled)
{
if (isStock())
{ // check we have the right bitmap cached.
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index 8be0c6c0f114..665f61568109 100644
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -637,7 +637,7 @@ css::uno::Sequence<css::beans::PropertyValue> SettingsTable::GetDocumentProtecti
return m_pImpl->m_DocumentProtection.toSequence();
}
-OUString SettingsTable::GetCurrentDatabaseDataSource() const
+const OUString & SettingsTable::GetCurrentDatabaseDataSource() const
{
return m_pImpl->m_sCurrentDatabaseDataSource;
}
diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx
index 8e7136989b47..5fdcb97ac9ee 100644
--- a/writerfilter/source/dmapper/SettingsTable.hxx
+++ b/writerfilter/source/dmapper/SettingsTable.hxx
@@ -88,7 +88,7 @@ class SettingsTable : public LoggedProperties, public LoggedTable
sal_Int32 GetWordCompatibilityMode() const;
- OUString GetCurrentDatabaseDataSource() const;
+ const OUString & GetCurrentDatabaseDataSource() const;
private:
// Properties
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index bfd535949bf4..54b072768558 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1237,7 +1237,7 @@ const StyleSheetEntryPtr StyleSheetTable::FindDefaultParaStyle()
return FindStyleSheetByISTD( m_pImpl->m_sDefaultParaStyleName );
}
-const StyleSheetEntryPtr StyleSheetTable::GetCurrentEntry()
+const StyleSheetEntryPtr & StyleSheetTable::GetCurrentEntry()
{
return m_pImpl->m_pCurrentEntry;
}
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index 686779acbd71..da9987dce265 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -106,7 +106,7 @@ public:
/// Returns the default character properties.
PropertyMapPtr const & GetDefaultCharProps();
- const StyleSheetEntryPtr GetCurrentEntry();
+ const StyleSheetEntryPtr & GetCurrentEntry();
private:
// Properties
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index f7a263c2bc11..0c69cc9a4563 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -420,9 +420,9 @@ public:
}
void setPropName(const OUString& rPropName) { m_aPropName = rPropName; }
- OUString getPropName() const { return m_aPropName; }
+ OUString const& getPropName() const { return m_aPropName; }
void setPropType(const css::uno::Type& rPropType) { m_aPropType = rPropType; }
- css::uno::Type getPropType() const { return m_aPropType; }
+ css::uno::Type const& getPropType() const { return m_aPropType; }
void setTableRowWidthAfter(int nTableRowWidthAfter)
{
m_nTableRowWidthAfter = nTableRowWidthAfter;
diff --git a/writerperfect/source/writer/exp/xmlfmt.cxx b/writerperfect/source/writer/exp/xmlfmt.cxx
index db04adc1761d..20269949ebe9 100644
--- a/writerperfect/source/writer/exp/xmlfmt.cxx
+++ b/writerperfect/source/writer/exp/xmlfmt.cxx
@@ -108,7 +108,7 @@ public:
CreateChildContext(const OUString& rName,
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttribs) override;
- OUString GetName() const { return maName; }
+ OUString const& GetName() const { return maName; }
private:
OUString maName;
diff --git a/xmlsecurity/inc/documentsignaturemanager.hxx b/xmlsecurity/inc/documentsignaturemanager.hxx
index 2bbc5043f65b..1bf98ba5b8cf 100644
--- a/xmlsecurity/inc/documentsignaturemanager.hxx
+++ b/xmlsecurity/inc/documentsignaturemanager.hxx
@@ -125,7 +125,7 @@ public:
{
mxSignatureStream = xSignatureStream;
}
- css::uno::Reference<css::embed::XStorage> getStore() { return mxStore; }
+ const css::uno::Reference<css::embed::XStorage>& getStore() { return mxStore; }
DocumentSignatureMode getSignatureMode() const { return meSignatureMode; }
SignatureInformations& getCurrentSignatureInformations()
{