diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-11-20 14:24:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-20 18:32:45 +0100 |
commit | c7b7153213619859d5f049b7c60eafa4c81f5225 (patch) | |
tree | 29e5327317998a2a4b38224bdaae6c0c812a7787 /xmloff | |
parent | 6d63302127be4f7ebc12369cde286d7e5114ad63 (diff) |
fastparser in SdXMLLayerContext
Change-Id: I1912d8d5a5f3ea6865d7425be8edb4f24b27e61f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/layerimp.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index e7af0c3f5499..73dab831ec49 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.cxx @@ -55,7 +55,9 @@ class SdXMLLayerContext : public SvXMLImportContext public: SdXMLLayerContext( SvXMLImport& rImport, const Reference< XFastAttributeList >& xAttrList, const Reference< XNameAccess >& xLayerManager ); - virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< 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 endFastElement(sal_Int32 nElement) override; private: @@ -94,16 +96,20 @@ SdXMLLayerContext::SdXMLLayerContext( SvXMLImport& rImport, const Reference< XFa } -SvXMLImportContextRef SdXMLLayerContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& ) +css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLLayerContext::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) { - if( (XML_NAMESPACE_SVG == nPrefix) && IsXMLToken(rLocalName, XML_TITLE) ) + if( nElement == XML_ELEMENT(SVG, XML_TITLE) ) { - return new XMLStringBufferImportContext( GetImport(), nPrefix, rLocalName, sTitleBuffer); + return new XMLStringBufferImportContext( GetImport(), sTitleBuffer); } - else if( (XML_NAMESPACE_SVG == nPrefix) && IsXMLToken(rLocalName, XML_DESC) ) + else if( nElement == XML_ELEMENT(SVG, XML_DESC) ) { - return new XMLStringBufferImportContext( GetImport(), nPrefix, rLocalName, sDescriptionBuffer); + return new XMLStringBufferImportContext( GetImport(), sDescriptionBuffer); } + else + XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement); return nullptr; } |