[Libreoffice-commits] core.git: sw/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 4 19:49:49 UTC 2020
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 <xiscofauli at libreoffice.org>
AuthorDate: Thu Jun 4 12:13:19 2020 +0200
Commit: Xisco Fauli <xiscofauli at 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 <xiscofauli at 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")
{
/*
More information about the Libreoffice-commits
mailing list