Hi all, while testing the new SfxItemSets in cws new_itemsets I came across a few interesting uses of itemsets which I had considered to be illegal (but I might be wrong there). I assumed: - non-void items should only be put at the same which id in a set as the which id on the item itself. - void items should always have a which id of 0 and are allowed to be put anywhere.
Here are a few examples where these assumptions fail: Opening an empty writer document for examples fires the assertion at: http://hg.services.openoffice.org/cws/new_itemsets/file/5d3400d7452f/svl/inc/svl/itemset.hxx#l74 The backtrace shows the first call triggering this is coming in from SwDoc::GetTxtCollFromPool(..), followed by calls from SwFmt::SetFmtAttr(..). Is there any reason why a non-void, non-invalid item is put at a different which id in the set than the which id of the item itself? Sound like the road to perdition to me ... When typing in a number in a cell in calc the assertion at: http://hg.services.openoffice.org/cws/new_itemsets/file/5d3400d7452f/svl/source/items/itemset.cxx#l98 The backtrace shows the call triggering this is coming in from EditView::GetAttribs(..). Is there any reason why a void item should have a which id > 0 set? And if yes, what is the reason for using such semantics? E.g. how are a void item with which id 0 and a void item with which id > 0 differing in behaviour? Best Regards, Bjoern -- Bjoern Michaelsen mailto:bjoern.michael...@sun.com http://www.sun.de OpenOffice.org/StarOffice Writer Sun Microsystems GmbH Nagelsweg 55, 20097 Hamburg, Germany ----------------------------------------------------------------------- Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht München: HRB 161028 Geschäftsführer: Jürgen Kunz --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org