summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2021-08-05 23:50:14 +0200
committerLászló Németh <nemeth@numbertext.org>2021-08-19 14:51:25 +0200
commite3f9170c03eb9121b0c244c0e2e60d15e6920deb (patch)
treeb0fa5239e6c6aa9778815552068c449492593609
parentddf90ad13d1e4df45dc414d737e50f086c8737fd (diff)
tdf#143722 DOCX import: map using default TOC heading style
of Writer ("Contents Heading") instead of "TOC Heading". This essentially reverts the fix to bug #83300. When that was added the TOC import was broken enough that it made no visible regression. In 6.3 the TOC import was fixed up so now it's more annoying. The unit test of bug #83300 is reused but depends on the fix to bug #143726. I checked the example file of bug #83300 and the layout problem of comment 6 that was fixed there does not come back. Follow-up to commit 5440492ff9f949ee9ed9052e8bab6f5136d78b2a "tf143726 DOCX: export default TOC Header style with correct name". Change-Id: Iaee73729ea46a0c36d08ccc6fc5fb04fdf592a1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120092 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx5
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx1
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 2222b20d0b07..ce706929cf04 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -1105,8 +1105,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf94374)
DECLARE_OOXMLEXPORT_TEST(testTdf83300, "tdf83300.docx")
{
- // This was 'Contents Heading', which (in the original document) implied 'keep with next' on unexpected paragraphs.
- CPPUNIT_ASSERT_EQUAL(OUString("TOC Heading"), getProperty<OUString>(getParagraph(1), "ParaStyleName"));
+ // tdf#143722: This was 'TOC Heading', upon updating a TOC the heading replaced its Word-default blue + Calibri style
+ // with a Writer-default black + Liberation Sans one
+ CPPUNIT_ASSERT_EQUAL(OUString("Contents Heading"), getProperty<OUString>(getParagraph(1), "ParaStyleName"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf78902, "tdf78902.docx")
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 8eb833410e1a..0ca4d8ca4466 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1388,6 +1388,7 @@ OUString StyleSheetTable::ConvertStyleName( const OUString& rWWName, bool bExten
{ "TOC 7", "Contents 7" },
{ "TOC 8", "Contents 8" },
{ "TOC 9", "Contents 9" },
+ { "TOC Heading", "Contents Heading" },
{ "TOCHeading", "Contents Heading" },
{ "toc 1", "Contents 1" },
{ "toc 2", "Contents 2" },