summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@me.com>2021-06-05 21:30:30 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2021-06-08 10:44:21 +0200
commitf3b737ab76efaf1a70dfb22c6b60b08b340cf343 (patch)
treee9ff1657de11943e164954b7f494ce6c276918d5 /offapi
parent8fee41f75c5da6c6e7df34a9b4f73ddf59944446 (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 'offapi')
-rw-r--r--offapi/com/sun/star/frame/status/ItemState.idl11
1 files changed, 11 insertions, 0 deletions
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;