summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/tabpages/align.cxx13
-rw-r--r--cui/source/tabpages/chardlg.cxx21
2 files changed, 17 insertions, 17 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 142a229f92eb..5ca1e49c8178 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -398,7 +398,6 @@ namespace
rTriState.bTriStateEnabled = false;
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
rBtn.set_sensitive(false);
rTriState.bTriStateEnabled = false;
break;
@@ -437,7 +436,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
m_xLbHorAlign->hide();
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_xLbHorAlign->set_sensitive(false);
break;
case SfxItemState::DONTCARE:
@@ -481,7 +480,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
m_xFtIndent->hide();
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_xEdIndent->set_sensitive(false);
break;
case SfxItemState::DONTCARE:
@@ -505,7 +504,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
m_xFtVerAlign->hide();
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_xLbVerAlign->set_sensitive(false);
break;
case SfxItemState::DONTCARE:
@@ -546,7 +545,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
m_xCtrlDialWin->hide();
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_xNfRotate->set_sensitive(false);
m_xCtrlDialWin->set_sensitive(false);
break;
@@ -570,7 +569,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
m_xVsRefEdge->hide();
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_xVsRefEdge->set_sensitive(false);
break;
case SfxItemState::DONTCARE:
@@ -609,7 +608,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
m_xLbFrameDir->hide();
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_xLbFrameDir->set_sensitive(false);
break;
case SfxItemState::DONTCARE:
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 5a40fed3fc00..9755bb7024af 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -770,7 +770,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
else
{
pSizeBox->set_active_or_entry_text(OUString());
- if ( eState <= SfxItemState::READONLY )
+ if ( eState <= SfxItemState::DISABLED )
{
pSizeBox->set_sensitive(false);
pSizeLabel->set_sensitive(false);
@@ -794,7 +794,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
pLangFT->set_sensitive(false);
pLangBox->set_sensitive(false);
break;
@@ -1521,7 +1521,7 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet )
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_xFontColorFT->set_sensitive(false);
m_xFontColorLB->set_sensitive(false);
break;
@@ -1806,7 +1806,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_aIndividualWordsState.bTriStateEnabled = false;
m_xIndividualWordsBtn->set_sensitive(false);
break;
@@ -1860,7 +1860,8 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
m_xEmphasisFT->hide();
m_xEmphasisLB->hide();
}
- else // SfxItemState::DISABLED or SfxItemState::READONLY
+// else // SfxItemState::DISABLED or SfxItemState::READONLY
+ else // SfxItemState::DISABLED
{
m_xEmphasisFT->set_sensitive(false);
m_xEmphasisLB->set_sensitive(false);
@@ -1884,7 +1885,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_xEffectsFT->set_sensitive(false);
m_xEffectsLB->set_sensitive(false);
break;
@@ -1914,7 +1915,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_xReliefFT->set_sensitive(false);
m_xReliefLB->set_sensitive(false);
break;
@@ -1944,7 +1945,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_aOutlineState.bTriStateEnabled = false;
m_xOutlineBtn->set_sensitive(false);
break;
@@ -1976,7 +1977,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_aShadowState.bTriStateEnabled = false;
m_xShadowBtn->set_sensitive(false);
break;
@@ -2008,7 +2009,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
break;
case SfxItemState::DISABLED:
- case SfxItemState::READONLY:
+// case SfxItemState::READONLY:
m_aHiddenState.bTriStateEnabled = false;
m_xHiddenBtn->set_sensitive(false);
break;