summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfexport
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-08-24 12:20:04 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-08-24 12:45:16 +0200
commitac6a2038ac6eab37c8c0a7957a75c24baeeb66b2 (patch)
tree51b68db80ce2d9c4bc77c32a3d866674cc85bf6f /sw/qa/extras/odfexport
parent2a01c49f767353e6db58d59362dace2363b736bb (diff)
ODF filter: handle draw:shadow-opacity for Writer frames
Change-Id: I3ad39e5de5b6999d6c2182c1ec622ae7f873cafe
Diffstat (limited to 'sw/qa/extras/odfexport')
-rw-r--r--sw/qa/extras/odfexport/data/textframe-transparent-shadow.odtbin0 -> 9634 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/textframe-transparent-shadow.odt b/sw/qa/extras/odfexport/data/textframe-transparent-shadow.odt
new file mode 100644
index 000000000000..508e853c9d75
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/textframe-transparent-shadow.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index b8cecb511ee4..3089a539f52e 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -22,6 +22,7 @@ public:
void testFdo58949();
void testCharacterBorder();
void testFdo43807();
+ void testTextframeTransparentShadow();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -43,6 +44,7 @@ void Test::run()
{"fdo58949.docx", &Test::testFdo58949},
{"charborder.odt", &Test::testCharacterBorder },
{"fdo43807.odt", &Test::testFdo43807 },
+ {"textframe-transparent-shadow.odt", &Test::testTextframeTransparentShadow},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -371,6 +373,15 @@ void Test::testFdo43807()
CPPUNIT_ASSERT_EQUAL(OUString("User Defined Drop Caps"),getProperty<OUString>(xSet,"DropCapCharStyleName"));
}
+void Test::testTextframeTransparentShadow()
+{
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference<drawing::XShape> xPicture(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ // ODF stores opacity of 75%, that means 25% transparency.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(25), getProperty<sal_Int32>(xPicture, "ShadowTransparence"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();