diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-30 13:54:54 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-30 14:11:00 +0100 |
commit | 5013d67f0d2cc8bec46e76932a5f58d913962d7a (patch) | |
tree | bfad1f856d7493c31959f6d36b55348188c00823 | |
parent | 45befb368528a0c273b695e37d53a56ab90503e5 (diff) |
swpagerelsize: add layout tests
Change-Id: I0c5b606518ce782ffb5e48a859910c4e9e09c76d
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 333f00d802de..c2e5c0cbbdf3 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 |