diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2019-10-05 13:32:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-06 11:58:50 +0200 |
commit | 6a789e617ed07bfddc516c8fc0cf94cd6dfe7250 (patch) | |
tree | 11d6097893a301ae65cf4668077134ac7510091a /include/editeng | |
parent | 070b3a848d6824ea154ae2d68fc7571feed60a5f (diff) |
improve SfxPoolItem operator== implementations
(*) make them all call the superclass operator==
(*) make the base class check which and typeid to ensure
we are only comparing the safe subclasses together
(*) remove a couple of operator== that were not doing
anything useful
Change-Id: Ia6234aed42df04157a5d6a323dc951916a9cb316
Reviewed-on: https://gerrit.libreoffice.org/80308
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/charrotateitem.hxx | 2 | ||||
-rw-r--r-- | include/editeng/paravertalignitem.hxx | 3 | ||||
-rw-r--r-- | include/editeng/writingmodeitem.hxx | 1 |
3 files changed, 0 insertions, 6 deletions
diff --git a/include/editeng/charrotateitem.hxx b/include/editeng/charrotateitem.hxx index efa62398cec3..2b3ab2fedc7d 100644 --- a/include/editeng/charrotateitem.hxx +++ b/include/editeng/charrotateitem.hxx @@ -47,8 +47,6 @@ public: virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override; virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override; - virtual bool operator==(const SfxPoolItem&) const override; - // our currently only degree values void SetTopToBottom() { SetValue(2700); } void SetBottomToTop() { SetValue(900); } diff --git a/include/editeng/paravertalignitem.hxx b/include/editeng/paravertalignitem.hxx index 4aa3865739e9..09cfb7124504 100644 --- a/include/editeng/paravertalignitem.hxx +++ b/include/editeng/paravertalignitem.hxx @@ -53,9 +53,6 @@ public: Align GetValue() const { return static_cast<Align>(SfxUInt16Item::GetValue()); } void SetValue(Align n) { SfxUInt16Item::SetValue(static_cast<sal_uInt16>(n)); } - - virtual bool operator==( const SfxPoolItem& ) const override; - }; #endif diff --git a/include/editeng/writingmodeitem.hxx b/include/editeng/writingmodeitem.hxx index 6bdf02fe6986..e7e670c4543e 100644 --- a/include/editeng/writingmodeitem.hxx +++ b/include/editeng/writingmodeitem.hxx @@ -38,7 +38,6 @@ public: SvxWritingModeItem & operator =(SvxWritingModeItem &&) = delete; // due to SfxUInt16Item virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; - virtual bool operator==( const SfxPoolItem& ) const override; css::text::WritingMode GetValue() const { return static_cast<css::text::WritingMode>(SfxUInt16Item::GetValue()); } virtual bool GetPresentation( SfxItemPresentation ePres, |