summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-11-18 19:41:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-19 10:02:36 +0100
commit2cf83fe6051ba7e1b6cb66a4bd71a15f0bd0ad27 (patch)
treec2d217b87c7c76be1220ba2b3b7678c413740eab /xmloff
parentfecb0bbb7f7d899b8465c6e785c0a45496141b6e (diff)
fastparser in SchXMLParagraphContext
Change-Id: I612e888d364e31457aea8e66accdf1a2230ed870 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106071 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLParagraphContext.cxx24
-rw-r--r--xmloff/source/chart/SchXMLParagraphContext.hxx7
2 files changed, 14 insertions, 17 deletions
diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx
index 85c360d17d84..84e22c5a5c71 100644
--- a/xmloff/source/chart/SchXMLParagraphContext.cxx
+++ b/xmloff/source/chart/SchXMLParagraphContext.cxx
@@ -81,22 +81,20 @@ void SchXMLParagraphContext::endFastElement(sal_Int32 )
mrText = maBuffer.makeStringAndClear();
}
-SvXMLImportContextRef SchXMLParagraphContext::CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList >& )
+css::uno::Reference< css::xml::sax::XFastContextHandler > SchXMLParagraphContext::createFastChildContext(
+ sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
{
- if( nPrefix == XML_NAMESPACE_TEXT )
+ if( nElement == XML_ELEMENT(TEXT, XML_TAB_STOP) )
{
- if( rLocalName == ::xmloff::token::GetXMLToken( ::xmloff::token::XML_TAB_STOP ))
- {
- maBuffer.append( u'\x0009'); // tabulator
- }
- else if( rLocalName == ::xmloff::token::GetXMLToken( ::xmloff::token::XML_LINE_BREAK ))
- {
- maBuffer.append( u'\x000A'); // linefeed
- }
+ maBuffer.append( u'\x0009'); // tabulator
+ }
+ else if( nElement == XML_ELEMENT(TEXT, XML_LINE_BREAK) )
+ {
+ maBuffer.append( u'\x000A'); // linefeed
}
+ else
+ XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
return nullptr;
}
diff --git a/xmloff/source/chart/SchXMLParagraphContext.hxx b/xmloff/source/chart/SchXMLParagraphContext.hxx
index d9db36a916fc..9ae5d5a42264 100644
--- a/xmloff/source/chart/SchXMLParagraphContext.hxx
+++ b/xmloff/source/chart/SchXMLParagraphContext.hxx
@@ -46,10 +46,9 @@ public:
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
virtual void SAL_CALL characters( const OUString& rChars ) 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;
};
#endif // INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLPARAGRAPHCONTEXT_HXX