[Libreoffice-commits] core.git: xmloff/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 20 17:33:27 UTC 2020


 xmloff/source/draw/layerimp.cxx |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

New commits:
commit c7b7153213619859d5f049b7c60eafa4c81f5225
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Fri Nov 20 14:24:51 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Nov 20 18:32:45 2020 +0100

    fastparser in SdXMLLayerContext
    
    Change-Id: I1912d8d5a5f3ea6865d7425be8edb4f24b27e61f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106229
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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;
 }
 


More information about the Libreoffice-commits mailing list