Kaydet (Commit) 0b6aad2d authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:passstuffbyref improved return in lotuswordpro

Change-Id: I2e4103bb496ed3d0677d036e2f8cec76d001d682
Reviewed-on: https://gerrit.libreoffice.org/47222Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 35b8b7bc
...@@ -131,7 +131,7 @@ namespace svt ...@@ -131,7 +131,7 @@ namespace svt
/** returns the URL of the content /** returns the URL of the content
*/ */
OUString getURL() const { return m_pContent ? m_pContent->getURL() : m_sURL; } OUString const & getURL() const { return m_pContent ? m_pContent->getURL() : m_sURL; }
/** (re)creates the content for the given URL /** (re)creates the content for the given URL
......
...@@ -80,7 +80,7 @@ public: ...@@ -80,7 +80,7 @@ public:
LwpFontTableEntry(){} LwpFontTableEntry(){}
public: public:
void Read(LwpObjectStream *pStrm); void Read(LwpObjectStream *pStrm);
OUString GetFaceName(); OUString const & GetFaceName();
private: private:
LwpAtomHolder m_WindowsFaceName; //font face name under windows LwpAtomHolder m_WindowsFaceName; //font face name under windows
LwpAtomHolder m_FaceName; //font face name LwpAtomHolder m_FaceName; //font face name
......
...@@ -108,7 +108,7 @@ public: ...@@ -108,7 +108,7 @@ public:
rtl::Reference<LwpVirtualLayout> GetLayout(LwpVirtualLayout const * pStartLayout); rtl::Reference<LwpVirtualLayout> GetLayout(LwpVirtualLayout const * pStartLayout);
inline bool IsActive(); inline bool IsActive();
virtual bool IsTable(); virtual bool IsTable();
inline OUString GetClassName(); inline OUString const & GetClassName();
inline LwpContent* GetNextEnumerated(); inline LwpContent* GetNextEnumerated();
bool HasNonEmbeddedLayouts(); bool HasNonEmbeddedLayouts();
bool IsStyleContent(); bool IsStyleContent();
...@@ -129,7 +129,7 @@ inline bool LwpContent::IsTable() ...@@ -129,7 +129,7 @@ inline bool LwpContent::IsTable()
return false; return false;
} }
inline OUString LwpContent::GetClassName() inline OUString const & LwpContent::GetClassName()
{ {
return m_ClassName.str(); return m_ClassName.str();
} }
......
...@@ -76,9 +76,9 @@ public: ...@@ -76,9 +76,9 @@ public:
LwpDivInfo(LwpObjectHeader const & objHdr, LwpSvStream* pStrm); LwpDivInfo(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
LwpObjectID& GetInitialLayoutID() { return m_InitialLayoutID; } LwpObjectID& GetInitialLayoutID() { return m_InitialLayoutID; }
LwpObjectID& GetFillerPageTextID() { return m_FillerPageTextID; } 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 HasContents();
inline bool IsOleDivision(); inline bool IsOleDivision();
inline bool IsScrollable(); inline bool IsScrollable();
......
...@@ -229,7 +229,7 @@ void LwpFontTableEntry::Read(LwpObjectStream *pStrm) ...@@ -229,7 +229,7 @@ void LwpFontTableEntry::Read(LwpObjectStream *pStrm)
RegisterFontDecl(); RegisterFontDecl();
} }
OUString LwpFontTableEntry::GetFaceName() OUString const & LwpFontTableEntry::GetFaceName()
{ {
return m_WindowsFaceName.str(); return m_WindowsFaceName.str();
} }
......
...@@ -185,8 +185,8 @@ public: ...@@ -185,8 +185,8 @@ public:
}; };
public: public:
sal_uInt16 GetStartingNumber(){ return m_nStartingNumber;} sal_uInt16 GetStartingNumber(){ return m_nStartingNumber;}
OUString GetLeadingText(){ return m_LeadingText.str();} OUString const & GetLeadingText(){ return m_LeadingText.str();}
OUString GetTrailingText(){ return m_TrailingText.str();} OUString const & GetTrailingText(){ return m_TrailingText.str();}
sal_uInt16 GetReset(){ return static_cast<sal_uInt16>(m_nFlag & RESET_MASK);} sal_uInt16 GetReset(){ return static_cast<sal_uInt16>(m_nFlag & RESET_MASK);}
}; };
......
...@@ -342,7 +342,7 @@ bool LwpBookMark::IsRightMarker(LwpObjectID objMarker) ...@@ -342,7 +342,7 @@ bool LwpBookMark::IsRightMarker(LwpObjectID objMarker)
return objMarker == m_objMarker; return objMarker == m_objMarker;
} }
OUString LwpBookMark::GetName() OUString const & LwpBookMark::GetName()
{ {
return LwpDLNFVList::GetName().str(); return LwpDLNFVList::GetName().str();
} }
......
...@@ -173,7 +173,7 @@ protected: ...@@ -173,7 +173,7 @@ protected:
void Read() override; void Read() override;
public: public:
bool IsRightMarker(LwpObjectID objMarker); bool IsRightMarker(LwpObjectID objMarker);
OUString GetName(); OUString const & GetName();
private: private:
enum { BKMK_NOTESFX = 0x0001, enum { BKMK_NOTESFX = 0x0001,
BKMK_OLDNOTESFX = 0x0002 BKMK_OLDNOTESFX = 0x0002
...@@ -194,7 +194,7 @@ public: ...@@ -194,7 +194,7 @@ public:
bool IsDateTimeField(sal_uInt8& type,OUString& formula); bool IsDateTimeField(sal_uInt8& type,OUString& formula);
bool IsCrossRefField(sal_uInt8& nType, OUString& sMarkName); bool IsCrossRefField(sal_uInt8& nType, OUString& sMarkName);
bool IsDocPowerField(sal_uInt8& nType,OUString& sFormula); 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;} void SetStyleFlag(bool bFalg){m_bHasStyle = bFalg;}
bool GetStyleFlag(){return m_bHasStyle;} bool GetStyleFlag(){return m_bHasStyle;}
bool GetStart(){return m_bHasStart;} bool GetStart(){return m_bHasStart;}
......
...@@ -77,8 +77,8 @@ public: ...@@ -77,8 +77,8 @@ public:
LwpNumericFormatSubset(); LwpNumericFormatSubset();
~LwpNumericFormatSubset(); ~LwpNumericFormatSubset();
void QuickRead(LwpObjectStream* pStrm); void QuickRead(LwpObjectStream* pStrm);
OUString GetPrefix(){ return cPrefix.str();} OUString const & GetPrefix(){ return cPrefix.str();}
OUString GetSuffix(){ return cSuffix.str();} OUString const & GetSuffix(){ return cSuffix.str();}
bool IsDefaultPrefix(){ return !(cSubFlags&SF_OVER_PREFIX); } bool IsDefaultPrefix(){ return !(cSubFlags&SF_OVER_PREFIX); }
bool IsDefaultSuffix(){ return !(cSubFlags&SF_OVER_SUFFIX); } bool IsDefaultSuffix(){ return !(cSubFlags&SF_OVER_SUFFIX); }
LwpColor GetColor(); LwpColor GetColor();
......
...@@ -92,7 +92,7 @@ public: ...@@ -92,7 +92,7 @@ public:
virtual ~LwpSection() override; virtual ~LwpSection() override;
inline LwpPageLayout* GetPageLayout(); inline LwpPageLayout* GetPageLayout();
void Parse(IXFStream* pOutputStream) override; void Parse(IXFStream* pOutputStream) override;
OUString GetSectionName(){return m_AtomHolder.str();} OUString const & GetSectionName(){return m_AtomHolder.str();}
protected: protected:
void Read() override; void Read() override;
......
...@@ -215,7 +215,7 @@ OUString LwpSilverBullet::GetBulletFontName() ...@@ -215,7 +215,7 @@ OUString LwpSilverBullet::GetBulletFontName()
* @descr: * @descr:
* @return: An UChar32 bullet character. * @return: An UChar32 bullet character.
*/ */
OUString LwpSilverBullet::GetBulletChar() OUString const & LwpSilverBullet::GetBulletChar()
{ {
return m_xBulletPara->GetBulletChar(); return m_xBulletPara->GetBulletChar();
} }
......
...@@ -104,7 +104,7 @@ public: ...@@ -104,7 +104,7 @@ public:
const OUString& GetBulletStyleName() const; const OUString& GetBulletStyleName() const;
OUString GetBulletChar(); OUString const & GetBulletChar();
static OUString GetPrefix() { return OUString(); } static OUString GetPrefix() { return OUString(); }
......
...@@ -82,7 +82,7 @@ public: ...@@ -82,7 +82,7 @@ public:
LwpCellList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm); LwpCellList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override; virtual void Parse(IXFStream* pOutputStream) override;
LwpObjectID GetNextID(){return GetNext();} LwpObjectID const & GetNextID(){return GetNext();}
sal_uInt8 GetColumnID(){return cColumn;} sal_uInt8 GetColumnID(){return cColumn;}
virtual void Convert(XFCell * pCell, LwpTableLayout* pCellsMap=nullptr); virtual void Convert(XFCell * pCell, LwpTableLayout* pCellsMap=nullptr);
...@@ -105,8 +105,8 @@ public: ...@@ -105,8 +105,8 @@ public:
LwpRowList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm); LwpRowList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
void Parse(IXFStream* pOutputStream) override; void Parse(IXFStream* pOutputStream) override;
LwpObjectID GetChildHeadID(){return cChild.GetHead();} LwpObjectID const & GetChildHeadID(){return cChild.GetHead();}
LwpObjectID GetNextID(){return GetNext();} LwpObjectID const & GetNextID(){return GetNext();}
sal_uInt16 GetRowID(){return cRowID;} sal_uInt16 GetRowID(){return cRowID;}
private: private:
void Read() override; void Read() override;
...@@ -181,7 +181,7 @@ public: ...@@ -181,7 +181,7 @@ public:
LwpFolder(LwpObjectHeader const &objHdr, LwpSvStream* pStrm); LwpFolder(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
void Parse(IXFStream* pOutputStream) override; void Parse(IXFStream* pOutputStream) override;
LwpObjectID GetChildHeadID(){ return cChild.GetHead();} LwpObjectID const & GetChildHeadID(){ return cChild.GetHead();}
private: private:
void Read() override; void Read() override;
virtual ~LwpFolder() override; virtual ~LwpFolder() override;
......
...@@ -149,7 +149,7 @@ public: ...@@ -149,7 +149,7 @@ public:
virtual void XFConvert(XFContentContainer* pCont) override; virtual void XFConvert(XFContentContainer* pCont) override;
sal_uInt16 GetLevel(){return m_nLevel;} sal_uInt16 GetLevel(){return m_nLevel;}
bool GetUseText(){ return (m_nFlags & USETEXT) != 0;} 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;} bool GetUseLeadingText(){ return (m_nFlags & USENUMBER) != 0;}
private: private:
virtual ~LwpTocLevelData() override; virtual ~LwpTocLevelData() override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment