[Libreoffice-commits] core.git: xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 2 16:52:08 UTC 2020
xmloff/source/core/xmlimp.cxx | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
New commits:
commit a66e19a12f78882b053f8fa53ce1b6f1ce172d01
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Sep 2 16:15:54 2020 +0200
Commit: Noel Grandin <noel.grandin at 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.grandin at 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
More information about the Libreoffice-commits
mailing list