summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2017-07-12 13:29:24 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-07-17 10:44:01 +0200
commite50d5b52637dec44f2934a21ca4b47a51e8298f0 (patch)
treec57121499befdc1f0482acb24eac739da7e2b453 /sd
parent6f3b39499f9c6c88d637b621ef9ec6189d4fb9ff (diff)
tdf#104743: Export transparency for bitmap fill/background
Change-Id: I951ce974320f2eb5a6d3304b66f89ce71b38982c Reviewed-on: https://gerrit.libreoffice.org/39880 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/page_transparent_bitmap.pptxbin0 -> 29823 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx27
2 files changed, 27 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/page_transparent_bitmap.pptx b/sd/qa/unit/data/pptx/page_transparent_bitmap.pptx
new file mode 100644
index 000000000000..ac1dd074b83f
--- /dev/null
+++ b/sd/qa/unit/data/pptx/page_transparent_bitmap.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 6dee57e3df3a..9d4a063a6e5c 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -97,6 +97,7 @@ public:
void testTdf92076();
void testTdf59046();
void testTdf105739();
+ void testPageBitmapWithTransparency();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
@@ -121,6 +122,7 @@ public:
CPPUNIT_TEST(testTdf92076);
CPPUNIT_TEST(testTdf59046);
CPPUNIT_TEST(testTdf105739);
+ CPPUNIT_TEST(testPageBitmapWithTransparency);
CPPUNIT_TEST_SUITE_END();
@@ -777,6 +779,31 @@ void SdOOXMLExportTest2::testTdf105739()
xShell->DoClose();
}
+void SdOOXMLExportTest2::testPageBitmapWithTransparency()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/page_transparent_bitmap.pptx"), PPTX );
+
+ xDocShRef = saveAndReload( xDocShRef.get(), ODP );
+ uno::Reference< drawing::XDrawPagesSupplier > xDoc(
+ xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "There should be exactly one page", static_cast<sal_Int32>(1), xDoc->getDrawPages()->getCount() );
+
+ uno::Reference< drawing::XDrawPage > xPage( getPage( 0, xDocShRef ) );
+
+ uno::Reference< beans::XPropertySet > xPropSet( xPage, uno::UNO_QUERY );
+ uno::Any aAny = xPropSet->getPropertyValue( "Background" );
+ CPPUNIT_ASSERT_MESSAGE("Slide background is missing", aAny.hasValue());
+
+ uno::Reference< beans::XPropertySet > aXBackgroundPropSet;
+ aAny >>= aXBackgroundPropSet;
+ sal_Int32 nTransparence;
+ aAny = aXBackgroundPropSet->getPropertyValue( "FillTransparence" );
+ aAny >>= nTransparence;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Slide background transparency is wrong", sal_Int32(49), nTransparence);
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);