summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-11-15 13:04:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-15 21:08:34 +0100
commitf7bc285caf741eed0305a7c6e0a15e4a6b83ca6c (patch)
tree5c4e9c384eb7f9a3cbf2795a0e2239f410142f3e /xmloff
parent15377223043d4430ebf49eefe0f00a736908d02d (diff)
fastparser in XMLMacroFieldImportContext
Change-Id: Ib0bfda67558476c84c86fa9f4bd4b8f18f6c5c4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105896 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/txtfldi.hxx7
-rw-r--r--xmloff/source/text/txtfldi.cxx20
2 files changed, 11 insertions, 16 deletions
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index cedba840d6fc..f899be5d137a 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -833,10 +833,9 @@ public:
private:
/// for <office:events> children
- 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;
/// process attribute values
virtual void ProcessAttribute( sal_Int32 nAttrToken,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 1622e0280933..3c0be357b23a 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2449,24 +2449,20 @@ XMLMacroFieldImportContext::XMLMacroFieldImportContext(
{
}
-SvXMLImportContextRef XMLMacroFieldImportContext::CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const Reference<XAttributeList> & /*xAttrList*/ )
+css::uno::Reference< css::xml::sax::XFastContextHandler > XMLMacroFieldImportContext::createFastChildContext(
+ sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
{
- SvXMLImportContextRef xContext;
-
- if ( (nPrefix == XML_NAMESPACE_OFFICE) &&
- IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) )
+ if ( nElement == XML_ELEMENT(OFFICE, XML_EVENT_LISTENERS) )
{
// create events context and remember it!
- xEventContext = new XMLEventsImportContext(
- GetImport(), nPrefix, rLocalName );
+ xEventContext = new XMLEventsImportContext( GetImport() );
bValid = true;
- return xEventContext;
+ return xEventContext.get();
}
+ XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
- return xContext;
+ return nullptr;
}
void XMLMacroFieldImportContext::ProcessAttribute(