sw/source/uibase/config/StoredChapterNumbering.cxx |   32 +++++++--------------
 1 file changed, 12 insertions(+), 20 deletions(-)

New commits:
commit db10942f021026e67ab146da1b625e534f58cf34
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Wed Aug 19 20:38:24 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Aug 20 10:52:05 2020 +0200

    use fastparser in StoredChapterNumberingRootContext
    
    Change-Id: I133f9885755ba594d8a136baa056f9ff96908a30
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101018
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx 
b/sw/source/uibase/config/StoredChapterNumbering.cxx
index 830b1d3da679..8a21b9f3ff2e 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -337,26 +337,6 @@ public:
         }
     }
 
-    virtual SvXMLImportContextRef CreateChildContext(
-            sal_uInt16 nPrefix,
-            const OUString& rLocalName,
-            const css::uno::Reference< css::xml::sax::XAttributeList >& 
xAttrList ) override
-    {
-        if (XML_NAMESPACE_TEXT == nPrefix && IsXMLToken(rLocalName, 
XML_OUTLINE_STYLE))
-        {
-            ++m_nCounter;
-            if (m_nCounter <= SwChapterNumRules::nMaxRules)
-            {
-                SvxXMLListStyleContext *const pContext(
-                    new SvxXMLListStyleContext(GetImport(),
-                                nPrefix, rLocalName, xAttrList, true));
-                m_Contexts.emplace_back(pContext);
-                return pContext;
-            }
-        }
-        return nullptr;
-    }
-
     virtual css::uno::Reference<XFastContextHandler> SAL_CALL 
createFastChildContext(
                 sal_Int32 Element,
                 const css::uno::Reference< css::xml::sax::XFastAttributeList > 
& xAttrList ) override
@@ -369,6 +349,18 @@ public:
         {
             return new StoredChapterNumberingDummyStyleContext(GetImport(), 
xAttrList);
         }
+        else if (Element == XML_ELEMENT(TEXT, XML_OUTLINE_STYLE))
+        {
+            ++m_nCounter;
+            if (m_nCounter <= SwChapterNumRules::nMaxRules)
+            {
+                SvxXMLListStyleContext *const pContext(
+                    new SvxXMLListStyleContext(GetImport(),
+                                Element, xAttrList, true));
+                m_Contexts.emplace_back(pContext);
+                return pContext;
+            }
+        }
 
         return nullptr;
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to