diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-05 21:03:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-06 16:22:25 +0200 |
commit | 635b1c1b64e2d022f2a41d5bd93b4f7b8b278bbb (patch) | |
tree | 73ec90a09bc6b7fc5b1b3e4f97d1eacac73ad96a /lotuswordpro | |
parent | 90580416dd96fc19f78057a14a1459f84eb50180 (diff) |
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.cxx | 7 |
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(); } |