To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=88160





------- Additional comments from [EMAIL PROTECTED] Fri Apr 11 09:15:50 +0000 
2008 -------
I've had a quick look and I've found that there is a "state" of SfxPoolItem
sometimes referened to as SFX_ITEM_DONTCARE
(http://lxr.go-oo.org/ident?i=SFX_ITEM_DONTCARE) and checked via 
SfxPoolItem::IsInvalidItem:

http://lxr.go-oo.org/source/util/svtools/inc/svtools/poolitem.hxx#374

Item is invalidated with void SfxItemSet::InvalidateItem( USHORT nWhich ):

http://lxr.go-oo.org/source/util/svtools/source/items1/itemset.cxx#1456

This uses (SfxItemPtr *)-1 to "invalidate" the pointer.

There is also a very nice void SfxItemSet::InvalidateAllItems()

http://lxr.go-oo.org/source/util/svtools/source/items1/itemset.cxx#512

that just goes with plain "memset(..., -1,... )" all over.

More or less all methods cast -1 to a pointer (SfxItemPtr *).

Is the correct code (SfxItemPtr *)-1

if (pItem != (SfxItemPtr *)-1) {
  

but somehow I feel that

if (! pItem->IsInvalidItem()) {

would be much better.



---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to