Commits

Anonymous committed aa28dd3 Merge

CWS new_itemsets: merging minibranches

Comments (0)

Files changed (2)

sc/source/core/data/patattr.cxx

 	return ( pStr1 ? ( pStr2 ? ( *pStr1 == *pStr2 ) : FALSE ) : ( pStr2 ? FALSE : TRUE ) );
 }
 
-inline bool EqualPatternSets( const SfxItemSet& rSet1, const SfxItemSet& rSet2 )
-{
-    // #i62090# The SfxItemSet in the SfxSetItem base class always has the same ranges
-    // (single range from ATTR_PATTERN_START to ATTR_PATTERN_END), and the items are pooled,
-    // so it's enough to compare just the pointers (Count just because it's even faster).
-
-    //if ( rSet1.Count() != rSet2.Count() )
-    //    return false;
-
-    //SfxItemArray pItems1 = rSet1.GetItems_Impl();   // inline method of SfxItemSet
-    //SfxItemArray pItems2 = rSet2.GetItems_Impl();
-
-    //return ( 0 == memcmp( pItems1, pItems2, (ATTR_PATTERN_END - ATTR_PATTERN_START + 1) * sizeof(pItems1[0]) ) );
-    // FIXME
-    return rSet1 == rSet2;
-}
-
 int __EXPORT ScPatternAttr::operator==( const SfxPoolItem& rCmp ) const
 {
     // #i62090# Use quick comparison between ScPatternAttr's ItemSets
 
-    return ( EqualPatternSets( GetItemSet(), static_cast<const ScPatternAttr&>(rCmp).GetItemSet() ) &&
+    return ( GetItemSet().EqualWithSameRangeAllPooled(static_cast<const ScPatternAttr&>(rCmp).GetItemSet()) &&
              StrCmp( GetStyleName(), static_cast<const ScPatternAttr&>(rCmp).GetStyleName() ) );
 }
 

svl/inc/svl/itemset.hxx

File contents unchanged.