From 0b6aad2da3ef9c4c37fe141eb068e40d1ed4dfc0 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 31 Dec 2017 17:24:10 +0200 Subject: loplugin:passstuffbyref improved return in lotuswordpro Change-Id: I2e4103bb496ed3d0677d036e2f8cec76d001d682 Reviewed-on: https://gerrit.libreoffice.org/47222 Tested-by: Jenkins Reviewed-by: Noel Grandin --- lotuswordpro/inc/lwpfont.hxx | 2 +- lotuswordpro/source/filter/lwpcontent.hxx | 4 ++-- lotuswordpro/source/filter/lwpdivinfo.hxx | 4 ++-- lotuswordpro/source/filter/lwpfont.cxx | 2 +- lotuswordpro/source/filter/lwpfootnote.hxx | 4 ++-- lotuswordpro/source/filter/lwpmarker.cxx | 2 +- lotuswordpro/source/filter/lwpmarker.hxx | 4 ++-- lotuswordpro/source/filter/lwpnumericfmt.hxx | 4 ++-- lotuswordpro/source/filter/lwpsection.hxx | 2 +- lotuswordpro/source/filter/lwpsilverbullet.cxx | 2 +- lotuswordpro/source/filter/lwpsilverbullet.hxx | 2 +- lotuswordpro/source/filter/lwptblcell.hxx | 8 ++++---- lotuswordpro/source/filter/lwptoc.hxx | 2 +- 13 files changed, 21 insertions(+), 21 deletions(-) (limited to 'lotuswordpro') diff --git a/lotuswordpro/inc/lwpfont.hxx b/lotuswordpro/inc/lwpfont.hxx index c7b6c3f5484a..93fdce7fe882 100644 --- a/lotuswordpro/inc/lwpfont.hxx +++ b/lotuswordpro/inc/lwpfont.hxx @@ -80,7 +80,7 @@ public: LwpFontTableEntry(){} public: void Read(LwpObjectStream *pStrm); - OUString GetFaceName(); + OUString const & GetFaceName(); private: LwpAtomHolder m_WindowsFaceName; //font face name under windows LwpAtomHolder m_FaceName; //font face name diff --git a/lotuswordpro/source/filter/lwpcontent.hxx b/lotuswordpro/source/filter/lwpcontent.hxx index 4425af29a362..a9e15f05a89e 100644 --- a/lotuswordpro/source/filter/lwpcontent.hxx +++ b/lotuswordpro/source/filter/lwpcontent.hxx @@ -108,7 +108,7 @@ public: rtl::Reference GetLayout(LwpVirtualLayout const * pStartLayout); inline bool IsActive(); virtual bool IsTable(); - inline OUString GetClassName(); + inline OUString const & GetClassName(); inline LwpContent* GetNextEnumerated(); bool HasNonEmbeddedLayouts(); bool IsStyleContent(); @@ -129,7 +129,7 @@ inline bool LwpContent::IsTable() return false; } -inline OUString LwpContent::GetClassName() +inline OUString const & LwpContent::GetClassName() { return m_ClassName.str(); } diff --git a/lotuswordpro/source/filter/lwpdivinfo.hxx b/lotuswordpro/source/filter/lwpdivinfo.hxx index d7c7aac64b3f..86096f33afd3 100644 --- a/lotuswordpro/source/filter/lwpdivinfo.hxx +++ b/lotuswordpro/source/filter/lwpdivinfo.hxx @@ -76,9 +76,9 @@ public: LwpDivInfo(LwpObjectHeader const & objHdr, LwpSvStream* pStrm); LwpObjectID& GetInitialLayoutID() { return m_InitialLayoutID; } LwpObjectID& GetFillerPageTextID() { return m_FillerPageTextID; } - OUString GetDivName() { return m_Name.str(); } + OUString const & GetDivName() { return m_Name.str(); } - OUString GetClassName() { return m_ClassName.str(); } + OUString const & GetClassName() { return m_ClassName.str(); } inline bool HasContents(); inline bool IsOleDivision(); inline bool IsScrollable(); diff --git a/lotuswordpro/source/filter/lwpfont.cxx b/lotuswordpro/source/filter/lwpfont.cxx index d49ca0d6ea35..eee1f3eb8807 100644 --- a/lotuswordpro/source/filter/lwpfont.cxx +++ b/lotuswordpro/source/filter/lwpfont.cxx @@ -229,7 +229,7 @@ void LwpFontTableEntry::Read(LwpObjectStream *pStrm) RegisterFontDecl(); } -OUString LwpFontTableEntry::GetFaceName() +OUString const & LwpFontTableEntry::GetFaceName() { return m_WindowsFaceName.str(); } diff --git a/lotuswordpro/source/filter/lwpfootnote.hxx b/lotuswordpro/source/filter/lwpfootnote.hxx index 2abe1aae1e80..b2073e0c0b11 100644 --- a/lotuswordpro/source/filter/lwpfootnote.hxx +++ b/lotuswordpro/source/filter/lwpfootnote.hxx @@ -185,8 +185,8 @@ public: }; public: sal_uInt16 GetStartingNumber(){ return m_nStartingNumber;} - OUString GetLeadingText(){ return m_LeadingText.str();} - OUString GetTrailingText(){ return m_TrailingText.str();} + OUString const & GetLeadingText(){ return m_LeadingText.str();} + OUString const & GetTrailingText(){ return m_TrailingText.str();} sal_uInt16 GetReset(){ return static_cast(m_nFlag & RESET_MASK);} }; diff --git a/lotuswordpro/source/filter/lwpmarker.cxx b/lotuswordpro/source/filter/lwpmarker.cxx index 6ed37718db38..2c40821cc179 100644 --- a/lotuswordpro/source/filter/lwpmarker.cxx +++ b/lotuswordpro/source/filter/lwpmarker.cxx @@ -342,7 +342,7 @@ bool LwpBookMark::IsRightMarker(LwpObjectID objMarker) return objMarker == m_objMarker; } -OUString LwpBookMark::GetName() +OUString const & LwpBookMark::GetName() { return LwpDLNFVList::GetName().str(); } diff --git a/lotuswordpro/source/filter/lwpmarker.hxx b/lotuswordpro/source/filter/lwpmarker.hxx index cb01ed70b8eb..a2a03ca3634d 100644 --- a/lotuswordpro/source/filter/lwpmarker.hxx +++ b/lotuswordpro/source/filter/lwpmarker.hxx @@ -173,7 +173,7 @@ protected: void Read() override; public: bool IsRightMarker(LwpObjectID objMarker); - OUString GetName(); + OUString const & GetName(); private: enum { BKMK_NOTESFX = 0x0001, BKMK_OLDNOTESFX = 0x0002 @@ -194,7 +194,7 @@ public: bool IsDateTimeField(sal_uInt8& type,OUString& formula); bool IsCrossRefField(sal_uInt8& nType, OUString& sMarkName); bool IsDocPowerField(sal_uInt8& nType,OUString& sFormula); - OUString GetFormula(){return m_Formula.str();} + OUString const & GetFormula(){return m_Formula.str();} void SetStyleFlag(bool bFalg){m_bHasStyle = bFalg;} bool GetStyleFlag(){return m_bHasStyle;} bool GetStart(){return m_bHasStart;} diff --git a/lotuswordpro/source/filter/lwpnumericfmt.hxx b/lotuswordpro/source/filter/lwpnumericfmt.hxx index fb22a531cdb0..3be0851ce452 100644 --- a/lotuswordpro/source/filter/lwpnumericfmt.hxx +++ b/lotuswordpro/source/filter/lwpnumericfmt.hxx @@ -77,8 +77,8 @@ public: LwpNumericFormatSubset(); ~LwpNumericFormatSubset(); void QuickRead(LwpObjectStream* pStrm); - OUString GetPrefix(){ return cPrefix.str();} - OUString GetSuffix(){ return cSuffix.str();} + OUString const & GetPrefix(){ return cPrefix.str();} + OUString const & GetSuffix(){ return cSuffix.str();} bool IsDefaultPrefix(){ return !(cSubFlags&SF_OVER_PREFIX); } bool IsDefaultSuffix(){ return !(cSubFlags&SF_OVER_SUFFIX); } LwpColor GetColor(); diff --git a/lotuswordpro/source/filter/lwpsection.hxx b/lotuswordpro/source/filter/lwpsection.hxx index 0cbdfb0c2f87..73de821fab72 100644 --- a/lotuswordpro/source/filter/lwpsection.hxx +++ b/lotuswordpro/source/filter/lwpsection.hxx @@ -92,7 +92,7 @@ public: virtual ~LwpSection() override; inline LwpPageLayout* GetPageLayout(); void Parse(IXFStream* pOutputStream) override; - OUString GetSectionName(){return m_AtomHolder.str();} + OUString const & GetSectionName(){return m_AtomHolder.str();} protected: void Read() override; diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx index 63f5090f4afc..e5a762c0d0fb 100644 --- a/lotuswordpro/source/filter/lwpsilverbullet.cxx +++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx @@ -215,7 +215,7 @@ OUString LwpSilverBullet::GetBulletFontName() * @descr: * @return: An UChar32 bullet character. */ -OUString LwpSilverBullet::GetBulletChar() +OUString const & LwpSilverBullet::GetBulletChar() { return m_xBulletPara->GetBulletChar(); } diff --git a/lotuswordpro/source/filter/lwpsilverbullet.hxx b/lotuswordpro/source/filter/lwpsilverbullet.hxx index 111e5792872c..c86d387c6f63 100644 --- a/lotuswordpro/source/filter/lwpsilverbullet.hxx +++ b/lotuswordpro/source/filter/lwpsilverbullet.hxx @@ -104,7 +104,7 @@ public: const OUString& GetBulletStyleName() const; - OUString GetBulletChar(); + OUString const & GetBulletChar(); static OUString GetPrefix() { return OUString(); } diff --git a/lotuswordpro/source/filter/lwptblcell.hxx b/lotuswordpro/source/filter/lwptblcell.hxx index 61d4393b8f8e..b8e52ff75d17 100644 --- a/lotuswordpro/source/filter/lwptblcell.hxx +++ b/lotuswordpro/source/filter/lwptblcell.hxx @@ -82,7 +82,7 @@ public: LwpCellList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm); virtual void Parse(IXFStream* pOutputStream) override; - LwpObjectID GetNextID(){return GetNext();} + LwpObjectID const & GetNextID(){return GetNext();} sal_uInt8 GetColumnID(){return cColumn;} virtual void Convert(XFCell * pCell, LwpTableLayout* pCellsMap=nullptr); @@ -105,8 +105,8 @@ public: LwpRowList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm); void Parse(IXFStream* pOutputStream) override; - LwpObjectID GetChildHeadID(){return cChild.GetHead();} - LwpObjectID GetNextID(){return GetNext();} + LwpObjectID const & GetChildHeadID(){return cChild.GetHead();} + LwpObjectID const & GetNextID(){return GetNext();} sal_uInt16 GetRowID(){return cRowID;} private: void Read() override; @@ -181,7 +181,7 @@ public: LwpFolder(LwpObjectHeader const &objHdr, LwpSvStream* pStrm); void Parse(IXFStream* pOutputStream) override; - LwpObjectID GetChildHeadID(){ return cChild.GetHead();} + LwpObjectID const & GetChildHeadID(){ return cChild.GetHead();} private: void Read() override; virtual ~LwpFolder() override; diff --git a/lotuswordpro/source/filter/lwptoc.hxx b/lotuswordpro/source/filter/lwptoc.hxx index b6e5e67fd1f2..7e8b20403c65 100644 --- a/lotuswordpro/source/filter/lwptoc.hxx +++ b/lotuswordpro/source/filter/lwptoc.hxx @@ -149,7 +149,7 @@ public: virtual void XFConvert(XFContentContainer* pCont) override; sal_uInt16 GetLevel(){return m_nLevel;} bool GetUseText(){ return (m_nFlags & USETEXT) != 0;} - OUString GetSearchStyle(){return m_SearchName.str();} + OUString const & GetSearchStyle(){return m_SearchName.str();} bool GetUseLeadingText(){ return (m_nFlags & USENUMBER) != 0;} private: virtual ~LwpTocLevelData() override; -- cgit