sw/qa/extras/ooxmlimport/data/tdf130804.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 +++++++++++++ 2 files changed, 13 insertions(+)
New commits: commit 40c577f57fb16d24d5a2f76c3a5126073fff6a98 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Jun 4 12:13:19 2020 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Jun 4 21:49:16 2020 +0200 tdf#130804: sw: Add unittest Change-Id: Ia0dfa1a6add423dea51bbaf896da2921183fc96c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95497 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> 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 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf130804.docx 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") { /* _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits