tdf#164745 fix SfxStateCachemaster
commit6042e60d69c40d1f307710e60a278cb286d68603
authorArmin Le Grand (Collabora) <Armin.Le.Grand@me.com>
Wed, 5 Feb 2025 17:55:51 +0000 (5 18:55 +0100)
committerArmin Le Grand <Armin.Le.Grand@me.com>
Thu, 6 Feb 2025 18:09:23 +0000 (6 19:09 +0100)
treea4258730e14adfb7b5a9c9ff3f57f98c317c2148
parenta03edb923d88789c86b68f62e7cc58f89d94a863
tdf#164745 fix SfxStateCache

Seems I did too much with tdf#162666 by also trying to
remember invalid and disabled states in pLastItem, so
went over it again. Also corrected SetVisibleState to
also take action when disabled item.

Not urgently necessary, but stumbled over it: The items
used for INVALID_POOL_ITEM and DISABLED_POOL_ITEM were
based on the same class. Not a problem technically,
these are 'special' static items that represent a state,
but comparing them would have claimed these to be equal
what should not be the case. Thus I based each of these
on an own derivation of SfxPoolItem.

Change-Id: Ic9dd1a21772bb20b25ed8f7fa929da74edb79e42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181194
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
include/svl/poolitem.hxx
sfx2/source/control/statcach.cxx
svl/source/items/poolitem.cxx