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>
diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
index 3c17258..c5ad3ff 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 bf903ab..8f39f4c 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 8434c6a..3b3cab1 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 7d8f42f..c6684c2 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 84cd655..d4a9c3b 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 8033bdd..e3d2ccd 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 7b9468a..8471e59 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 6aba67a..586f8a1 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 98384be..ec1790c 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 d85a684..3370d86 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 afc7481..801d59e 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 1a53fed..e28e852 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 3eda66f..36621df 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 edecd5b..6714c82 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 4bb7de1..b05b844 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 0d95e6f..5feaf5e 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 5562fdf..64d3519 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 e692edb..a086829 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 e11ab20..14b4608 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 234a7e9..a5b69824 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 3d388c4..2376eab 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 54d8812..e133b22 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