include/xmloff/XMLTextMasterStylesContext.hxx     |    7 -
 include/xmloff/xmlstyle.hxx                       |   21 ----
 sc/source/filter/xml/xmlstyli.cxx                 |    5 -
 sc/source/filter/xml/xmlstyli.hxx                 |    5 -
 xmloff/inc/XMLChartStyleContext.hxx               |    5 -
 xmloff/source/chart/XMLChartStyleContext.cxx      |    7 -
 xmloff/source/style/xmlstyle.cxx                  |   93 +---------------------
 xmloff/source/text/XMLTextMasterStylesContext.cxx |    9 --
 8 files changed, 15 insertions(+), 137 deletions(-)

New commits:
commit f7336500ba157c85c84e198f7043cf06ef627085
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Aug 25 16:35:49 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Aug 26 08:42:35 2020 +0200

    remove slowparser stuff from SvXMLStyleContext
    
    Change-Id: Ic4efc2eba7d1cdd71df76b535811c706bab3860e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101347
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/xmloff/XMLTextMasterStylesContext.hxx 
b/include/xmloff/XMLTextMasterStylesContext.hxx
index 59d769e9f643..1671ac01a2bc 100644
--- a/include/xmloff/XMLTextMasterStylesContext.hxx
+++ b/include/xmloff/XMLTextMasterStylesContext.hxx
@@ -27,16 +27,9 @@
 class XMLOFF_DLLPUBLIC XMLTextMasterStylesContext : public SvXMLStylesContext
 {
 protected:
-    using SvXMLStylesContext::CreateStyleChildContext;
     virtual SvXMLStyleContext *CreateStyleChildContext( sal_Int32 nElement,
         const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
xAttrList ) override;
 
-    using SvXMLStylesContext::CreateStyleStyleChildContext;
-    virtual SvXMLStyleContext *CreateStyleStyleChildContext( XmlStyleFamily 
nFamily,
-        sal_uInt16 nPrefix,
-        const OUString& rLocalName,
-        const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList 
) override;
-
     virtual bool InsertStyleFamily( XmlStyleFamily nFamily ) const override;
 
 public:
diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx
index 475fe6c8ec79..8ec4887bf364 100644
--- a/include/xmloff/xmlstyle.hxx
+++ b/include/xmloff/xmlstyle.hxx
@@ -187,27 +187,14 @@ protected:
     SvXMLStyleContext *GetStyle( sal_uInt32 i );
     const SvXMLStyleContext *GetStyle( sal_uInt32 i ) const;
 
-    virtual SvXMLStyleContext *CreateStyleChildContext( sal_uInt16 nPrefix,
-        const OUString& rLocalName,
-        const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList 
);
-
     virtual SvXMLStyleContext *CreateStyleChildContext(
         sal_Int32 nElement,
         const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList );
 
-    virtual SvXMLStyleContext *CreateStyleStyleChildContext( XmlStyleFamily 
nFamily,
-        sal_uInt16 nPrefix, const OUString& rLocalName,
-        const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList 
);
-
     virtual SvXMLStyleContext *CreateStyleStyleChildContext( XmlStyleFamily 
nFamily,
         sal_Int32 nElement,
         const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
xAttrList );
 
-    virtual SvXMLStyleContext *CreateDefaultStyleStyleChildContext(
-        XmlStyleFamily nFamily, sal_uInt16 nPrefix,
-        const OUString& rLocalName,
-        const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList 
);
-
     virtual SvXMLStyleContext *CreateDefaultStyleStyleChildContext(
         XmlStyleFamily nFamily, sal_Int32 nElement,
         const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
xAttrList );
@@ -228,14 +215,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;
 
-    // Create child element.
-    virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
-        const OUString& rLocalName,
-        const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList 
) override;
-
-    // Override this method to insert styles into the document.
-    virtual void EndElement() override;
-
     // This allows to add an SvXMLStyleContext to this context from extern
     void AddStyle(SvXMLStyleContext& rNew);
 
diff --git a/sc/source/filter/xml/xmlstyli.cxx 
b/sc/source/filter/xml/xmlstyli.cxx
index 3392a2b38258..80f9a207537e 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -928,9 +928,8 @@ SvXMLStyleContext 
*ScXMLMasterStylesContext::CreateStyleChildContext(
 
 SvXMLStyleContext *ScXMLMasterStylesContext::CreateStyleStyleChildContext(
         XmlStyleFamily /* nFamily */,
-        sal_uInt16 /* nPrefix */,
-        const OUString& /* rLocalName */,
-        const uno::Reference< XAttributeList > & /* xAttrList */ )
+        sal_Int32 /* nElement */,
+        const uno::Reference< XFastAttributeList > & /* xAttrList */ )
 {
     return nullptr;
 }
diff --git a/sc/source/filter/xml/xmlstyli.hxx 
b/sc/source/filter/xml/xmlstyli.hxx
index 895207439cd6..29010ad2b507 100644
--- a/sc/source/filter/xml/xmlstyli.hxx
+++ b/sc/source/filter/xml/xmlstyli.hxx
@@ -166,14 +166,13 @@ public:
 class ScXMLMasterStylesContext : public SvXMLStylesContext
 {
 protected:
-    using SvXMLStylesContext::CreateStyleChildContext;
     virtual SvXMLStyleContext *CreateStyleChildContext( sal_Int32 nElement,
         const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
xAttrList ) override;
 
     using SvXMLStylesContext::CreateStyleStyleChildContext;
     virtual SvXMLStyleContext *CreateStyleStyleChildContext( XmlStyleFamily 
nFamily,
-        sal_uInt16 nPrefix, const OUString& rLocalName,
-        const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList 
) override;
+        sal_Int32 nElement,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
xAttrList ) override;
 
     virtual bool InsertStyleFamily( XmlStyleFamily nFamily ) const override;
 
diff --git a/xmloff/inc/XMLChartStyleContext.hxx 
b/xmloff/inc/XMLChartStyleContext.hxx
index 3f4413392920..9da6900862f6 100644
--- a/xmloff/inc/XMLChartStyleContext.hxx
+++ b/xmloff/inc/XMLChartStyleContext.hxx
@@ -36,9 +36,8 @@ private:
 public:
 
     XMLChartStyleContext(
-        SvXMLImport& rImport, sal_uInt16 nPrfx,
-        const OUString& rLName,
-        const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList,
+        SvXMLImport& rImport, sal_Int32 nElement,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
xAttrList,
         SvXMLStylesContext& rStyles, XmlStyleFamily nFamily );
     virtual ~XMLChartStyleContext() override;
 
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx 
b/xmloff/source/chart/XMLChartStyleContext.cxx
index ffdd493a0126..fe4634664f5b 100644
--- a/xmloff/source/chart/XMLChartStyleContext.cxx
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -60,12 +60,11 @@ void XMLChartStyleContext::SetAttribute(
 }
 
 XMLChartStyleContext::XMLChartStyleContext(
-    SvXMLImport& rImport, sal_uInt16 nPrfx,
-    const OUString& rLName,
-    const uno::Reference< xml::sax::XAttributeList > & xAttrList,
+    SvXMLImport& rImport, sal_Int32 nElement,
+    const uno::Reference< xml::sax::XFastAttributeList > & xAttrList,
     SvXMLStylesContext& rStyles, XmlStyleFamily nFamily ) :
 
-        XMLShapeStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, 
nFamily ),
+        XMLShapeStyleContext( rImport, nElement, xAttrList, rStyles, nFamily ),
         mrStyles( rStyles )
 {}
 
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index f5a84198d7fb..0c4c708352a8 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -500,54 +500,9 @@ SvXMLStyleContext 
*SvXMLStylesContext::CreateStyleChildContext(
     return pStyle;
 }
 
-SvXMLStyleContext *SvXMLStylesContext::CreateStyleChildContext( sal_uInt16 
p_nPrefix,
-                                                                const 
OUString& rLocalName,
-                                                                const 
uno::Reference< xml::sax::XAttributeList > & xAttrList )
-{
-    SvXMLStyleContext *pStyle = nullptr;
-
-    if (!pStyle)
-    {
-        const SvXMLTokenMap& rTokenMap = GetStyleStylesElemTokenMap();
-        sal_uInt16 nToken = rTokenMap.Get( p_nPrefix, rLocalName );
-        switch( nToken )
-        {
-            case XML_TOK_STYLE_STYLE:
-            case XML_TOK_STYLE_DEFAULT_STYLE:
-            {
-                XmlStyleFamily nFamily = XmlStyleFamily::DATA_STYLE;
-                sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() 
: 0;
-                for( sal_Int16 i=0; i < nAttrCount; i++ )
-                {
-                    const OUString& rAttrName = xAttrList->getNameByIndex( i );
-                    OUString aLocalName;
-                    sal_uInt16 nPrefix =
-                        GetImport().GetNamespaceMap().GetKeyByAttrName( 
rAttrName,
-                                                                    
&aLocalName );
-                    if( XML_NAMESPACE_STYLE == nPrefix &&
-                        IsXMLToken( aLocalName, XML_FAMILY ) )
-                    {
-                        const OUString& rValue = xAttrList->getValueByIndex( i 
);
-                        nFamily = GetFamily( rValue );
-                        break;
-                    }
-                }
-                pStyle = XML_TOK_STYLE_STYLE==nToken
-                    ? CreateStyleStyleChildContext( nFamily, p_nPrefix,
-                                                    rLocalName, xAttrList )
-                    : CreateDefaultStyleStyleChildContext( nFamily, p_nPrefix,
-                                                    rLocalName, xAttrList );
-            }
-            break;
-        }
-    }
-
-    return pStyle;
-}
-
 SvXMLStyleContext *SvXMLStylesContext::CreateStyleStyleChildContext(
-        XmlStyleFamily nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
-        const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+        XmlStyleFamily nFamily, sal_Int32 nElement,
+        const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
 {
     SvXMLStyleContext *pStyle = nullptr;
 
@@ -556,23 +511,23 @@ SvXMLStyleContext 
*SvXMLStylesContext::CreateStyleStyleChildContext(
         case XmlStyleFamily::TEXT_PARAGRAPH:
         case XmlStyleFamily::TEXT_TEXT:
         case XmlStyleFamily::TEXT_SECTION:
-            pStyle = new XMLTextStyleContext( GetImport(), nPrefix, rLocalName,
+            pStyle = new XMLTextStyleContext( GetImport(), nElement,
                                               xAttrList, *this, nFamily );
             break;
 
         case XmlStyleFamily::TEXT_RUBY:
-            pStyle = new XMLPropStyleContext( GetImport(), nPrefix, rLocalName,
+            pStyle = new XMLPropStyleContext( GetImport(), nElement,
                                               xAttrList, *this, nFamily );
             break;
         case XmlStyleFamily::SCH_CHART_ID:
-            pStyle = new XMLChartStyleContext( GetImport(), nPrefix, 
rLocalName,
+            pStyle = new XMLChartStyleContext( GetImport(), nElement,
                                                xAttrList, *this, nFamily );
             break;
 
         case XmlStyleFamily::SD_GRAPHICS_ID:
         case XmlStyleFamily::SD_PRESENTATION_ID:
         case XmlStyleFamily::SD_POOL_ID:
-            pStyle = new XMLShapeStyleContext( GetImport(), nPrefix, 
rLocalName,
+            pStyle = new XMLShapeStyleContext( GetImport(), nElement,
                                                xAttrList, *this, nFamily );
             break;
         default: break;
@@ -581,20 +536,6 @@ SvXMLStyleContext 
*SvXMLStylesContext::CreateStyleStyleChildContext(
     return pStyle;
 }
 
-SvXMLStyleContext *SvXMLStylesContext::CreateStyleStyleChildContext(
-        XmlStyleFamily /*nFamily*/, sal_Int32 /*nElement*/,
-        const uno::Reference< xml::sax::XFastAttributeList > & /*xAttrList*/ )
-{
-    return nullptr;
-}
-
-SvXMLStyleContext *SvXMLStylesContext::CreateDefaultStyleStyleChildContext(
-        XmlStyleFamily /*nFamily*/, sal_uInt16 /*nPrefix*/, const OUString& 
/*rLocalName*/,
-        const uno::Reference< xml::sax::XAttributeList > & )
-{
-    return nullptr;
-}
-
 SvXMLStyleContext *SvXMLStylesContext::CreateDefaultStyleStyleChildContext(
         XmlStyleFamily /*nFamily*/, sal_Int32 /*nElement*/,
         const uno::Reference< xml::sax::XFastAttributeList > & )
@@ -867,28 +808,6 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > 
SvXMLStylesContext::cr
     return nullptr;
 }
 
-SvXMLImportContextRef SvXMLStylesContext::CreateChildContext( sal_uInt16 
nPrefix,
-                                                            const OUString& 
rLocalName,
-                                                            const 
uno::Reference< xml::sax::XAttributeList > & xAttrList )
-{
-    SvXMLImportContext *pContext = nullptr;
-
-    SvXMLStyleContext *pStyle =
-        CreateStyleChildContext( nPrefix, rLocalName, xAttrList );
-    if( pStyle )
-    {
-        if( !pStyle->IsTransient() )
-            mpImpl->AddStyle( pStyle );
-        pContext = pStyle;
-    }
-
-    return pContext;
-}
-
-void SvXMLStylesContext::EndElement()
-{
-}
-
 void SvXMLStylesContext::AddStyle(SvXMLStyleContext& rNew)
 {
     mpImpl->AddStyle( &rNew );
diff --git a/xmloff/source/text/XMLTextMasterStylesContext.cxx 
b/xmloff/source/text/XMLTextMasterStylesContext.cxx
index 46e7e83522e2..91e637b91b70 100644
--- a/xmloff/source/text/XMLTextMasterStylesContext.cxx
+++ b/xmloff/source/text/XMLTextMasterStylesContext.cxx
@@ -64,13 +64,4 @@ SvXMLStyleContext 
*XMLTextMasterStylesContext::CreateStyleChildContext(
     return pContext;
 }
 
-SvXMLStyleContext *XMLTextMasterStylesContext::CreateStyleStyleChildContext(
-        XmlStyleFamily /*nFamily*/,
-        sal_uInt16 /*nPrefix*/,
-        const OUString& /*rLocalName*/,
-        const Reference< XAttributeList > & /*xAttrList*/ )
-{
-    return nullptr;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to