From f3b737ab76efaf1a70dfb22c6b60b08b340cf343 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Sat, 5 Jun 2021 21:30:30 +0200 Subject: 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 Reviewed-by: Armin Le Grand --- offapi/com/sun/star/frame/status/ItemState.idl | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'offapi') diff --git a/offapi/com/sun/star/frame/status/ItemState.idl b/offapi/com/sun/star/frame/status/ItemState.idl index 2b915be01705..e2de7538775a 100644 --- a/offapi/com/sun/star/frame/status/ItemState.idl +++ b/offapi/com/sun/star/frame/status/ItemState.idl @@ -41,6 +41,17 @@ constants ItemState const short DISABLED = 1; /** specifies that the property is currently read-only. + * + * Deprecated: There is no equivalent in SfxItemState + * anymore due to not being used, so remove for simplification + * reasons and to prepare rework of Item/ItemSet/ItemPool stuff. + * + * There are only three usages of ::ItemState in the code which + * all set the internal SfxItem to SfxVoidItem when triggered, + * which is equlivalent to state SfxItemState::DISABLED (see + * e.g. SfxItemSet::GetItemState), so READ_ONLY gets not used + * in internal handling, even when eventually existing UNO API + * usages hand it over the office. */ const short READ_ONLY = 2; -- cgit