diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2021-08-05 22:56:19 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-08-19 13:39:32 +0200 |
commit | 5440492ff9f949ee9ed9052e8bab6f5136d78b2a (patch) | |
tree | 43ba2e2db809746008967ecb870ad7cf47724e43 /sw | |
parent | b55db12f79a01ccbd3276f4a291fe20750efbaf3 (diff) |
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>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/Simple-TOC.odt | bin | 0 -> 10289 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport16.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/styles.cxx | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/Simple-TOC.odt b/sw/qa/extras/ooxmlexport/data/Simple-TOC.odt Binary files differnew file mode 100644 index 000000000000..475f59e051a9 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/Simple-TOC.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx index 21609b3a9c8e..d1f0603ec884 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx @@ -858,6 +858,16 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf139549, "tdf139549.docx") CPPUNIT_ASSERT_DOUBLES_EQUAL(40.1, aStyleCommandValue.toFloat(), 0.1); } + +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 4c8c9bc49555..6f613b40fad6 100644 --- a/sw/source/filter/ww8/styles.cxx +++ b/sw/source/filter/ww8/styles.cxx @@ -73,7 +73,7 @@ namespace "Endnote Text", "Table of Authorities", "Macro Text", - "TOA Heading", + "TOC Heading", "List", "List 2", "List 3", |