sw/inc/paratr.hxx              |    1 -
 sw/source/core/para/paratr.cxx |    7 -------
 2 files changed, 8 deletions(-)

New commits:
commit 9ab8f056c0a0ec0d3f7069bdf89823a4df1b60b9
Author:     Noel Grandin <[email protected]>
AuthorDate: Fri Feb 13 12:55:30 2026 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Feb 16 14:02:10 2026 +0100

    tdf#170595 no need to have SwNumRuleItem::operator==
    
    converting both sides of == to UIName and then comparing them,
    is equivalent to just comparing the underlying strings,
    so we can save ourselves some time here by skipping the creation
    of temporary UIName objects
    
    Change-Id: Ib04dae28e231665751bd3742d7b5c446a2ff6ccd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199450
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index d686f2fb86ef..125a0e079fbd 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -168,7 +168,6 @@ public:
     SwNumRuleItem(SwNumRuleItem const &) = default; // SfxPoolItem copy 
function dichotomy
 
     /// "pure virtual methods" of SfxPoolItem
-    virtual bool            operator==( const SfxPoolItem& ) const override;
     virtual SwNumRuleItem*  Clone( SfxItemPool *pPool = nullptr ) const 
override;
     // Marked as false since the SfxStringItem superclass supports hashing, but
     // this class has not been checked for safety under hashing yet.
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index e19a0c02b17a..f3165b715693 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -201,13 +201,6 @@ SwNumRuleItem* SwNumRuleItem::Clone( SfxItemPool * ) const
     return new SwNumRuleItem( *this );
 }
 
-bool SwNumRuleItem::operator==( const SfxPoolItem& rAttr ) const
-{
-    assert(SfxPoolItem::operator==(rAttr));
-
-    return GetValue() == static_cast<const SwNumRuleItem&>(rAttr).GetValue();
-}
-
 bool    SwNumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 ) const
 {
     ProgName sRet = SwStyleNameMapper::GetProgName(GetValue(), 
SwGetPoolIdFromName::NumRule );

Reply via email to