diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-04 12:13:19 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-06-04 21:49:16 +0200 |
commit | 40c577f57fb16d24d5a2f76c3a5126073fff6a98 (patch) | |
tree | f949a2ecdc53a237e204eae2440a3ae342fbcada /sw/qa/extras/ooxmlimport | |
parent | f1125b56d1d049448542c699a5c62dc6aa3a0bab (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.docx | bin | 0 -> 182772 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 |
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 Binary files differnew file mode 100644 index 000000000000..401f23de8728 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf130804.docx 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") { /* |