diff options
Diffstat (limited to 'sw/source/uibase/config/StoredChapterNumbering.cxx')
-rw-r--r-- | sw/source/uibase/config/StoredChapterNumbering.cxx | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx index 5deb102ac024..3f86ea101b75 100644 --- a/sw/source/uibase/config/StoredChapterNumbering.cxx +++ b/sw/source/uibase/config/StoredChapterNumbering.cxx @@ -289,7 +289,11 @@ public: name = aIter.toString(); else if (IsXMLToken(aIter.toString(), XML_DISPLAY_NAME)) displayName = aIter.toString(); + else + SAL_WARN("xmloff", "unknown value for style:family=" << aIter.toString()); } + else + SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString()); if (nFamily != XmlStyleFamily::DATA_STYLE && !name.isEmpty() && !displayName.isEmpty()) { @@ -336,27 +340,40 @@ public: } } - virtual css::uno::Reference<XFastContextHandler> SAL_CALL createFastChildContext( - sal_Int32 Element, - const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override + virtual SvXMLImportContextRef CreateChildContext( + sal_uInt16 nPrefix, + const OUString& rLocalName, + const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override { - if (Element == XML_ELEMENT(TEXT, XML_OUTLINE_STYLE)) + if (XML_NAMESPACE_TEXT == nPrefix && IsXMLToken(rLocalName, XML_OUTLINE_STYLE)) { ++m_nCounter; if (m_nCounter <= SwChapterNumRules::nMaxRules) { SvxXMLListStyleContext *const pContext( - new SvxXMLListStyleContext(GetImport(), Element, xAttrList, true)); + 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 + { + if (Element == XML_ELEMENT(TEXT, XML_OUTLINE_STYLE)) + { + // handled in CreateChildContext + } else if (Element == XML_ELEMENT(STYLE, XML_STYLE)) { return new StoredChapterNumberingDummyStyleContext(GetImport(), xAttrList); } - return SvXMLImportContext::createFastChildContext(Element, xAttrList); + return nullptr; } }; |