summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-23 10:38:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-23 13:19:56 +0200
commit00aa9f622c29aecc6bb9c5ee4b3aa35a9afb095d (patch)
tree6b10baae17781ad810d0f7b7c08cc30945fa6246 /sc
parentb0730ff656848f005838b10bef0cf88f5ac0ba32 (diff)
Revert "used std::map in SfxItemSet"
This reverts commit 2757ee9fe610e253e4ccc37423fa420004d0f388. Besides causing a performance regression, I now notice that there is code in SW that relies on iterating over two different SfxItemSet's in parallel, and assumes that missing items are returned as nullptr, which is not the case for my std::map based change. Change-Id: I2b1110350fe4c4b74e5508558e9661ef1e1a103e
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/patattr.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index fd8c8f7f1dd4..133b9809eb33 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;
- SfxItemMap const & rItems1 = rSet1.GetItems_Impl(); // inline method of SfxItemSet
- SfxItemMap const & rItems2 = rSet2.GetItems_Impl();
+ SfxItemArray pItems1 = rSet1.GetItems_Impl(); // inline method of SfxItemSet
+ SfxItemArray pItems2 = rSet2.GetItems_Impl();
- return rItems1 == rItems2;
+ return ( 0 == memcmp( pItems1, pItems2, (ATTR_PATTERN_END - ATTR_PATTERN_START + 1) * sizeof(pItems1[0]) ) );
}
bool ScPatternAttr::operator==( const SfxPoolItem& rCmp ) const