diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-11-04 21:43:54 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-11-04 21:48:04 +0100 |
commit | e6ea58e49ee079772e0a0796cdfb5151af316a6b (patch) | |
tree | 69057f5d20805f3579f068a06403a6262a1cf3a4 /lotuswordpro/source | |
parent | Make CppunitTest_sw_rtfimport use DECLARE_SW_IMPORT_TEST() (diff) | |
download | core-e6ea58e49ee079772e0a0796cdfb5151af316a6b.tar.gz core-e6ea58e49ee079772e0a0796cdfb5151af316a6b.zip |
cppcheck: fix '<type>::operator=' should return '<type> &'.
See http://nabble.documentfoundation.org/About-quot-assignment-operators-quot-cppcheck-warning-td4081208.html
Change-Id: Ie351058a30c5d2df5f5ec1327c575e129d022cd2
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r-- | lotuswordpro/source/filter/lwpmargins.hxx | 5 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpshadow.hxx | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lotuswordpro/source/filter/lwpmargins.hxx b/lotuswordpro/source/filter/lwpmargins.hxx index 3ceb52af22ae..bcd455df323c 100644 --- a/lotuswordpro/source/filter/lwpmargins.hxx +++ b/lotuswordpro/source/filter/lwpmargins.hxx @@ -78,7 +78,7 @@ public: m_nBottom = pStrm->QuickReadInt32(); pStrm->SkipExtra(); } - inline void operator = (const LwpMargins& rOther); + inline LwpMargins& operator = (const LwpMargins& rOther); inline double GetMarginsValue(const sal_uInt8& nWhichSide); private: sal_Int32 m_nLeft; @@ -87,12 +87,13 @@ private: sal_Int32 m_nBottom; }; -inline void LwpMargins::operator = (const LwpMargins& rOther) +inline LwpMargins& LwpMargins::operator = (const LwpMargins& rOther) { m_nLeft = rOther.m_nLeft; m_nTop = rOther.m_nTop; m_nRight = rOther.m_nRight; m_nBottom = rOther.m_nBottom; + return *this; } inline double LwpMargins::GetMarginsValue(const sal_uInt8& nWhichSide) diff --git a/lotuswordpro/source/filter/lwpshadow.hxx b/lotuswordpro/source/filter/lwpshadow.hxx index 98f7f2b92015..e064bbc4997b 100644 --- a/lotuswordpro/source/filter/lwpshadow.hxx +++ b/lotuswordpro/source/filter/lwpshadow.hxx @@ -83,7 +83,7 @@ public: LwpColor GetColor(); //add by , 01/26/2005 - inline void operator = (const LwpShadow& rOther); + inline LwpShadow& operator = (const LwpShadow& rOther); //end add private: @@ -108,11 +108,12 @@ inline LwpColor LwpShadow::GetColor() return m_aColor; } -inline void LwpShadow::operator = (const LwpShadow& rOther) +inline LwpShadow& LwpShadow::operator = (const LwpShadow& rOther) { m_aColor = rOther.m_aColor; m_nDirX = rOther.m_nDirX; m_nDirY = rOther.m_nDirY; + return *this; } #endif |