xmloff/inc/txtfldi.hxx | 7 +++---- xmloff/source/text/txtfldi.cxx | 20 ++++++++------------ 2 files changed, 11 insertions(+), 16 deletions(-)
New commits: commit f7bc285caf741eed0305a7c6e0a15e4a6b83ca6c Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sun Nov 15 13:04:16 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Nov 15 21:08:34 2020 +0100 fastparser in XMLMacroFieldImportContext Change-Id: Ib0bfda67558476c84c86fa9f4bd4b8f18f6c5c4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105896 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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( _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits