summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-08-19 20:38:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-20 10:52:05 +0200
commitdb10942f021026e67ab146da1b625e534f58cf34 (patch)
tree2e0d08afa8bbe52d638103481e0c109a0b2bb5d2
parentbf3124cdf61b40c94ba117a76f1b63dabdfd528e (diff)
use fastparser in StoredChapterNumberingRootContext
Change-Id: I133f9885755ba594d8a136baa056f9ff96908a30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/source/uibase/config/StoredChapterNumbering.cxx32
1 files changed, 12 insertions, 20 deletions
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;
}