[Libreoffice-commits] core.git: xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 19 12:00:13 UTC 2020
xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx | 26 +++++--------
xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx | 9 +---
2 files changed, 14 insertions(+), 21 deletions(-)
New commits:
commit daf71f32cbcee891d3b9b12029b8684e9fc4e1c6
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Wed Nov 18 20:22:50 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 19 12:59:37 2020 +0100
fastparser in SchXMLRegressionCurveObjectContext
Change-Id: If630576d7583031a56960d2ddc87c2d0e37aa8ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106074
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
index 5c339ad45945..e1ce5b48eb38 100644
--- a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
+++ b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
@@ -22,6 +22,7 @@
#include <SchXMLImport.hxx>
#include <sax/tools/converter.hxx>
+#include <sal/log.hxx>
#include <xmloff/namespacemap.hxx>
#include <xmloff/xmlnamespace.hxx>
@@ -85,31 +86,26 @@ void SchXMLRegressionCurveObjectContext::StartElement( const uno::Reference< xml
mrRegressionStyleVector.push_back( aStyle );
}
-SvXMLImportContextRef SchXMLRegressionCurveObjectContext::CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList >& /*xAttrList*/ )
+css::uno::Reference< css::xml::sax::XFastContextHandler > SchXMLRegressionCurveObjectContext::createFastChildContext(
+ sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
{
- SvXMLImportContextRef xContext;
-
- if( nPrefix == XML_NAMESPACE_CHART && IsXMLToken( rLocalName, XML_EQUATION ) )
+ if( nElement == XML_ELEMENT(CHART, XML_EQUATION) )
{
- xContext = new SchXMLEquationContext(
- mrImportHelper, GetImport(), nPrefix, rLocalName, maChartSize, mrRegressionStyleVector.back());
+ return new SchXMLEquationContext(
+ mrImportHelper, GetImport(), maChartSize, mrRegressionStyleVector.back());
}
-
- return xContext;
+ else
+ XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
+ return nullptr;
}
SchXMLEquationContext::SchXMLEquationContext(
SchXMLImportHelper& rImpHelper,
SvXMLImport& rImport,
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
const awt::Size& rChartSize,
RegressionStyle& rRegressionStyle ) :
-
- SvXMLImportContext( rImport, nPrefix, rLocalName ),
+ SvXMLImportContext( rImport ),
mrImportHelper( rImpHelper ),
mrRegressionStyle( rRegressionStyle ),
maChartSize( rChartSize )
diff --git a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx
index c9f13f4e53d6..138449327edf 100644
--- a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx
+++ b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx
@@ -40,10 +40,9 @@ public:
virtual ~SchXMLRegressionCurveObjectContext() override;
virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
- virtual SvXMLImportContextRef CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
+ virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
+ sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
private:
@@ -59,8 +58,6 @@ public:
SchXMLEquationContext(
SchXMLImportHelper& rImportHelper,
SvXMLImport& rImport,
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
const css::awt::Size & rChartSize,
RegressionStyle & rRegressionStyle );
More information about the Libreoffice-commits
mailing list