summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-02-05 07:34:16 +0100
committerJulien Nabet <serval2412@yahoo.fr>2020-02-05 09:09:02 +0100
commit9811796aba7360fc5b7230a8b314a56fbf6ab27a (patch)
tree54b4eb840b3a598f9a56ef0e195190867aee3bac
parent6d9d4f94e9c0a94bf88d006ba8b157b4cabaeebc (diff)
Related tdf#130428: let's add some asserts
to avoid potential future wrong code Change-Id: Ib5a10039ce95ed5d9bf6f5905bc58af5182d5c0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87995 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--cui/source/tabpages/align.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index c972313d9849..b015a93d819c 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -397,6 +397,7 @@ namespace
// SID_ATTR_ALIGN_LINEBREAK
// SID_ATTR_ALIGN_HYPHENATION
// SID_ATTR_ALIGN_SHRINKTOFIT
+ assert(false && "UNKNOWN cannot happen here");
break;
case SfxItemState::DISABLED:
case SfxItemState::READONLY:
@@ -436,6 +437,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
{
default:
//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_ALIGN_HOR_JUSTIFY:
+ assert(false && "UNKNOWN cannot happen here");
break;
case SfxItemState::DISABLED:
case SfxItemState::READONLY:
@@ -479,6 +481,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
{
default:
//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_ALIGN_INDENT:
+ assert(false && "UNKNOWN cannot happen here");
break;
case SfxItemState::DISABLED:
case SfxItemState::READONLY:
@@ -502,6 +505,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
{
default:
//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_ALIGN_VER_JUSTIFY:
+ assert(false && "UNKNOWN cannot happen here");
break;
case SfxItemState::DISABLED:
case SfxItemState::READONLY:
@@ -542,6 +546,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
{
default:
//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_ALIGN_DEGREES:
+ assert(false && "UNKNOWN cannot happen here");
break;
case SfxItemState::DISABLED:
case SfxItemState::READONLY:
@@ -566,6 +571,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
{
default:
//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_ALIGN_LOCKPOS:
+ assert(false && "UNKNOWN cannot happen here");
break;
case SfxItemState::DISABLED:
case SfxItemState::READONLY:
@@ -605,6 +611,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
{
default:
//tdf#130428 SfxItemState::UNKNOWN cannot happen here, see s_pRanges. Input is SID_ATTR_FRAMEDIRECTION:
+ assert(false && "UNKNOWN cannot happen here");
break;
case SfxItemState::DISABLED:
case SfxItemState::READONLY: