[Libreoffice-commits] core.git: sw/qa

Vasily Melenchuk Vasily.Melenchuk at cib.de
Fri May 12 16:09:51 UTC 2017


 sw/qa/extras/ooxmlexport/data/tdf100072.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx    |    9 +++++++++
 2 files changed, 9 insertions(+)

New commits:
commit cffc5a04661fc0a84dff9fa5da954236d88a8b38
Author: Vasily Melenchuk <Vasily.Melenchuk at cib.de>
Date:   Fri May 12 16:14:51 2017 +0300

    tdf#100072 extra test for DOCX shape import with zero height
    
    Corresponding bug is already fixed in tdf#107104. However created
    tests do care only for width, but not for height, like we have in
    this testcase.
    
    Change-Id: I6f24e66e3c5e9289e158e0ca043ef01a3ea42880
    Reviewed-on: https://gerrit.libreoffice.org/37538
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf100072.docx b/sw/qa/extras/ooxmlexport/data/tdf100072.docx
new file mode 100644
index 000000000000..02b885b9aafa
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf100072.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index a4f847a99a70..7370fe83da3d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -472,6 +472,15 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107033, "tdf107033.docx")
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(25), getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf100072, "tdf100072.docx")
+{
+    // Ensure that shape has non-zero height
+    CPPUNIT_ASSERT(getShape(1)->getSize().Height > 0);
+
+    // Ensure that shape left corner is within page (positive)
+    CPPUNIT_ASSERT(getShape(1)->getPosition().X > 0);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list