xmloff/source/core/xmlimp.cxx | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-)
New commits: commit a66e19a12f78882b053f8fa53ce1b6f1ce172d01 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Sep 2 16:15:54 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Sep 2 18:51:21 2020 +0200 remove unnecessary checks in SvXMLImport if these if statements are false, something is badly wrong in the parsing code, and we should rather find out here Change-Id: I70aca6b6ceaa7af06b3a365fd3e056a5a03b6b66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 2505e2478d30..0a289c6e9fc5 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -932,25 +932,19 @@ void SAL_CALL SvXMLImport::startUnknownElement (const OUString & rPrefix, const void SAL_CALL SvXMLImport::endFastElement (sal_Int32 Element) { - if (!maFastContexts.empty()) - { - uno::Reference<XFastContextHandler> xContext = std::move(maFastContexts.top()); - maFastContexts.pop(); - isFastContext = true; - xContext->endFastElement( Element ); - if (isFastContext) - maContexts.pop(); - } + uno::Reference<XFastContextHandler> xContext = std::move(maFastContexts.top()); + maFastContexts.pop(); + isFastContext = true; + xContext->endFastElement( Element ); + if (isFastContext) + maContexts.pop(); } void SAL_CALL SvXMLImport::endUnknownElement (const OUString & rPrefix, const OUString & rLocalName) { - if (!maFastContexts.empty()) - { - uno::Reference<XFastContextHandler> xContext = std::move(maFastContexts.top()); - maFastContexts.pop(); - xContext->endUnknownElement( rPrefix, rLocalName ); - } + uno::Reference<XFastContextHandler> xContext = std::move(maFastContexts.top()); + maFastContexts.pop(); + xContext->endUnknownElement( rPrefix, rLocalName ); } uno::Reference< xml::sax::XFastContextHandler > SAL_CALL _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits