summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-11-18 20:22:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-19 12:59:37 +0100
commitdaf71f32cbcee891d3b9b12029b8684e9fc4e1c6 (patch)
tree95e997cb3e5fa4d4b33d09d7427ccc745e936b24 /xmloff
parentef7abc0dc87e9820f80245ab0e8781bac358505f (diff)
fastparser in SchXMLRegressionCurveObjectContext
Change-Id: If630576d7583031a56960d2ddc87c2d0e37aa8ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx26
-rw-r--r--xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx9
2 files changed, 14 insertions, 21 deletions
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 );