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

Adam Co rattles2013 at gmail.com
Wed Feb 12 02:13:06 PST 2014


 sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableCell.docx  |binary
 sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableCell.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx                             |   16 ++++++++++
 3 files changed, 16 insertions(+)

New commits:
commit 2eb142f4207f921dfeb6f9d5cd34cb0fb288bdd1
Author: Adam Co <rattles2013 at gmail.com>
Date:   Wed Feb 5 14:57:19 2014 +0200

    Add unit-tests for DOCX preservation of 'table cell redline'
    
    Added unit-tests to make sure that 'table cell redlines'
    (e.g. - table cell was inserted \ removed) are being round
    tripped correctly from a DOCX file.
    
    Change-Id: I773cb51a39654d2640200489d5199361b56396c7
    Reviewed-on: https://gerrit.libreoffice.org/7878
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableCell.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableCell.docx
new file mode 100644
index 0000000..c4d8394
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/testTrackChangesDeletedTableCell.docx differ
diff --git a/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableCell.docx b/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableCell.docx
new file mode 100644
index 0000000..d1450be
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/testTrackChangesInsertedTableCell.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index a41f204..2a4ee6e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2309,6 +2309,22 @@ DECLARE_OOXMLEXPORT_TEST(testTrackChangesInsertedTableRow, "testTrackChangesInse
     assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:trPr/w:ins");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTrackChangesDeletedTableCell, "testTrackChangesDeletedTableCell.docx")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+    if (!pXmlDoc)
+        return;
+    assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:tcPr/w:cellDel");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTrackChangesInsertedTableCell, "testTrackChangesInsertedTableCell.docx")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+    if (!pXmlDoc)
+        return;
+    assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc/w:tcPr/w:cellIns");
+}
+
 DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx")
 {
     // The DOCX containing the Table of Contents was not exported with correct page nos


More information about the Libreoffice-commits mailing list