Re: [dev] SfxItemSet assumptions and assertions

2010-06-16 Thread Mathias Bauer
On 16.06.2010 11:07, Malte Timmermann wrote: We have const SfxPoolItem& Get() and const SfxPoolItem* GetItem(...) Not sure why we have two different Get Methods, but the first doesn't allow to return NULL, so I assume the second one would also have to return the same VoidItem for con

Re: [dev] SfxItemSet assumptions and assertions

2010-06-16 Thread Malte Timmermann
And now that I just read Bjoerns last mail wrt old/current behavior: At least for the EditEngine I am quite sure these items have been in some ItemPool, but never in an ItemSet. So that might be the reason why I never had an issue with that. Not sure what would happen with the VoidItems listed be

Re: [dev] SfxItemSet assumptions and assertions

2010-06-16 Thread Malte Timmermann
Mathias Bauer wrote, On 06/16/10 10:11: > On 15.06.2010 11:47, Björn Michaelsen wrote: > >> Well, the implementation in new_itemsets only checks for the which id >> being 0 and never checks for the type being an SfxVoidItem (outside >> assertions). So an disabled item is consistently defined as

Re: [dev] SfxItemSet assumptions and assertions

2010-06-16 Thread Mathias Bauer
On 15.06.2010 11:47, Björn Michaelsen wrote: Well, the implementation in new_itemsets only checks for the which id being 0 and never checks for the type being an SfxVoidItem (outside assertions). So an disabled item is consistently defined as any item returning an which id of 0 in the new itemse

Re: [dev] SfxItemSet assumptions and assertions

2010-06-15 Thread Björn Michaelsen
Am Tue, 15 Jun 2010 09:04:45 +0200 schrieb Mathias Bauer : > So this is code broken (the code in the ItemSet, not yours). I would argue that both code is broken, because as is the ItemSet has no well-defined contract to design against. Of course, Malte is no more guilty than anybody else as the on

Re: [dev] SfxItemSet assumptions and assertions

2010-06-15 Thread Mathias Bauer
On 14.06.2010 17:49, Malte Timmermann wrote: Björn Michaelsen wrote, On 06/14/10 16:09: Am Mon, 14 Jun 2010 15:11:57 +0200 schrieb Malte Timmermann: Hi Bjoern, Björn Michaelsen wrote, On 06/14/10 13:34: Hi all, while testing the new SfxItemSets in cws new_itemsets I came across a few inte

Re: [dev] SfxItemSet assumptions and assertions

2010-06-14 Thread Malte Timmermann
Björn Michaelsen wrote, On 06/14/10 16:09: > Am Mon, 14 Jun 2010 15:11:57 +0200 > schrieb Malte Timmermann : > >> Hi Bjoern, >> >> Björn Michaelsen wrote, On 06/14/10 13:34: >>> Hi all, >>> >>> while testing the new SfxItemSets in cws new_itemsets I came across >>> a few interesting uses of item

Re: [dev] SfxItemSet assumptions and assertions

2010-06-14 Thread Björn Michaelsen
Am Mon, 14 Jun 2010 15:11:57 +0200 schrieb Malte Timmermann : > Hi Bjoern, > > Björn Michaelsen wrote, On 06/14/10 13:34: > > 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

Re: [dev] SfxItemSet assumptions and assertions

2010-06-14 Thread Malte Timmermann
Hi Bjoern, Björn Michaelsen wrote, On 06/14/10 13:34: > 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

[dev] SfxItemSet assumptions and assertions

2010-06-14 Thread Björn Michaelsen
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. - voi