[Libreoffice-commits] core.git: cui/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 5 08:09:34 UTC 2020
cui/source/tabpages/align.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 9811796aba7360fc5b7230a8b314a56fbf6ab27a
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Feb 5 07:34:16 2020 +0100
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Wed Feb 5 09:09:02 2020 +0100
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 at yahoo.fr>
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:
More information about the Libreoffice-commits
mailing list