summaryrefslogtreecommitdiffstats
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-06-05 21:03:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-06-06 16:22:25 +0200
commit635b1c1b64e2d022f2a41d5bd93b4f7b8b278bbb (patch)
tree73ec90a09bc6b7fc5b1b3e4f97d1eacac73ad96a /lotuswordpro
parenttdf#132618 Diagram gallery number fix (diff)
downloadcore-635b1c1b64e2d022f2a41d5bd93b4f7b8b278bbb.tar.gz
core-635b1c1b64e2d022f2a41d5bd93b4f7b8b278bbb.zip
ofz#23103 Invalid-enum-value
Change-Id: I2fce04b14110c1da17611334e4912b4277efe389 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95623 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpoverride.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpoverride.cxx b/lotuswordpro/source/filter/lwpoverride.cxx
index 677b3638f9f0..5201a2dc7be8 100644
--- a/lotuswordpro/source/filter/lwpoverride.cxx
+++ b/lotuswordpro/source/filter/lwpoverride.cxx
@@ -58,6 +58,7 @@
* For LWP filter architecture prototype
************************************************************************/
+#include <sal/log.hxx>
#include <memory>
#include "clone.hxx"
@@ -311,7 +312,11 @@ void LwpAlignmentOverride::Read(LwpObjectStream * pStrm)
if (pStrm->QuickReadBool())
{
ReadCommon(pStrm);
- m_nAlignType = static_cast<AlignType>(pStrm->QuickReaduInt8());
+ sal_uInt8 nAlignType = pStrm->QuickReaduInt8();
+ if (nAlignType <= ALIGN_SQUEEZE)
+ m_nAlignType = static_cast<AlignType>(nAlignType);
+ else
+ SAL_WARN("lwp", "unknown align type:" << nAlignType);
m_nPosition = pStrm->QuickReaduInt32();
m_nAlignChar = pStrm->QuickReaduInt16();
}