tdf143726 DOCX: export default TOC Header style with correct name

This seems to have been a typo since it was mapped to the default
name of the Table of Authorities index's heading in Word
which is not really supported anyways.

Change-Id: I4cadce18c30c5497f27479fcc251fdf85d859145
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120091
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 5440492ff9f949ee9ed9052e8bab6f5136d78b2a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122278
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/sw/qa/extras/ooxmlexport/data/Simple-TOC.odt b/sw/qa/extras/ooxmlexport/data/Simple-TOC.odt
new file mode 100644
index 0000000..475f59e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Simple-TOC.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index bd83383..f5f10b4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -551,6 +551,15 @@
                "rotWithShape", "0");
}

DECLARE_OOXMLEXPORT_TEST(testTdf143726, "Simple-TOC.odt")
{
    xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
    CPPUNIT_ASSERT(pXmlStyles);
    // Without the fix this was "TOA Heading" which belongs to the "Table of Authorities" index in Word
    // TOC's heading style should be exported as "TOC Heading" as that's the default Word style name
    assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='ContentsHeading']/w:name", "val", "TOC Heading");
}

CPPUNIT_PLUGIN_IMPLEMENT();

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/styles.cxx b/sw/source/filter/ww8/styles.cxx
index 4c8c9bc49..6f613b4 100644
--- a/sw/source/filter/ww8/styles.cxx
+++ b/sw/source/filter/ww8/styles.cxx
@@ -73,7 +73,7 @@
            "Endnote Text",
            "Table of Authorities",
            "Macro Text",
            "TOA Heading",
            "TOC Heading",
            "List",
            "List 2",
            "List 3",