[Libreoffice-commits] core.git: cui/source
Armin Le Grand (Collabora) (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 13 21:44:22 UTC 2020
cui/source/tabpages/align.cxx | 44 +++++++++++++++++-------------------------
1 file changed, 18 insertions(+), 26 deletions(-)
New commits:
commit cfb9e6d9976fd7e87fc9605ca79264df041744ee
Author: Armin Le Grand (Collabora) <Armin.Le.Grand at me.com>
AuthorDate: Thu Feb 13 15:40:34 2020 +0100
Commit: Armin Le Grand <Armin.Le.Grand at me.com>
CommitDate: Thu Feb 13 22:43:44 2020 +0100
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 at me.com>
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:
More information about the Libreoffice-commits
mailing list