diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-09 12:01:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-09 14:03:33 +0100 |
commit | b8f932e1df1efb230230ab1f1b9c8cfc822a0f4c (patch) | |
tree | 2d0703a7eda1b49bc96d74829e75ddfc29b9deba /xmloff/source/text/XMLAutoTextEventImport.cxx | |
parent | fd6feb4f538b0c5c9061529ff002be9f62a7239a (diff) |
convert XMLAutoTextEventImport to FastParser APIs
Change-Id: If0249a9987a42c700f994073bc649774ae84f510
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86477
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text/XMLAutoTextEventImport.cxx')
-rw-r--r-- | xmloff/source/text/XMLAutoTextEventImport.cxx | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx index 818f52ef4818..f12921c8a28e 100644 --- a/xmloff/source/text/XMLAutoTextEventImport.cxx +++ b/xmloff/source/text/XMLAutoTextEventImport.cxx @@ -19,7 +19,7 @@ #include "XMLAutoTextEventImport.hxx" #include <com/sun/star/uno/Reference.hxx> -#include <com/sun/star/xml/sax/XAttributeList.hpp> +#include <com/sun/star/xml/sax/XFastAttributeList.hpp> #include <com/sun/star/document/XEventsSupplier.hpp> #include <com/sun/star/uno/XInterface.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -84,20 +84,17 @@ void XMLAutoTextEventImport::initialize( } -SvXMLImportContext* XMLAutoTextEventImport::CreateDocumentContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList > & xAttrList ) +SvXMLImportContext* XMLAutoTextEventImport::CreateFastContext( + sal_Int32 nElement, + const Reference<css::xml::sax::XFastAttributeList> & xAttrList ) { - if ( xEvents.is() && (XML_NAMESPACE_OOO == nPrefix) && - IsXMLToken( rLocalName, XML_AUTO_TEXT_EVENTS) ) + if ( xEvents.is() && nElement == XML_ELEMENT(OOO, XML_AUTO_TEXT_EVENTS) ) { - return new XMLAutoTextContainerEventImport( - *this, nPrefix, rLocalName, xEvents); + return new XMLAutoTextContainerEventImport(*this, xEvents); } else { - return SvXMLImport::CreateDocumentContext(nPrefix, rLocalName, xAttrList); + return SvXMLImport::CreateFastContext(nElement, xAttrList); } } |