diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-18 09:30:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-18 12:52:14 +0200 |
commit | 821ae763cc03f69e226cdba66bb9c82c03483a23 (patch) | |
tree | d9b7634df48409b9801c06ecf3d7086fd298c844 /vcl | |
parent | 62d11b0e072b2f34b9f52c33a73cbb54d8112307 (diff) |
ofz#37315: Invalid-enum-value
Change-Id: I573ecf0cd1bd7b71ebf77a503d9937ee9f9d867c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120627
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/svm/SvmReader.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index 431dd089acdd..55acc5bfd946 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -832,14 +832,14 @@ rtl::Reference<MetaAction> SvmReader::TextLineHandler() sal_uInt32 nTempUnderline(0); mrStream.ReadUInt32(nTempUnderline); - pAction->SetStrikeout(static_cast<FontStrikeout>(nTempStrikeout)); - pAction->SetUnderline(static_cast<FontLineStyle>(nTempUnderline)); + pAction->SetStrikeout(static_cast<FontStrikeout>(nTempStrikeout & SAL_MAX_ENUM)); + pAction->SetUnderline(static_cast<FontLineStyle>(nTempUnderline & SAL_MAX_ENUM)); if (aCompat.GetVersion() >= 2) { sal_uInt32 nTempOverline(0); mrStream.ReadUInt32(nTempOverline); - pAction->SetOverline(static_cast<FontLineStyle>(nTempOverline)); + pAction->SetOverline(static_cast<FontLineStyle>(nTempOverline & SAL_MAX_ENUM)); } return pAction; |