summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-02-27 14:43:21 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-27 15:22:35 +0100
commit743d90ca384ae71b57eaf2b99fb7da68fc381215 (patch)
tree034e26afbd4eeabed609c763ec7333b0ce5d305c /sw/qa/extras
parent90b33b30756999298fe20bb3006f4742901de8cb (diff)
DOCX export: fix order of table border elements
Change-Id: I17d8634017c5b0374d30501186b338ddedbcd7ea
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlexport/data/table.odtbin0 -> 8889 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/table.odt b/sw/qa/extras/ooxmlexport/data/table.odt
new file mode 100644
index 000000000000..25b2a5fea235
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/table.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 658ef03e6db6..400745ee34f9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -323,6 +323,20 @@ DECLARE_OOXMLEXPORT_TEST(testMathVerticalStacks, "math-vertical_stacks.docx")
// CHECK_FORMULA( "binom {a} {binom {b} {c}}", getFormula( getRun( getParagraph( 4 ), 1 )));
}
+DECLARE_OOXMLEXPORT_TEST(testTable, "table.odt")
+{
+ // Validation test: order of elements were wrong.
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ // Order was: insideH, end, insideV.
+ int nEnd = getXPathPosition(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblBorders", "end");
+ int nInsideH = getXPathPosition(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblBorders", "insideH");
+ int nInsideV = getXPathPosition(pXmlDoc, "/w:document/w:body/w:tbl/w:tblPr/w:tblBorders", "insideV");
+ CPPUNIT_ASSERT(nEnd < nInsideH);
+ CPPUNIT_ASSERT(nInsideH < nInsideV);
+}
+
DECLARE_OOXMLEXPORT_TEST(testTablePosition, "table-position.docx")
{
sal_Int32 xCoordsFromOffice[] = { 2500, -1000, 0, 0 };