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

Noel (via logerrit) logerrit at kemper.freedesktop.org
Sat Nov 28 06:47:20 UTC 2020


 xmloff/source/draw/ximpstyl.cxx |   23 +++++++----------------
 xmloff/source/draw/ximpstyl.hxx |    5 -----
 2 files changed, 7 insertions(+), 21 deletions(-)

New commits:
commit abdf72c6dc8e021de29459f129e39d6ff279c05c
Author:     Noel <noelgrandin at gmail.com>
AuthorDate: Fri Nov 27 15:03:56 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 28 07:46:35 2020 +0100

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

diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 8cf89f450484..3a25c4c65027 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -1307,7 +1307,11 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLMasterStylesConte
     sal_Int32 nElement,
     const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
-    if( nElement == XML_ELEMENT(STYLE, XML_MASTER_PAGE) )
+    if( nElement == XML_ELEMENT(DRAW, XML_LAYER_SET) )
+    {
+        return new SdXMLLayerSetContext( GetImport() );
+    }
+    else if( nElement == XML_ELEMENT(STYLE, XML_MASTER_PAGE) )
     {
         // style:masterpage inside office:styles context
         uno::Reference< drawing::XDrawPage > xNewMasterPage;
@@ -1357,24 +1361,11 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLMasterStylesConte
             }
         }
     }
+    else
+        XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
     return nullptr;
 }
 
-SvXMLImportContextRef SdXMLMasterStylesContext::CreateChildContext(
-    sal_uInt16 nPrefix,
-    const OUString& rLocalName,
-    const uno::Reference< xml::sax::XAttributeList >& /*xAttrList*/)
-{
-    SvXMLImportContextRef xContext;
-
-    if( (nPrefix == XML_NAMESPACE_DRAW) && IsXMLToken( rLocalName, XML_LAYER_SET ) )
-    {
-        xContext = new SdXMLLayerSetContext( GetImport() );
-    }
-
-    return xContext;
-}
-
 SdXMLHeaderFooterDeclContext::SdXMLHeaderFooterDeclContext(SvXMLImport& rImport,
     const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
     : SvXMLStyleContext( rImport )
diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx
index a7eee862783c..cebb2f93c3bf 100644
--- a/xmloff/source/draw/ximpstyl.hxx
+++ b/xmloff/source/draw/ximpstyl.hxx
@@ -224,11 +224,6 @@ public:
 
     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 SvXMLImportContextRef CreateChildContext(
-        sal_uInt16 nPrefix,
-        const OUString& rLocalName,
-        const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
 };
 
 // <pres:header-decl>, <pres:footer-decl> and <pres:date-time-decl>


More information about the Libreoffice-commits mailing list