summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-06-04 12:13:19 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-06-04 21:49:16 +0200
commit40c577f57fb16d24d5a2f76c3a5126073fff6a98 (patch)
treef949a2ecdc53a237e204eae2440a3ae342fbcada /sw/qa/extras/ooxmlimport
parentf1125b56d1d049448542c699a5c62dc6aa3a0bab (diff)
tdf#130804: sw: Add unittest
Change-Id: Ia0dfa1a6add423dea51bbaf896da2921183fc96c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95497 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf130804.docxbin0 -> 182772 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf130804.docx b/sw/qa/extras/ooxmlimport/data/tdf130804.docx
new file mode 100644
index 000000000000..401f23de8728
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf130804.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 141a06e144cc..ecd4c588fbbd 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -355,6 +355,19 @@ DECLARE_OOXMLIMPORT_TEST(testN766477, "n766477.docx")
CPPUNIT_ASSERT_EQUAL(OUString("Checkbox_Checked"), aElementNames[0]);
}
+DECLARE_OOXMLIMPORT_TEST(testTdf130804, "tdf130804.docx")
+{
+ OUString flyHeight = parseDump("/root/page/body/txt[1]/infos/bounds", "height");
+ OUString txtHeight = parseDump("/root/page/body/txt[1]/anchored/fly/infos/bounds", "height");
+
+ //Without the fix in place, txtHeight would have been flyHeight + 55
+ CPPUNIT_ASSERT_EQUAL(flyHeight, txtHeight);
+
+ // Also check the bookmark portion is ignored in the next paragraph
+ OUString aTop = parseDump("/root/page/body/txt[2]/infos/prtBounds", "top");
+ CPPUNIT_ASSERT_EQUAL(OUString("240"), aTop);
+}
+
DECLARE_OOXMLIMPORT_TEST(testN758883, "n758883.docx")
{
/*