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

Mark Hung marklh9 at gmail.com
Tue May 8 13:00:19 UTC 2018


 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 1d5e837148dbd9bdc1cb6804e5f6fc6e369d17f2
Author: Mark Hung <marklh9 at gmail.com>
Date:   Sat May 5 11:30:12 2018 +0800

    sw: check layout in testTdf102466.
    
    Examine the document in testTdf102466 and sees that the
    table in the first page is clipped instead of first page
    missing as mentioned in the comment 1 of tdf#102466.
    
    Adding more precise test to make the test the feature more
    purposely.
    
    Change-Id: Icb6dfb17f033c96dde21b5561d7b15170cf96e27
    Reviewed-on: https://gerrit.libreoffice.org/53904
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 6232c9f8e7ee..d0191c0271dd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -1055,6 +1055,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92521, "tdf92521.odt")
 DECLARE_OOXMLEXPORT_TEST(testTdf102466, "tdf102466.docx")
 {
     // the problem was: file is truncated: the first page is missing.
+    // More precisely, the table in the first page was clipped.
+    {
+        xmlDocPtr pXmlDoc = parseLayoutDump();
+        sal_Int32 nFlyPrtHeight = getXPath(pXmlDoc, "(/root/page[1]//fly)[1]/infos/prtBounds", "height").toInt32();
+        sal_Int32 nTableHeight = getXPath(pXmlDoc, "(/root/page[1]//fly)[1]/tab/infos/bounds", "height").toInt32();
+        CPPUNIT_ASSERT_MESSAGE("The table is clipped in a fly frame.", nFlyPrtHeight >= nTableHeight);
+    }
 
     // check how much pages we have
     CPPUNIT_ASSERT_EQUAL(10, getPages());


More information about the Libreoffice-commits mailing list