diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-11-24 20:13:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-25 07:14:34 +0100 |
commit | 7ac81c6a1dc0ccd6ab62793f4787002da73b4d5b (patch) | |
tree | 785c73b7f455231bad0ab5d1c8a5d650c6cd97a0 | |
parent | caf72d1f20547a94e29c0943eb94fa52aec430a4 (diff) |
fastparser in TOC
Change-Id: Ia46d61e202292c957299e77e133c7f7a9f6eb0ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106547
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
22 files changed, 80 insertions, 139 deletions
diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx index 3c1725887fce..c5ad3ffe1c3a 100644 --- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx +++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx @@ -197,16 +197,13 @@ void XMLIndexAlphabeticalSourceContext::endFastElement(sal_Int32 nElement) XMLIndexSourceBaseContext::endFastElement(nElement); } -SvXMLImportContextRef XMLIndexAlphabeticalSourceContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList> & xAttrList ) +css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexAlphabeticalSourceContext::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { - if ( (XML_NAMESPACE_TEXT == nPrefix) && - IsXMLToken( rLocalName, XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE ) ) + if ( nElement == XML_ELEMENT(TEXT, XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE) ) { return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet, - nPrefix, rLocalName, aLevelNameAlphaMap, XML_OUTLINE_LEVEL, aLevelStylePropNameAlphaMap, @@ -214,8 +211,7 @@ SvXMLImportContextRef XMLIndexAlphabeticalSourceContext::CreateChildContext( } else { - return XMLIndexSourceBaseContext::CreateChildContext(nPrefix, - rLocalName, + return XMLIndexSourceBaseContext::createFastChildContext(nElement, xAttrList); } } diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx index bf903ab091c4..8f39f4c7788a 100644 --- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx +++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx @@ -70,10 +70,9 @@ protected: virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; - virtual SvXMLImportContextRef CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; #endif diff --git a/xmloff/source/text/XMLIndexBibliographySourceContext.cxx b/xmloff/source/text/XMLIndexBibliographySourceContext.cxx index 8434c6adccfa..3b3cab16ded2 100644 --- a/xmloff/source/text/XMLIndexBibliographySourceContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographySourceContext.cxx @@ -61,16 +61,13 @@ void XMLIndexBibliographySourceContext::endFastElement(sal_Int32 ) // No attributes, no properties. } -SvXMLImportContextRef XMLIndexBibliographySourceContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList> & xAttrList ) +css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexBibliographySourceContext::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { - if ( ( XML_NAMESPACE_TEXT == nPrefix ) && - ( IsXMLToken( rLocalName, XML_BIBLIOGRAPHY_ENTRY_TEMPLATE ) ) ) + if ( nElement == XML_ELEMENT(TEXT, XML_BIBLIOGRAPHY_ENTRY_TEMPLATE) ) { return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet, - nPrefix, rLocalName, aLevelNameBibliographyMap, XML_BIBLIOGRAPHY_TYPE, aLevelStylePropNameBibliographyMap, @@ -78,8 +75,7 @@ SvXMLImportContextRef XMLIndexBibliographySourceContext::CreateChildContext( } else { - return XMLIndexSourceBaseContext::CreateChildContext(nPrefix, - rLocalName, + return XMLIndexSourceBaseContext::createFastChildContext(nElement, xAttrList); } diff --git a/xmloff/source/text/XMLIndexBibliographySourceContext.hxx b/xmloff/source/text/XMLIndexBibliographySourceContext.hxx index 7d8f42f8d433..c6684c24e150 100644 --- a/xmloff/source/text/XMLIndexBibliographySourceContext.hxx +++ b/xmloff/source/text/XMLIndexBibliographySourceContext.hxx @@ -55,10 +55,9 @@ protected: virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; - virtual SvXMLImportContextRef CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; #endif diff --git a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx index 84cd6553add1..d4a9c3b23a90 100644 --- a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx +++ b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx @@ -48,16 +48,13 @@ XMLIndexIllustrationSourceContext::~XMLIndexIllustrationSourceContext() { } -SvXMLImportContextRef XMLIndexIllustrationSourceContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList> & xAttrList ) +css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexIllustrationSourceContext::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { - if ( ( XML_NAMESPACE_TEXT == nPrefix ) && - ( IsXMLToken( rLocalName, XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE ) ) ) + if ( nElement == XML_ELEMENT(TEXT, XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE) ) { return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet, - nPrefix, rLocalName, aLevelNameTableMap, XML_TOKEN_INVALID, // no outline-level attr aLevelStylePropNameTableMap, @@ -65,8 +62,7 @@ SvXMLImportContextRef XMLIndexIllustrationSourceContext::CreateChildContext( } else { - return XMLIndexSourceBaseContext::CreateChildContext(nPrefix, - rLocalName, + return XMLIndexSourceBaseContext::createFastChildContext(nElement, xAttrList); } diff --git a/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx b/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx index 8033bddf941a..e3d2ccd4f5b7 100644 --- a/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx +++ b/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx @@ -51,10 +51,9 @@ public: protected: - virtual SvXMLImportContextRef CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; #endif diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.cxx b/xmloff/source/text/XMLIndexObjectSourceContext.cxx index 7b9468ace7d7..8471e5994d08 100644 --- a/xmloff/source/text/XMLIndexObjectSourceContext.cxx +++ b/xmloff/source/text/XMLIndexObjectSourceContext.cxx @@ -121,16 +121,13 @@ void XMLIndexObjectSourceContext::endFastElement(sal_Int32 nElement) XMLIndexSourceBaseContext::endFastElement(nElement); } -SvXMLImportContextRef XMLIndexObjectSourceContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList> & xAttrList ) +css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexObjectSourceContext::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { - if ( (XML_NAMESPACE_TEXT == nPrefix) && - (IsXMLToken(rLocalName, XML_OBJECT_INDEX_ENTRY_TEMPLATE)) ) + if ( nElement == XML_ELEMENT(TEXT, XML_OBJECT_INDEX_ENTRY_TEMPLATE) ) { return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet, - nPrefix, rLocalName, aLevelNameTableMap, XML_TOKEN_INVALID, // no outline-level attr aLevelStylePropNameTableMap, @@ -138,8 +135,7 @@ SvXMLImportContextRef XMLIndexObjectSourceContext::CreateChildContext( } else { - return XMLIndexSourceBaseContext::CreateChildContext(nPrefix, - rLocalName, + return XMLIndexSourceBaseContext::createFastChildContext(nElement, xAttrList); } diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.hxx b/xmloff/source/text/XMLIndexObjectSourceContext.hxx index 6aba67a4e43e..586f8a13a3eb 100644 --- a/xmloff/source/text/XMLIndexObjectSourceContext.hxx +++ b/xmloff/source/text/XMLIndexObjectSourceContext.hxx @@ -60,10 +60,9 @@ protected: virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; - virtual SvXMLImportContextRef CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; #endif diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx index 98384be3d8e5..ec1790c1e43a 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.cxx @@ -212,33 +212,26 @@ void XMLIndexSourceBaseContext::endFastElement(sal_Int32 ) rIndexPropertySet->setPropertyValue("CreateFromChapter", css::uno::Any(bChapterIndex)); } -SvXMLImportContextRef XMLIndexSourceBaseContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList> & /*xAttrList*/ ) +css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexSourceBaseContext::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) { SvXMLImportContextRef xContext; - if (XML_NAMESPACE_TEXT == nPrefix) + if (nElement == XML_ELEMENT(TEXT, XML_INDEX_TITLE_TEMPLATE) ) { - if ( IsXMLToken( rLocalName, XML_INDEX_TITLE_TEMPLATE ) ) - { - xContext = new XMLIndexTitleTemplateContext(GetImport(), - rIndexPropertySet, - nPrefix, rLocalName); - } - else if ( bUseLevelFormats && - IsXMLToken( rLocalName, XML_INDEX_SOURCE_STYLES ) ) - { - xContext = new XMLIndexTOCStylesContext(GetImport(), - rIndexPropertySet, - nPrefix, rLocalName); - } - // else: unknown element in text namespace -> ignore + xContext = new XMLIndexTitleTemplateContext(GetImport(), + rIndexPropertySet); + } + else if ( bUseLevelFormats && + nElement == XML_ELEMENT(TEXT, XML_INDEX_SOURCE_STYLES) ) + { + xContext = new XMLIndexTOCStylesContext(GetImport(), + rIndexPropertySet); } // else: unknown namespace -> ignore - return xContext; + return xContext.get(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.hxx b/xmloff/source/text/XMLIndexSourceBaseContext.hxx index d85a684a3786..3370d86055bc 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.hxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.hxx @@ -107,10 +107,9 @@ protected: virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; - virtual SvXMLImportContextRef CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; #endif diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.cxx b/xmloff/source/text/XMLIndexTOCSourceContext.cxx index afc7481bc663..801d59e72bd5 100644 --- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTOCSourceContext.cxx @@ -132,16 +132,13 @@ void XMLIndexTOCSourceContext::endFastElement(sal_Int32 nElement) XMLIndexSourceBaseContext::endFastElement(nElement); } -SvXMLImportContextRef XMLIndexTOCSourceContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList> & xAttrList ) +css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexTOCSourceContext::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { - if ( (XML_NAMESPACE_TEXT == nPrefix) && - IsXMLToken(rLocalName, XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE) ) + if ( nElement == XML_ELEMENT(TEXT, XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE) ) { return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet, - nPrefix, rLocalName, aSvLevelNameTOCMap, XML_OUTLINE_LEVEL, aLevelStylePropNameTOCMap, @@ -149,8 +146,7 @@ SvXMLImportContextRef XMLIndexTOCSourceContext::CreateChildContext( } else { - return XMLIndexSourceBaseContext::CreateChildContext(nPrefix, - rLocalName, + return XMLIndexSourceBaseContext::createFastChildContext(nElement, xAttrList); } } diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.hxx b/xmloff/source/text/XMLIndexTOCSourceContext.hxx index 1a53fedb2ebe..e28e8526cdfe 100644 --- a/xmloff/source/text/XMLIndexTOCSourceContext.hxx +++ b/xmloff/source/text/XMLIndexTOCSourceContext.hxx @@ -59,10 +59,9 @@ protected: virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; - virtual SvXMLImportContextRef CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; #endif diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx index 3eda66f4b918..36621df0770e 100644 --- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx +++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx @@ -43,9 +43,8 @@ using ::com::sun::star::xml::sax::XAttributeList; XMLIndexTOCStylesContext::XMLIndexTOCStylesContext( - SvXMLImport& rImport, Reference<XPropertySet> & rPropSet, - sal_uInt16 nPrfx, const OUString& rLocalName) - : SvXMLImportContext(rImport, nPrfx, rLocalName) + SvXMLImport& rImport, Reference<XPropertySet> & rPropSet) + : SvXMLImportContext(rImport) , rTOCPropertySet(rPropSet) , nOutlineLevel(0) { diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.hxx b/xmloff/source/text/XMLIndexTOCStylesContext.hxx index edecd5b629af..6714c828709c 100644 --- a/xmloff/source/text/XMLIndexTOCStylesContext.hxx +++ b/xmloff/source/text/XMLIndexTOCStylesContext.hxx @@ -52,13 +52,9 @@ class XMLIndexTOCStylesContext : public SvXMLImportContext sal_Int32 nOutlineLevel; public: - - XMLIndexTOCStylesContext( SvXMLImport& rImport, - css::uno::Reference<css::beans::XPropertySet> & rPropSet, - sal_uInt16 nPrfx, - const OUString& rLocalName ); + css::uno::Reference<css::beans::XPropertySet> & rPropSet ); virtual ~XMLIndexTOCStylesContext() override; diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx index 4bb7de1b9d30..b05b84470dd7 100644 --- a/xmloff/source/text/XMLIndexTableSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx @@ -128,16 +128,13 @@ void XMLIndexTableSourceContext::endFastElement(sal_Int32 nElement) XMLIndexSourceBaseContext::endFastElement(nElement); } -SvXMLImportContextRef XMLIndexTableSourceContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList> & xAttrList ) +css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexTableSourceContext::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { - if ( ( XML_NAMESPACE_TEXT == nPrefix ) && - ( IsXMLToken( rLocalName, XML_TABLE_INDEX_ENTRY_TEMPLATE ) ) ) + if ( nElement == XML_ELEMENT(TEXT, XML_TABLE_INDEX_ENTRY_TEMPLATE) ) { return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet, - nPrefix, rLocalName, aLevelNameTableMap, XML_TOKEN_INVALID, // no outline-level attr aLevelStylePropNameTableMap, @@ -145,8 +142,7 @@ SvXMLImportContextRef XMLIndexTableSourceContext::CreateChildContext( } else { - return XMLIndexSourceBaseContext::CreateChildContext(nPrefix, - rLocalName, + return XMLIndexSourceBaseContext::createFastChildContext(nElement, xAttrList); } diff --git a/xmloff/source/text/XMLIndexTableSourceContext.hxx b/xmloff/source/text/XMLIndexTableSourceContext.hxx index 0d95e6fe8057..5feaf5e2bff3 100644 --- a/xmloff/source/text/XMLIndexTableSourceContext.hxx +++ b/xmloff/source/text/XMLIndexTableSourceContext.hxx @@ -61,10 +61,9 @@ protected: virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; - virtual SvXMLImportContextRef CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; #endif diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx index 5562fdfc5023..64d3519e8dc3 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTemplateContext.cxx @@ -53,14 +53,12 @@ using ::com::sun::star::container::XIndexReplace; XMLIndexTemplateContext::XMLIndexTemplateContext( SvXMLImport& rImport, Reference<XPropertySet> & rPropSet, - sal_uInt16 nPrfx, - const OUString& rLocalName, const SvXMLEnumMapEntry<sal_uInt16>* pLevelNameMap, enum XMLTokenEnum eLevelAttrName, const char** pLevelStylePropMap, const bool* pAllowedTokenTypes, bool bT ) -: SvXMLImportContext(rImport, nPrfx, rLocalName) +: SvXMLImportContext(rImport) , pOutlineLevelNameMap(pLevelNameMap) , eOutlineLevelAttrName(eLevelAttrName) , pOutlineLevelStylePropMap(pLevelStylePropMap) diff --git a/xmloff/source/text/XMLIndexTemplateContext.hxx b/xmloff/source/text/XMLIndexTemplateContext.hxx index e692edbafbf7..a086829fd6ef 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.hxx +++ b/xmloff/source/text/XMLIndexTemplateContext.hxx @@ -87,21 +87,17 @@ public: XMLIndexTemplateContext( SvXMLImport& rImport, css::uno::Reference<css::beans::XPropertySet> & rPropSet, - sal_uInt16 nPrfx, - const OUString& rLocalName, const SvXMLEnumMapEntry<EnumT>* aLevelNameMap, enum ::xmloff::token::XMLTokenEnum eLevelAttrName, const char** aLevelStylePropNameMap, const bool* aAllowedTokenTypes, bool bTOC_=false) - : XMLIndexTemplateContext(rImport,rPropSet,nPrfx,rLocalName, + : XMLIndexTemplateContext(rImport,rPropSet, reinterpret_cast<const SvXMLEnumMapEntry<sal_uInt16>*>(aLevelNameMap), eLevelAttrName, aLevelStylePropNameMap, aAllowedTokenTypes, bTOC_) {} XMLIndexTemplateContext( SvXMLImport& rImport, css::uno::Reference<css::beans::XPropertySet> & rPropSet, - sal_uInt16 nPrfx, - const OUString& rLocalName, const SvXMLEnumMapEntry<sal_uInt16>* aLevelNameMap, enum ::xmloff::token::XMLTokenEnum eLevelAttrName, const char** aLevelStylePropNameMap, diff --git a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx index e11ab205f7eb..14b4608d8877 100644 --- a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx @@ -38,10 +38,8 @@ using ::xmloff::token::XML_STYLE_NAME; XMLIndexTitleTemplateContext::XMLIndexTitleTemplateContext( SvXMLImport& rImport, - Reference<XPropertySet> & rPropSet, - sal_uInt16 nPrfx, - const OUString& rLocalName) -: SvXMLImportContext(rImport, nPrfx, rLocalName) + Reference<XPropertySet> & rPropSet) +: SvXMLImportContext(rImport) , bStyleNameOK(false) , rTOCPropertySet(rPropSet) { diff --git a/xmloff/source/text/XMLIndexTitleTemplateContext.hxx b/xmloff/source/text/XMLIndexTitleTemplateContext.hxx index 234a7e96a6b5..a5b698242e68 100644 --- a/xmloff/source/text/XMLIndexTitleTemplateContext.hxx +++ b/xmloff/source/text/XMLIndexTitleTemplateContext.hxx @@ -49,12 +49,9 @@ class XMLIndexTitleTemplateContext : public SvXMLImportContext public: - XMLIndexTitleTemplateContext( SvXMLImport& rImport, - css::uno::Reference<css::beans::XPropertySet> & rPropSet, - sal_uInt16 nPrfx, - const OUString& rLocalName); + css::uno::Reference<css::beans::XPropertySet> & rPropSet); virtual ~XMLIndexTitleTemplateContext() override; diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx index 3d388c4de498..2376eaba6c86 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.cxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx @@ -142,16 +142,13 @@ void XMLIndexUserSourceContext::endFastElement(sal_Int32 nElement) XMLIndexSourceBaseContext::endFastElement(nElement); } -SvXMLImportContextRef XMLIndexUserSourceContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const Reference<XAttributeList> & xAttrList ) +css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexUserSourceContext::createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { - if ( (XML_NAMESPACE_TEXT == nPrefix) && - (IsXMLToken(rLocalName, XML_USER_INDEX_ENTRY_TEMPLATE)) ) + if ( nElement == XML_ELEMENT(TEXT, XML_USER_INDEX_ENTRY_TEMPLATE) ) { return new XMLIndexTemplateContext(GetImport(), rIndexPropertySet, - nPrefix, rLocalName, aSvLevelNameTOCMap, XML_OUTLINE_LEVEL, aLevelStylePropNameTOCMap, @@ -159,8 +156,7 @@ SvXMLImportContextRef XMLIndexUserSourceContext::CreateChildContext( } else { - return XMLIndexSourceBaseContext::CreateChildContext(nPrefix, - rLocalName, + return XMLIndexSourceBaseContext::createFastChildContext(nElement, xAttrList); } diff --git a/xmloff/source/text/XMLIndexUserSourceContext.hxx b/xmloff/source/text/XMLIndexUserSourceContext.hxx index 54d8812008db..e133b22c99fc 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.hxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.hxx @@ -63,10 +63,9 @@ protected: virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; - virtual SvXMLImportContextRef CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; #endif |