diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-09 10:27:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-17 10:07:10 +0200 |
commit | 2757ee9fe610e253e4ccc37423fa420004d0f388 (patch) | |
tree | a5a505f12a1c17cfab2001c2cbf43bd721633f0f /sc | |
parent | ee2bd1ee97194f4d39d4d6ab95c9b926b5077cb8 (diff) |
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
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/patattr.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
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 |