summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-09-02 16:15:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-09-02 18:51:21 +0200
commita66e19a12f78882b053f8fa53ce1b6f1ce172d01 (patch)
tree5a627069935fc052a1f4f5cc7bacb7dd1e15e147 /xmloff
parent5c8920486ae894e25814a456f12b0f76a4cb6085 (diff)
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@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlimp.cxx24
1 files changed, 9 insertions, 15 deletions
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