diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-12-29 12:15:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-12-29 16:57:29 +0000 |
commit | f0ff9162950487f1e7ccc01e01160d60bf102488 (patch) | |
tree | 0ee7970391df23e18162859f17756ac047fa7217 /include | |
parent | b99464ef2ff58670aacee2fb5f0ea4398420ad47 (diff) |
cid#1518241 Improper use of negative value
and
cid#1518243 Improper use of negative value
cid#1518244 Improper use of negative value
Change-Id: I82de403d833d931703d52a368aa0b467abffa54b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144861
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/ColorSets.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/svx/ColorSets.hxx b/include/svx/ColorSets.hxx index 6b4504ebb877..47e1d8866e5d 100644 --- a/include/svx/ColorSets.hxx +++ b/include/svx/ColorSets.hxx @@ -15,6 +15,7 @@ #include <vector> #include <rtl/ustring.hxx> +#include <sal/log.hxx> #include <sal/types.h> #include <svx/svxdllapi.h> #include <tools/color.hxx> @@ -68,6 +69,11 @@ public: Color getColor(ThemeColorType nType) const { + if (nType == ThemeColorType::Unknown) + { + SAL_WARN("svx", "ColorSet::getColor with ThemeColorType::Unknown"); + return COL_AUTO; + } return maColors[size_t(nType)]; } |