summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-09 12:01:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-09 14:03:33 +0100
commitb8f932e1df1efb230230ab1f1b9c8cfc822a0f4c (patch)
tree2d0703a7eda1b49bc96d74829e75ddfc29b9deba /xmloff
parentfd6feb4f538b0c5c9061529ff002be9f62a7239a (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')
-rw-r--r--xmloff/source/text/XMLAutoTextContainerEventImport.cxx4
-rw-r--r--xmloff/source/text/XMLAutoTextContainerEventImport.hxx7
-rw-r--r--xmloff/source/text/XMLAutoTextEventImport.cxx17
-rw-r--r--xmloff/source/text/XMLAutoTextEventImport.hxx6
4 files changed, 15 insertions, 19 deletions
diff --git a/xmloff/source/text/XMLAutoTextContainerEventImport.cxx b/xmloff/source/text/XMLAutoTextContainerEventImport.cxx
index 39164f5960b7..657a7bdbe158 100644
--- a/xmloff/source/text/XMLAutoTextContainerEventImport.cxx
+++ b/xmloff/source/text/XMLAutoTextContainerEventImport.cxx
@@ -38,10 +38,8 @@ using ::xmloff::token::XML_EVENT_LISTENERS;
XMLAutoTextContainerEventImport::XMLAutoTextContainerEventImport(
SvXMLImport& rImport,
- sal_uInt16 nPrfx,
- const OUString& rLName,
const Reference<XNameReplace> & rEvnts ) :
- SvXMLImportContext(rImport, nPrfx, rLName),
+ SvXMLImportContext(rImport),
rEvents(rEvnts)
{
}
diff --git a/xmloff/source/text/XMLAutoTextContainerEventImport.hxx b/xmloff/source/text/XMLAutoTextContainerEventImport.hxx
index 4ddfecd301ff..69923aded3ba 100644
--- a/xmloff/source/text/XMLAutoTextContainerEventImport.hxx
+++ b/xmloff/source/text/XMLAutoTextContainerEventImport.hxx
@@ -44,8 +44,6 @@ public:
XMLAutoTextContainerEventImport(
SvXMLImport& rImport,
- sal_uInt16 nPrfx,
- const OUString& rLName,
const css::uno::Reference<css::container::XNameReplace > & rEvents );
virtual ~XMLAutoTextContainerEventImport() override;
@@ -53,6 +51,11 @@ public:
protected:
+ virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL
+ createFastChildContext(sal_Int32 /*nElement*/,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList > & /*rxAttribs*/) override
+ { return nullptr; }
+
virtual SvXMLImportContextRef CreateChildContext(
sal_uInt16 nPrefix,
const OUString& rLocalName,
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);
}
}
diff --git a/xmloff/source/text/XMLAutoTextEventImport.hxx b/xmloff/source/text/XMLAutoTextEventImport.hxx
index c5ad2fb1467c..bc612eaae234 100644
--- a/xmloff/source/text/XMLAutoTextEventImport.hxx
+++ b/xmloff/source/text/XMLAutoTextEventImport.hxx
@@ -52,10 +52,8 @@ public:
protected:
- virtual SvXMLImportContext* CreateDocumentContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;
+ virtual SvXMLImportContext *CreateFastContext( sal_Int32 Element,
+ const ::css::uno::Reference< ::css::xml::sax::XFastAttributeList >& xAttrList ) override;
};