diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-05-30 12:18:30 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-05-30 15:54:15 +0200 |
commit | f64d62130be8029bcdcd8eb4aace99296d4be82a (patch) | |
tree | 76e9508702ccd0da677c7c01249687b6541202dd /sw/qa/extras/ooxmlimport/ooxmlimport.cxx | |
parent | c185f04cd36d2bba3b3d24530966baa4079b109b (diff) |
bnc#817956 page border shadow testcase
Change-Id: I1ded79d89dcceb3bae5926a2f217cde8bf6aa830
(cherry picked from commit 300ba1a171a37da08d72e278cf38988f1225cc83)
Diffstat (limited to 'sw/qa/extras/ooxmlimport/ooxmlimport.cxx')
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 8d55c28365bb..8f24b406256a 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -120,6 +120,7 @@ public: void testN592908_Picture(); void testPageBackground(); void testWatermark(); + void testPageBorderShadow(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -192,6 +193,7 @@ void Test::run() {"n592908-picture.docx", &Test::testN592908_Picture}, {"page-background.docx", &Test::testPageBackground}, {"watermark.docx", &Test::testWatermark}, + {"page-border-shadow.docx", &Test::testPageBorderShadow}, }; for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) { @@ -1214,6 +1216,16 @@ void Test::testWatermark() CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_PRINT_AREA, getProperty<sal_Int16>(xShape, "VertOrientRelation")); } +void Test::testPageBorderShadow() +{ + // The problem was that in w:pgBorders, child elements had a w:shadow attribute, but that was ignored. + table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "ShadowFormat"); + CPPUNIT_ASSERT_EQUAL(COL_BLACK, sal_uInt32(aShadow.Color)); + CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location); + // w:sz="48" is in eights of a point, 1 pt is 20 twips. + CPPUNIT_ASSERT_EQUAL(sal_Int16(TWIP_TO_MM100(48/8*20)), aShadow.ShadowWidth); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |