[Libreoffice-commits] core.git: sw/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 20 08:52:38 UTC 2020
sw/source/uibase/config/StoredChapterNumbering.cxx | 32 +++++++--------------
1 file changed, 12 insertions(+), 20 deletions(-)
New commits:
commit db10942f021026e67ab146da1b625e534f58cf34
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Wed Aug 19 20:38:24 2020 +0200
Commit: Noel Grandin <noel.grandin at 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.grandin at 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;
}
More information about the Libreoffice-commits
mailing list