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

Miklos Vajna vmiklos at collabora.co.uk
Thu Jan 30 05:11:21 PST 2014


 sw/qa/extras/odfexport/odfexport.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 5013d67f0d2cc8bec46e76932a5f58d913962d7a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jan 30 13:54:54 2014 +0100

    swpagerelsize: add layout tests
    
    Change-Id: I0c5b606518ce782ffb5e48a859910c4e9e09c76d

diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 333f00d..c2e5c0c 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -318,6 +318,9 @@ DECLARE_ODFEXPORT_TEST(testRelhPage, "relh-page.odt")
     CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xTextFrame, "RelativeHeightRelation"));
     // Make sure rel-height-rel doesn't affect width.
     CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty<sal_Int16>(xTextFrame, "RelativeWidthRelation"));
+
+    // This was 2601, 20% height was relative from margin, not page.
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(3168), parseDump("/root/page/body/txt/anchored/fly/infos/bounds", "height").toInt32());
 }
 
 DECLARE_ODFEXPORT_TEST(testRelwPage, "relw-page.odt")
@@ -327,6 +330,9 @@ DECLARE_ODFEXPORT_TEST(testRelwPage, "relw-page.odt")
     CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xTextFrame, "RelativeWidthRelation"));
     // Make sure rel-width-rel doesn't affect height.
     CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty<sal_Int16>(xTextFrame, "RelativeHeightRelation"));
+
+    // This was 3762, 40% width was relative from margin, not page.
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(4896), parseDump("/root/page/body/txt/anchored/fly/infos/bounds", "width").toInt32());
 }
 
 #endif


More information about the Libreoffice-commits mailing list