[Libreoffice-commits] core.git: sc/source xmloff/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Fri Dec 4 17:44:01 UTC 2020
sc/source/filter/xml/XMLTrackedChangesContext.cxx | 4 +---
sc/source/filter/xml/xmlannoi.cxx | 4 +---
xmloff/source/core/xmlictxt.cxx | 4 ++++
3 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit dad6155e2882e27b972845d458087d8ecbf5be43
Author: Noel <noelgrandin at gmail.com>
AuthorDate: Fri Dec 4 14:42:23 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Dec 4 18:43:18 2020 +0100
move some logic inside createFastChildContextFallback
Change-Id: I5e73b4b24e4782bb0740c0abd817b38b47c3e9c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107220
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 3467c1eb9c7f..74f0810831d8 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -693,9 +693,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLChangeTextPContext
{
if (!bWasContext)
pTextPContext->characters(sText.makeStringAndClear());
- xContext = pTextPContext->createFastChildContext(nElement, xAttrList);
- if (!xContext)
- xContext = pTextPContext->createFastChildContextFallback(nElement, xAttrList);
+ xContext = pTextPContext->createFastChildContextFallback(nElement, xAttrList);
}
}
diff --git a/sc/source/filter/xml/xmlannoi.cxx b/sc/source/filter/xml/xmlannoi.cxx
index b78d2cbccb48..d14fb587645c 100644
--- a/sc/source/filter/xml/xmlannoi.cxx
+++ b/sc/source/filter/xml/xmlannoi.cxx
@@ -126,9 +126,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > ScXMLAnnotationContext
if( pShapeContext )
{
- auto p = pShapeContext->createFastChildContext(nElement, xAttrList);
- if (!p)
- p = pShapeContext->createFastChildContextFallback(nElement, xAttrList);
+ auto p = pShapeContext->createFastChildContextFallback(nElement, xAttrList);
if (p)
return p;
}
diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx
index 0074ee886089..b41d847805f0 100644
--- a/xmloff/source/core/xmlictxt.cxx
+++ b/xmloff/source/core/xmlictxt.cxx
@@ -112,6 +112,10 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SvXMLImportContext::cre
css::uno::Reference< css::xml::sax::XFastContextHandler > SvXMLImportContext::createFastChildContextFallback(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
{
+ auto p = createFastChildContext(Element, Attribs);
+ if (p)
+ return p;
+
// fall back to slow-parser path
const OUString& rPrefix = SvXMLImport::getNamespacePrefixFromToken(Element, &mrImport.GetNamespaceMap());
const OUString& rLocalName = SvXMLImport::getNameFromToken( Element );
More information about the Libreoffice-commits
mailing list