From 6a789e617ed07bfddc516c8fc0cf94cd6dfe7250 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 5 Oct 2019 13:32:10 +0200 Subject: 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 --- sw/source/uibase/config/cfgitems.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sw/source/uibase/config') diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index c07a0c84bbed..8846665ba6f9 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -212,8 +212,9 @@ SfxPoolItem* SwShadowCursorItem::Clone( SfxItemPool* ) const bool SwShadowCursorItem::operator==( const SfxPoolItem& rCmp ) const { - return IsOn() == static_cast(rCmp).IsOn() && - GetMode() == static_cast(rCmp).GetMode(); + return SfxPoolItem::operator==(rCmp) && + IsOn() == static_cast(rCmp).IsOn() && + GetMode() == static_cast(rCmp).GetMode(); } void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const -- cgit