Commits

Anonymous committed 5d3400d

CWS new_itemsets: added assertion testing which ID of item

Comments (0)

Files changed (1)

svl/inc/svl/itemset.hxx

 
             void SetItem(SfxPoolItem* pItem, SfxItemPool* const io_pPool)
             {
+                OSL_ENSURE(IsInvalidItem(pItem) || pItem->ISA(SfxVoidItem) || pItem->Which() == m_nWhich,
+                    "<ItemEntry::SetItem(..)> - Which Id mismatch.");
                 if(IsInvalidItem(pItem) || IsStaticDefaultItem(pItem))
                     m_pItem = pItem;
                 else if(!pItem->Which())