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





------- Additional comments from [email protected] Tue Oct 19 10:37:18 +0000 
2010 -------
while reviewing your commit i noticed that
there is one more thing that needs adapting (your FIXME comment was a hint):

this is from SfxItemPool::GetItem():
        if ( nOfst == SFX_ITEMS_STATICDEFAULT )
                return *(ppStaticDefaults + GetIndex_Impl(nWhich));

the constant SFX_ITEMS_STATICDEFAULT is compared with an index here;
the index is now a sal_uInt32.

WRONG IDEA (see below):
so the following constants also need to be 32 bit:

#define SFX_ITEMS_POOLDEFAULT               0xffff
#define SFX_ITEMS_STATICDEFAULT             0xfffe
#define SFX_ITEMS_DELETEONIDLE              0xfffd

and the nKind member of SfxPoolItem should be a sal_uInt32 (and the signatures
of GetKind()/SetKind() adapted).


no, wait, on second thought (with the help of opengrok)...
 this is not a good idea.
the _real_ problem here is that one of these values,
SFX_ITEMS_STATICDEFAULT, is used for 2 different things:
- as a Kind value of items
- as a index/surrogate in the item pool

these are _different_, and there really should be _different_ constants for 
them.

so, a better way would be to introduce a new 32-bit constant, maybe
SFX_ITEMS_DEFAULT, that should be used in the second case.

the places where this should be used are those where the constant
 is not used a s a Kind:
SfxItemPool::LoadSurrogate()
>       // dflt-Attribut?
>       if ( SFX_ITEMS_STATICDEFAULT == nSurrogat )

SfxItemPool::GetSurrogate()
>       // Pointer auf static- oder pool-dflt-Attribut?
>       if( IsStaticDefaultItem(pItem) || IsPoolDefaultItem(pItem) )
>               return SFX_ITEMS_STATICDEFAULT;

SfxItemPool::GetItem()
>       // dflt-Attribut?
>       if ( nOfst == SFX_ITEMS_STATICDEFAULT )

sc/source/ui/unoobj/defltuno.cxx:
> 380         const SfxPoolItem* pItem = pPool->GetItem( pEntry->nWID,
SFX_ITEMS_STATICDEFAULT );


Bartosz, please double-check this, and fix it  :)


---------------------------------------------------------------------
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