xmloff/source/forms/propertyimport.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit 58a41f2c62cbe871151ce45bb3838f9a000ffa36 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Sep 1 12:30:09 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun Sep 1 15:55:39 2024 +0200 drop [[fall-through]] and expand in the case Change-Id: I34f76a9cb54c0d7d05f029f8ddf4ccac23719668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172719 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 0c44b68c78cb..260560d4c5c8 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -117,7 +117,6 @@ Any PropertyConversion::convertString( const css::uno::Type& _rExpectedType, const OUString& _rReadCharacters, const SvXMLEnumMapEntry<sal_uInt16>* _pEnumMap, const bool _bInvertBoolean ) { Any aReturn; - bool bEnumAsInt = false; switch (_rExpectedType.getTypeClass()) { case TypeClass_BOOLEAN: // sal_Bool @@ -134,6 +133,7 @@ Any PropertyConversion::convertString( const css::uno::Type& _rExpectedType, break; case TypeClass_SHORT: // sal_Int16 case TypeClass_LONG: // sal_Int32 + { if (!_pEnumMap) { // it's a real int32/16 property sal_Int32 nValue(0); @@ -149,11 +149,12 @@ Any PropertyConversion::convertString( const css::uno::Type& _rExpectedType, aReturn <<= nValue; break; } - bEnumAsInt = true; - [[fallthrough]]; + aReturn = convertAsEnum(true, _rExpectedType, _rReadCharacters, _pEnumMap); + } + break; case TypeClass_ENUM: { - aReturn = convertAsEnum(bEnumAsInt, _rExpectedType, _rReadCharacters, _pEnumMap); + aReturn = convertAsEnum(false, _rExpectedType, _rReadCharacters, _pEnumMap); } break; case TypeClass_HYPER: