[Libreoffice-commits] core.git: sw/qa writerfilter/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 19 12:51:59 UTC 2021


 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx      |    5 +++--
 writerfilter/source/dmapper/StyleSheetTable.cxx |    1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit e3f9170c03eb9121b0c244c0e2e60d15e6920deb
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Thu Aug 5 23:50:14 2021 +0200
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Thu Aug 19 14:51:25 2021 +0200

    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 at numbertext.org>
    Reviewed-by: László Németh <nemeth at numbertext.org>

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" },


More information about the Libreoffice-commits mailing list