From 2757ee9fe610e253e4ccc37423fa420004d0f388 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 9 Jan 2017 10:27:22 +0200 Subject: used std::map in SfxItemSet instead of naked array SfxItemIter ended up needing to take copies of stuff because various code likes to iterate over the items and delete items inside the loop. The gdb pretty printer is no longer quite as pretty as it was before, but it still prints useful info. Change-Id: I59b07ea42f6b1c74798a15402970b9dbd8233dbe --- sc/source/core/data/patattr.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sc') diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 133b9809eb33..fd8c8f7f1dd4 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -126,10 +126,10 @@ inline bool EqualPatternSets( const SfxItemSet& rSet1, const SfxItemSet& rSet2 ) if ( rSet1.Count() != rSet2.Count() ) return false; - SfxItemArray pItems1 = rSet1.GetItems_Impl(); // inline method of SfxItemSet - SfxItemArray pItems2 = rSet2.GetItems_Impl(); + SfxItemMap const & rItems1 = rSet1.GetItems_Impl(); // inline method of SfxItemSet + SfxItemMap const & rItems2 = rSet2.GetItems_Impl(); - return ( 0 == memcmp( pItems1, pItems2, (ATTR_PATTERN_END - ATTR_PATTERN_START + 1) * sizeof(pItems1[0]) ) ); + return rItems1 == rItems2; } bool ScPatternAttr::operator==( const SfxPoolItem& rCmp ) const -- cgit