diff options
author | Eilidh McAdam <eilidh@lanedo.com> | 2012-09-26 18:07:31 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2012-09-26 19:32:51 +0000 |
commit | 63a7550931c88ce06e4ab6f258121061c1f2dcf2 (patch) | |
tree | a85af41990cbb04c437c5e2e8a270dace72210b4 | |
parent | e1a509f4a362d21248b439c99e3b55f4fa9ba1bd (diff) |
DOCX image drop shadow testcase.
Change-Id: Ibbbb27fdf0abff997d31ae8814812f7af1ec15af
Reviewed-on: https://gerrit.libreoffice.org/704
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/imgshadow.docx | bin | 0 -> 29629 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 20 |
2 files changed, 19 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/imgshadow.docx b/sw/qa/extras/ooxmlimport/data/imgshadow.docx Binary files differnew file mode 100644 index 000000000000..efe0e9596008 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/imgshadow.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index fa388f368aa8..92452dd24247 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -46,7 +46,7 @@ #include <com/sun/star/text/XTextFramesSupplier.hpp> #include <com/sun/star/text/XTextViewCursorSupplier.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp> - +#include <com/sun/star/table/ShadowFormat.hpp> #include <vcl/svapp.hxx> @@ -93,6 +93,7 @@ public: void testN780563(); void testN780853(); void testN780843(); + void testShadow(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -134,6 +135,7 @@ public: CPPUNIT_TEST(testN780563); CPPUNIT_TEST(testN780853); CPPUNIT_TEST(testN780843); + CPPUNIT_TEST(testShadow); #endif CPPUNIT_TEST_SUITE_END(); @@ -943,6 +945,22 @@ void Test::testN780843() CPPUNIT_ASSERT_EQUAL(OUString("shown footer"), xFooter->getString()); } +void Test::testShadow() +{ + /* + * The problem was that drop shadows on inline images were not being + * imported and applied. + */ + load("imgshadow.docx"); + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xPropertySet(xDraws->getByIndex(1), uno::UNO_QUERY); + + table::ShadowFormat aShadow; + xPropertySet->getPropertyValue("ShadowFormat") >>= aShadow; + CPPUNIT_ASSERT_EQUAL(sal_Int32(273), sal_Int32(aShadow.ShadowWidth)); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |