diff options
author | Armin Le Grand (Collabora) <Armin.Le.Grand@me.com> | 2020-02-13 15:40:34 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2020-02-13 22:43:44 +0100 |
commit | cfb9e6d9976fd7e87fc9605ca79264df041744ee (patch) | |
tree | 7eb41342ecece42ae7bad0eef047255a87b9c644 /cui | |
parent | 98bc216781d52af7242b671595ec88a9468d6704 (diff) |
Revert "Related tdf#130428: let's add some asserts"
This reverts commit 9811796aba7360fc5b7230a8b314a56fbf6ab27a.
Revert "tdf#130428 SfxItemState::UNKNOWN replacements"
This reverts commit cf4e87469baf13fb2766d0f2593fcc2b9b33bc9b.
Change-Id: I976ade5e25db09e18297e46a5c92f8bc578399e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88610
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/align.cxx | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 0488870a775e..30965cf9cb7f 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -393,14 +393,9 @@ namespace SfxItemState eState = pSet->GetItemState(nWhich); switch (eState) { - default: - // tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is (see below): - // SID_ATTR_ALIGN_STACKED - // SID_ATTR_ALIGN_ASIANVERTICAL - // SID_ATTR_ALIGN_LINEBREAK - // SID_ATTR_ALIGN_HYPHENATION - // SID_ATTR_ALIGN_SHRINKTOFIT - assert(false && "UNKNOWN cannot happen here"); + case SfxItemState::UNKNOWN: + rBtn.hide(); + rTriState.bTriStateEnabled = false; break; case SfxItemState::DISABLED: case SfxItemState::READONLY: @@ -438,9 +433,8 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) SfxItemState eState = pCoreAttrs->GetItemState(nWhich); switch (eState) { - default: - //tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_ALIGN_HOR_JUSTIFY: - assert(false && "UNKNOWN cannot happen here"); + case SfxItemState::UNKNOWN: + m_xLbHorAlign->hide(); break; case SfxItemState::DISABLED: case SfxItemState::READONLY: @@ -482,9 +476,9 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) eState = pCoreAttrs->GetItemState(nWhich); switch (eState) { - default: - //tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_ALIGN_INDENT: - assert(false && "UNKNOWN cannot happen here"); + case SfxItemState::UNKNOWN: + m_xEdIndent->hide(); + m_xFtIndent->hide(); break; case SfxItemState::DISABLED: case SfxItemState::READONLY: @@ -506,9 +500,9 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) eState = pCoreAttrs->GetItemState(nWhich); switch (eState) { - default: - //tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_ALIGN_VER_JUSTIFY: - assert(false && "UNKNOWN cannot happen here"); + case SfxItemState::UNKNOWN: + m_xLbVerAlign->hide(); + m_xFtVerAlign->hide(); break; case SfxItemState::DISABLED: case SfxItemState::READONLY: @@ -547,9 +541,9 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) eState = pCoreAttrs->GetItemState(nWhich); switch (eState) { - default: - //tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_ALIGN_DEGREES: - assert(false && "UNKNOWN cannot happen here"); + case SfxItemState::UNKNOWN: + m_xNfRotate->hide(); + m_xCtrlDialWin->hide(); break; case SfxItemState::DISABLED: case SfxItemState::READONLY: @@ -572,9 +566,8 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) eState = pCoreAttrs->GetItemState(nWhich); switch (eState) { - default: - //tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_ALIGN_LOCKPOS: - assert(false && "UNKNOWN cannot happen here"); + case SfxItemState::UNKNOWN: + m_xVsRefEdge->hide(); break; case SfxItemState::DISABLED: case SfxItemState::READONLY: @@ -612,9 +605,8 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) eState = pCoreAttrs->GetItemState(nWhich); switch (eState) { - default: - //tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_FRAMEDIRECTION: - assert(false && "UNKNOWN cannot happen here"); + case SfxItemState::UNKNOWN: + m_xLbFrameDir->hide(); break; case SfxItemState::DISABLED: case SfxItemState::READONLY: |