diff options
author | Armin Le Grand <Armin.Le.Grand@me.com> | 2021-06-05 21:30:30 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2021-06-08 10:44:21 +0200 |
commit | f3b737ab76efaf1a70dfb22c6b60b08b340cf343 (patch) | |
tree | e9ff1657de11943e164954b7f494ce6c276918d5 /sfx2 | |
parent | 8fee41f75c5da6c6e7df34a9b4f73ddf59944446 (diff) |
Remove SfxItemState::READONLY
As I experimented with redesigning the whole
Item/ItemSet/ItemPool paradigm, I alredy checked that
SfxItemState::READONLY is not used (and no one
really knows what it should do or stands for).
Since a removal of complexity is needed to get forward
with that redesign and I already made some experiences
in branch item_refactor2, I propose to remove this
state. It is not really used (gets never set).
It is mirrored/used in the UNO API in
css::frame::status::ItemState as 'READ_ONLY', but also
not used in the office's code. ItenmState itself is
used in three places, but all set the Item involved
by using a SfxVoidItem to state SfxItemState::DISABLED,
which I described in ItemState.idl. This means that
no state of READ_ONLY in UNO API is ever imported
to office code as DISABLED state at all, so not
used.
I also marked it as deprecated in the *.idl file.
I think - including the experimenting in the
mentioned branch - that this is safe for now. I
already run a full 'make check' on the changed stuff.
Change-Id: I8c15cf7b4f803076ecaaea67659f6e022ac7ef70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116752
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 2212494dc1d4..0ac302d49ce3 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -409,7 +409,7 @@ void SAL_CALL SfxToolBoxControl::statusChanged( const FeatureStateEvent& rEvent SfxItemState tmpState = static_cast<SfxItemState>(aItemStatus.State); // make sure no-one tries to send us a combination of states if (tmpState != SfxItemState::UNKNOWN && tmpState != SfxItemState::DISABLED && - tmpState != SfxItemState::READONLY && tmpState != SfxItemState::DONTCARE && + tmpState != SfxItemState::DONTCARE && tmpState != SfxItemState::DEFAULT && tmpState != SfxItemState::SET) throw css::uno::RuntimeException("unknown status"); eState = tmpState; |