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

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 7 11:58:32 UTC 2020


 sw/qa/extras/ooxmlexport/data/tdf138612.docx           |binary
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx              |   17 +++++++++++++++++
 writerfilter/source/dmapper/TablePropertiesHandler.hxx |    3 ---
 3 files changed, 17 insertions(+), 3 deletions(-)

New commits:
commit f319d6b543c2367546bc80d138e56ed03731e265
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Fri Dec 4 20:47:04 2020 +0100
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Mon Dec 7 12:57:46 2020 +0100

    tdf#138612 DOCX import: fix lost part of split table cell
    
    by removing unnecessary rewriting of cell properties
    during import of w:tblPrEx.
    
    Regression from commit da8ea444b004a0be36964ae9a778f73e752b2673
    (tdf#133455 DOCX import: fix table border regression)
    
    Change-Id: I93ce36991437644db439c8cf02e1a8503fbdfba7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107239
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf138612.docx b/sw/qa/extras/ooxmlexport/data/tdf138612.docx
new file mode 100644
index 000000000000..dd116044b56e
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf138612.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index de4b340a6142..95f60995f933 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -732,6 +732,23 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf133455, "tdf133455.docx")
     assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[11]/w:tc[1]/w:tcPr/w:tcBorders/w:bottom[@w:val = 'nil']", 0);
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138612, "tdf138612.docx")
+{
+    xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+
+    // Row 5 Col 1 - vertically merged cell
+    assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[1]/w:tcPr/w:vMerge", "val", "restart");
+    // Row 5 Col 2 - split cell
+    // This was w:vMerge="restart"
+    assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[5]/w:tc[2]/w:tcPr/w:vMerge", 0);
+
+    // Row 6 Col 1 - merged with cell in Row 5 Col 1
+    assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[1]/w:tcPr/w:vMerge", "val", "continue");
+    // Row 6 Col 2 - split cell
+    // This was w:vMerge="continue" (merged with cell in Row 5 Col 2)
+    assertXPath(pXmlDocument, "/w:document/w:body/w:tbl/w:tr[6]/w:tc[2]/w:tcPr/w:vMerge", 0);
+}
+
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128646, "tdf128646.docx")
 {
     // The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden.
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.hxx b/writerfilter/source/dmapper/TablePropertiesHandler.hxx
index 1bd81798c24b..6ba81cf9010f 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.hxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.hxx
@@ -76,10 +76,7 @@ private:
     void tableExceptionProps( TablePropertyMapPtr pProps )
     {
         if ( m_pTableManager )
-        {
             m_pTableManager->tableExceptionProps( pProps );
-            cellProps( pProps );
-        }
         else
             m_pCurrentProperties->InsertProps(pProps.get());
     };


More information about the Libreoffice-commits mailing list