lotuswordpro/source/filter/lwpfootnote.cxx | 4 ++-- lotuswordpro/source/filter/lwpfootnote.hxx | 4 ++-- lotuswordpro/source/filter/lwpsilverbullet.hxx | 4 ++-- oox/source/export/drawingml.cxx | 4 ++-- oox/source/shape/WordprocessingCanvasContext.hxx | 2 +- package/inc/ZipPackage.hxx | 2 +- pyuno/source/module/pyuno_module.cxx | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-)
New commits: commit 33d4760998ccdb45dba13f0de9b6e599b38f2ba2 Author: Noel Grandin <[email protected]> AuthorDate: Thu Nov 7 11:09:04 2024 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Nov 7 13:17:27 2024 +0100 loplugin:passstuffbyref in lotuswordpro..pyuno Change-Id: I9cd7a98d74b1896951124740b66d873ca41cceae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176197 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/lotuswordpro/source/filter/lwpfootnote.cxx b/lotuswordpro/source/filter/lwpfootnote.cxx index 5bbfa0321faf..c413659cf6ff 100644 --- a/lotuswordpro/source/filter/lwpfootnote.cxx +++ b/lotuswordpro/source/filter/lwpfootnote.cxx @@ -522,7 +522,7 @@ void LwpFootnoteOptions::RegisterEndnoteStyle() /** * @descr Get continue on message */ -OUString LwpFootnoteOptions::GetContinuedOnMessage() const +const OUString& LwpFootnoteOptions::GetContinuedOnMessage() const { if (m_ContinuedOnMessage.HasValue()) { @@ -535,7 +535,7 @@ OUString LwpFootnoteOptions::GetContinuedOnMessage() const /** * @descr Get continue from message */ -OUString LwpFootnoteOptions::GetContinuedFromMessage() const +const OUString& LwpFootnoteOptions::GetContinuedFromMessage() const { if (m_ContinuedFromMessage.HasValue()) { diff --git a/lotuswordpro/source/filter/lwpfootnote.hxx b/lotuswordpro/source/filter/lwpfootnote.hxx index 80cba1d65641..823e647e6c52 100644 --- a/lotuswordpro/source/filter/lwpfootnote.hxx +++ b/lotuswordpro/source/filter/lwpfootnote.hxx @@ -269,8 +269,8 @@ public: LwpFootnoteSeparatorOptions& GetFootnoteSeparator(){ return m_FootnoteSeparator;} bool GetContinuedFrom() const { return ((m_nFlag & FO_CONTINUEFROM) != 0);} bool GetContinuedOn() const { return ((m_nFlag & FO_CONTINUEON) != 0);} - OUString GetContinuedOnMessage() const; - OUString GetContinuedFromMessage() const; + const OUString & GetContinuedOnMessage() const; + const OUString & GetContinuedFromMessage() const; void SetMasterPage(const OUString& strMasterPage){ m_strMasterPage = strMasterPage;} }; diff --git a/lotuswordpro/source/filter/lwpsilverbullet.hxx b/lotuswordpro/source/filter/lwpsilverbullet.hxx index 9482bb6ca010..0ca2a7fb3b56 100644 --- a/lotuswordpro/source/filter/lwpsilverbullet.hxx +++ b/lotuswordpro/source/filter/lwpsilverbullet.hxx @@ -105,9 +105,9 @@ public: OUString const& GetBulletChar() const; - static OUString GetPrefix() { return OUString(); } + static const OUString& GetPrefix() { return EMPTY_OUSTRING; } - static OUString GetSuffix() { return OUString(); } + static const OUString& GetSuffix() { return EMPTY_OUSTRING; } bool HasName(); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 4369aa225390..1dd13a22309e 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1546,10 +1546,10 @@ OUString GraphicExport::writeNewEntryToStorage(const Graphic& rGraphic, bool bRe namespace { -BitmapChecksum makeChecksumUniqueForSVG(BitmapChecksum const& rChecksum) +BitmapChecksum makeChecksumUniqueForSVG(BitmapChecksum aChecksum) { // need to modify the checksum so we know it's for SVG - just invert it - return ~rChecksum; + return ~aChecksum; } } // end anonymous namespace diff --git a/oox/source/shape/WordprocessingCanvasContext.hxx b/oox/source/shape/WordprocessingCanvasContext.hxx index d4cc67f6a9ba..ffc6a84aeed5 100644 --- a/oox/source/shape/WordprocessingCanvasContext.hxx +++ b/oox/source/shape/WordprocessingCanvasContext.hxx @@ -26,7 +26,7 @@ public: oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElementToken, const ::oox::AttributeList& rAttribs) override; - oox::drawingml::ShapePtr getShape() { return mpShapePtr; } + const oox::drawingml::ShapePtr& getShape() { return mpShapePtr; } const bool& isFullWPGSupport() const { return m_bFullWPGSupport; }; void setFullWPGSupport(bool bUse) { m_bFullWPGSupport = bUse; }; diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx index 293e0849a39e..d336e80ed7c9 100644 --- a/package/inc/ZipPackage.hxx +++ b/package/inc/ZipPackage.hxx @@ -128,7 +128,7 @@ public: sal_Int32 GetStartKeyGenID() const { return m_nStartKeyGenerationID; } sal_Int32 GetEncAlgID() const { return m_nCommonEncryptionID; } - ::std::optional<sal_Int32> GetChecksumAlgID() const { return m_oChecksumDigestID; } + const ::std::optional<sal_Int32> & GetChecksumAlgID() const { return m_oChecksumDigestID; } sal_Int32 GetDefaultDerivedKeySize() const { return ::GetDefaultDerivedKeySize(m_nCommonEncryptionID); } diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 216f4f5a663a..f7ed6ca617ab 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -197,7 +197,7 @@ void fillStruct( } } -OUString getLibDir(); +const OUString & getLibDir(); OUString getLibDirImpl() { OUString libDir; @@ -212,7 +212,7 @@ OUString getLibDirImpl() return libDir; } -OUString getLibDir() +const OUString & getLibDir() { static OUString sLibDir = getLibDirImpl(); return sLibDir;
