oox/source/core/contexthandler2.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit 976567aee323afd09629b6adf13537908f43d2a8 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Sep 12 06:54:14 2024 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Sep 12 10:09:36 2024 +0200 Simplify a bit Change-Id: Id46a5029ce86f20ffae34aa6495d7311044999a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173177 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/oox/source/core/contexthandler2.cxx b/oox/source/core/contexthandler2.cxx index af25fc95843e..5c4ab66987ab 100644 --- a/oox/source/core/contexthandler2.cxx +++ b/oox/source/core/contexthandler2.cxx @@ -230,17 +230,15 @@ bool ContextHandler2Helper::prepareMceContext( sal_Int32 nElement, const Attribu break; case MCE_TOKEN( Choice ): + if (!isMCEStateEmpty() && getMCEState() == MCE_STATE::Started) { - if (isMCEStateEmpty() || getMCEState() != MCE_STATE::Started) - return false; - - OUString aRequires = rAttribs.getString( XML_Requires, u"none"_ustr ); + OUString aRequires = rAttribs.getStringDefaulted(XML_Requires); // At this point we can't access namespaces as the correct xml filter // is long gone. For now let's decide depending on a list of supported // namespaces like we do in writerfilter - std::u16string_view aSupportedNS[] = + static constexpr std::u16string_view aSupportedNS[] = { // u"a14", // We do not currently support inline formulas and other a14 stuff u"p14", @@ -258,8 +256,9 @@ bool ContextHandler2Helper::prepareMceContext( sal_Int32 nElement, const Attribu } setMCEState( MCE_STATE::FoundChoice ) ; + break; } - break; + return false; case MCE_TOKEN( Fallback ): if( !isMCEStateEmpty() && getMCEState() == MCE_STATE::Started )