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 /editeng | |
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 'editeng')
-rw-r--r-- | editeng/source/uno/unotext.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 09351574a13e..68f3319d1b69 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -964,7 +964,6 @@ beans::PropertyState SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropert } break; - case SfxItemState::READONLY: case SfxItemState::SET: if( eItemState != SfxItemState::SET ) { @@ -1004,7 +1003,7 @@ beans::PropertyState SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropert case SfxItemState::DONTCARE: case SfxItemState::DISABLED: return beans::PropertyState_AMBIGUOUS_VALUE; - case SfxItemState::READONLY: +// case SfxItemState::READONLY: case SfxItemState::SET: return beans::PropertyState_DIRECT_VALUE; case SfxItemState::DEFAULT: @@ -1095,7 +1094,7 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf } break; - case SfxItemState::READONLY: +// case SfxItemState::READONLY: case SfxItemState::SET: if( eItemState != SfxItemState::SET ) { @@ -1131,7 +1130,7 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf switch( eItemState ) { - case SfxItemState::READONLY: +// case SfxItemState::READONLY: case SfxItemState::SET: rState = beans::PropertyState_DIRECT_VALUE; break; |