summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-11-14 17:53:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-14 18:46:25 +0100
commit0d8191bf574751d8006344ae4db9ef1e4bf547f8 (patch)
tree87d27a3cfe8f7cbcdefec3c588b342bb8e65f60f /xmloff
parenteb2fdd9bc6696732fa472f6883993334898cef7a (diff)
use fastparser in XMLEmbeddedObjectImportContext
Change-Id: I57352475bb62c75cddc7f3eafc0e0fcca166953b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/XMLEmbeddedObjectImportContext.hxx6
-rw-r--r--xmloff/source/core/XMLEmbeddedObjectImportContext.cxx31
2 files changed, 16 insertions, 21 deletions
diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
index 7f2a739e07af..95942f2331c5 100644
--- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
+++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
@@ -44,9 +44,9 @@ public:
virtual ~XMLEmbeddedObjectImportContext() 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;
virtual void SAL_CALL startFastElement(
sal_Int32 nElement,
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index bfb182edaf3d..a8cc84392627 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -51,13 +51,12 @@ class XMLEmbeddedObjectImportContext_Impl : public SvXMLImportContext
public:
- XMLEmbeddedObjectImportContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrfx,
- const OUString& rLName,
+ XMLEmbeddedObjectImportContext_Impl( SvXMLImport& rImport,
const css::uno::Reference< css::xml::sax::XFastDocumentHandler >& rHandler );
- 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;
virtual void SAL_CALL startFastElement(
sal_Int32 nElement,
@@ -71,19 +70,17 @@ public:
}
XMLEmbeddedObjectImportContext_Impl::XMLEmbeddedObjectImportContext_Impl(
- SvXMLImport& rImport, sal_uInt16 nPrfx,
- const OUString& rLName,
+ SvXMLImport& rImport,
const Reference< XFastDocumentHandler >& rHandler ) :
- SvXMLImportContext( rImport, nPrfx, rLName ),
+ SvXMLImportContext( rImport ),
mxFastHandler( rHandler )
{
assert(mxFastHandler);
}
-SvXMLImportContextRef XMLEmbeddedObjectImportContext_Impl::CreateChildContext(
- sal_uInt16 /*nPrefix*/,
- const OUString& /*rLocalName*/,
- const Reference< XAttributeList >& )
+css::uno::Reference< css::xml::sax::XFastContextHandler > XMLEmbeddedObjectImportContext_Impl::createFastChildContext(
+ sal_Int32 ,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
{
// we carry no state, so just re-use the same instance
return this;
@@ -231,14 +228,12 @@ XMLEmbeddedObjectImportContext::~XMLEmbeddedObjectImportContext()
{
}
-SvXMLImportContextRef XMLEmbeddedObjectImportContext::CreateChildContext(
- sal_uInt16 nPrefix, const OUString& rLocalName,
- const Reference< XAttributeList >& )
+css::uno::Reference< css::xml::sax::XFastContextHandler > XMLEmbeddedObjectImportContext::createFastChildContext(
+ sal_Int32 ,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
{
if( mxFastHandler.is() )
- return new XMLEmbeddedObjectImportContext_Impl( GetImport(),
- nPrefix, rLocalName,
- mxFastHandler );
+ return new XMLEmbeddedObjectImportContext_Impl( GetImport(), mxFastHandler );
return nullptr;
}