diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-22 10:08:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-22 12:47:48 +0200 |
commit | fd56d5fd409c832886bf42a020322e69b6a35d9e (patch) | |
tree | 3a1f291a52023ba8a37cec5215a426687dbdbb5d /sw | |
parent | 76dd28afc9c0eb632a5dd20eb51704ee0bbc4b58 (diff) |
loplugin:unusedfields improvemements
treat fields touched in operator== as not being important, which
finds some more stuff (but also adds some false+)
Change-Id: I3f5d504d7dec7945a917afbcd58c92df74f03645
Reviewed-on: https://gerrit.libreoffice.org/62020
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/cellatr.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/attr/cellatr.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/envelp/labimg.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/labimg.hxx | 1 |
4 files changed, 4 insertions, 12 deletions
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx index c340ebb7783a..62a5716c3af0 100644 --- a/sw/inc/cellatr.hxx +++ b/sw/inc/cellatr.hxx @@ -34,10 +34,8 @@ constexpr sal_uInt32 getSwDefaultTextFormat() { return NF_STANDARD_FORMAT_TEXT; class SW_DLLPUBLIC SwTableBoxNumFormat : public SfxUInt32Item { - bool m_bAuto; ///< automatically given flag public: - SwTableBoxNumFormat( sal_uInt32 nFormat = getSwDefaultTextFormat(), - bool bAuto = false ); + SwTableBoxNumFormat( sal_uInt32 nFormat = getSwDefaultTextFormat() ); // "pure virtual methods" of SfxPoolItem virtual bool operator==( const SfxPoolItem& ) const override; @@ -46,7 +44,6 @@ public: SwTableBoxNumFormat& operator=( const SwTableBoxNumFormat& rAttr ) { SetValue( rAttr.GetValue() ); - m_bAuto = rAttr.m_bAuto; return *this; } }; diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 26958ececdde..0f76a1808990 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -37,24 +37,22 @@ // The advantage is that this is the pool's default item value and some places // benefit from this special treatment in that they don't have to handle/store // attribute specifics, especially when writing a document. -SwTableBoxNumFormat::SwTableBoxNumFormat( sal_uInt32 nFormat, bool bFlag ) +SwTableBoxNumFormat::SwTableBoxNumFormat( sal_uInt32 nFormat ) : SfxUInt32Item( RES_BOXATR_FORMAT, (((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == getSwDefaultTextFormat()) ? getSwDefaultTextFormat() : nFormat)) - , m_bAuto( bFlag ) { } bool SwTableBoxNumFormat::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); - return GetValue() == static_cast<const SwTableBoxNumFormat&>(rAttr).GetValue() && - m_bAuto == static_cast<const SwTableBoxNumFormat&>(rAttr).m_bAuto; + return GetValue() == static_cast<const SwTableBoxNumFormat&>(rAttr).GetValue(); } SfxPoolItem* SwTableBoxNumFormat::Clone( SfxItemPool* ) const { - return new SwTableBoxNumFormat( GetValue(), m_bAuto ); + return new SwTableBoxNumFormat( GetValue() ); } SwTableBoxFormula::SwTableBoxFormula( const OUString& rFormula ) diff --git a/sw/source/uibase/envelp/labimg.cxx b/sw/source/uibase/envelp/labimg.cxx index a89ea3dbdd46..7227172e9726 100644 --- a/sw/source/uibase/envelp/labimg.cxx +++ b/sw/source/uibase/envelp/labimg.cxx @@ -67,7 +67,6 @@ SwLabItem& SwLabItem::operator =(const SwLabItem& rItem) m_aType = rItem.m_aType; m_bPage = rItem.m_bPage; m_bSynchron = rItem.m_bSynchron; - m_aBin = rItem.m_aBin; m_nCol = rItem.m_nCol; m_nRow = rItem.m_nRow; m_lHDist = rItem.m_lHDist; @@ -125,7 +124,6 @@ bool SwLabItem::operator ==(const SfxPoolItem& rItem) const m_bCont == rLab.m_bCont && m_bPage == rLab.m_bPage && m_bSynchron == rLab.m_bSynchron && - m_aBin == rLab.m_aBin && m_nCol == rLab.m_nCol && m_nRow == rLab.m_nRow && m_lHDist == rLab.m_lHDist && diff --git a/sw/source/uibase/inc/labimg.hxx b/sw/source/uibase/inc/labimg.hxx index 941cb4e35847..a1c211dbcb5e 100644 --- a/sw/source/uibase/inc/labimg.hxx +++ b/sw/source/uibase/inc/labimg.hxx @@ -47,7 +47,6 @@ public: OUString m_aWriting; // label OUString m_aMake; // label mark OUString m_aType; // label type - OUString m_aBin; // printer shaft sal_Int32 m_lHDist; // horizontal distance (user) sal_Int32 m_lVDist; // vertical distance (user) sal_Int32 m_lWidth; // width (user) |