[Libreoffice-commits] core.git: lotuswordpro/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jun 6 14:22:59 UTC 2020
lotuswordpro/source/filter/lwpoverride.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 635b1c1b64e2d022f2a41d5bd93b4f7b8b278bbb
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 5 21:03:28 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jun 6 16:22:25 2020 +0200
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 at redhat.com>
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();
}
More information about the Libreoffice-commits
mailing list