From 635b1c1b64e2d022f2a41d5bd93b4f7b8b278bbb Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 5 Jun 2020 21:03:28 +0100 Subject: ofz#23103 Invalid-enum-value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2fce04b14110c1da17611334e4912b4277efe389 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95623 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- lotuswordpro/source/filter/lwpoverride.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lotuswordpro') 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 #include #include "clone.hxx" @@ -311,7 +312,11 @@ void LwpAlignmentOverride::Read(LwpObjectStream * pStrm) if (pStrm->QuickReadBool()) { ReadCommon(pStrm); - m_nAlignType = static_cast(pStrm->QuickReaduInt8()); + sal_uInt8 nAlignType = pStrm->QuickReaduInt8(); + if (nAlignType <= ALIGN_SQUEEZE) + m_nAlignType = static_cast(nAlignType); + else + SAL_WARN("lwp", "unknown align type:" << nAlignType); m_nPosition = pStrm->QuickReaduInt32(); m_nAlignChar = pStrm->QuickReaduInt16(); } -- cgit