diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/TC-table-DnD-move.docx | bin | 0 -> 12977 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/TC-table-Separate-Move.docx | bin | 0 -> 13407 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/TC-table-rowDND-front.docx | bin | 0 -> 13389 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/TC-table-rowDND.docx | bin | 0 -> 13378 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 50 |
5 files changed, 50 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/TC-table-DnD-move.docx b/sw/qa/extras/ooxmlexport/data/TC-table-DnD-move.docx Binary files differnew file mode 100644 index 000000000000..f231d6f84240 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/TC-table-DnD-move.docx diff --git a/sw/qa/extras/ooxmlexport/data/TC-table-Separate-Move.docx b/sw/qa/extras/ooxmlexport/data/TC-table-Separate-Move.docx Binary files differnew file mode 100644 index 000000000000..227f2862c68a --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/TC-table-Separate-Move.docx diff --git a/sw/qa/extras/ooxmlexport/data/TC-table-rowDND-front.docx b/sw/qa/extras/ooxmlexport/data/TC-table-rowDND-front.docx Binary files differnew file mode 100644 index 000000000000..17d3feeb3406 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/TC-table-rowDND-front.docx diff --git a/sw/qa/extras/ooxmlexport/data/TC-table-rowDND.docx b/sw/qa/extras/ooxmlexport/data/TC-table-rowDND.docx Binary files differnew file mode 100644 index 000000000000..9608736cf20a --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/TC-table-rowDND.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 1864c4bcf83e..431d5d71753d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -881,6 +881,56 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104797, "tdf104797.docx") CPPUNIT_ASSERT_EQUAL( OUString( " Will this sentence be duplicated ADDED STUFF?" ), getRun( getParagraph( 2 ), 4 )->getString()); } +DECLARE_OOXMLEXPORT_TEST(testTdf143510, "TC-table-DnD-move.docx") +{ + // check moveFromRangeStart/End and moveToRangeStart/End for tracked table move by drag & drop + xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + if (mbExported) + { + // This was 0 (missing tracked table row deletion/insertion) + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr/w:trPr/w:del", 2); + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[2]/w:tr/w:trPr/w:ins", 2); + } +} + +DECLARE_OOXMLEXPORT_TEST(testTdf143510_table_from_row, "TC-table-Separate-Move.docx") +{ + // check moveFromRangeStart/End and moveToRangeStart/End for tracked table move by drag & drop + xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + if (mbExported) + { + // This was 0 (missing tracked table row deletion/insertion) + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr/w:trPr/w:del", 1); + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[3]/w:trPr/w:del", 1); + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[2]/w:tr", 1); + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[2]/w:tr/w:trPr/w:ins", 1); + } +} + +DECLARE_OOXMLEXPORT_TEST(testTdf143510_within_table, "TC-table-rowDND.docx") +{ + // check moveFromRangeStart/End and moveToRangeStart/End for tracked table row move by DnD + xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + if (mbExported) + { + // This was 0 (missing tracked table row deletion/insertion) + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:trPr/w:del", 1); + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:trPr/w:ins", 1); + } +} + +DECLARE_OOXMLEXPORT_TEST(testTdf143510_within_table2, "TC-table-rowDND-front.docx") +{ + // check moveFromRangeStart/End and moveToRangeStart/End for tracked table row move by DnD + xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + if (mbExported) + { + // This was 0 (missing tracked table row deletion/insertion) + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:trPr/w:ins", 1); + assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[4]/w:trPr/w:del", 1); + } +} + DECLARE_OOXMLEXPORT_TEST(testTdf113608_runAwayNumbering, "tdf113608_runAwayNumbering.docx") { // check that an incorrect numbering style is not applied |