diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-05-30 12:18:30 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-05-30 12:34:28 +0200 |
commit | 1727b268645ae4f7328ed00135abe1e316311ba8 (patch) | |
tree | 4abb6afc3b74048a49ee52d9a5223c810d15c0df /sw | |
parent | 59db0cb6752f269893e2697bf561643aec92bdf1 (diff) |
bnc#817956 page border shadow testcase
Change-Id: I1ded79d89dcceb3bae5926a2f217cde8bf6aa830
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/ooxmlimport/data/page-border-shadow.docx | bin | 0 -> 10012 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/page-border-shadow.docx b/sw/qa/extras/ooxmlimport/data/page-border-shadow.docx Binary files differnew file mode 100755 index 000000000000..65a2273f6bc6 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/page-border-shadow.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 36fc88302176..5a268e48597e 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -115,6 +115,7 @@ public: void testIndentation(); void testPageBackground(); void testWatermark(); + void testPageBorderShadow(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -198,6 +199,7 @@ void Test::run() {"indentation.docx", &Test::testIndentation}, {"page-background.docx", &Test::testPageBackground}, {"watermark.docx", &Test::testWatermark}, + {"page-border-shadow.docx", &Test::testPageBorderShadow}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1418,6 +1420,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(); |