diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-09-05 19:22:35 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-09-06 16:50:44 +0200 |
commit | 6273b218d30d99559dcf77cf50b6788e7bca2b0b (patch) | |
tree | 4d6ebbaf0224a444b09494ab70aae52006b5166a | |
parent | 993b8a4032ddea04c5bc8fe98d98542ec03824bf (diff) |
tdf#127379: PPTX: Gradient background fill of a slide is lost during RT.
Change-Id: I149bf161f53d566d461347e00d04fc45394bc051
Reviewed-on: https://gerrit.libreoffice.org/78670
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit ced915bf4c4dfc890193bbea269ef74995ecc888)
Reviewed-on: https://gerrit.libreoffice.org/78706
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/78711
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
-rw-r--r-- | sd/qa/unit/data/odp/tdf127379.odp | bin | 0 -> 19471 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 28 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 1 |
3 files changed, 28 insertions, 1 deletions
diff --git a/sd/qa/unit/data/odp/tdf127379.odp b/sd/qa/unit/data/odp/tdf127379.odp Binary files differnew file mode 100644 index 000000000000..91602c79623f --- /dev/null +++ b/sd/qa/unit/data/odp/tdf127379.odp diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index e7797acbd498..d896796c713d 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -149,6 +149,7 @@ public: void testTdf125360_1(); void testTdf125360_2(); void testTdf127372(); + void testTdf127379(); CPPUNIT_TEST_SUITE(SdOOXMLExportTest2); @@ -221,6 +222,7 @@ public: CPPUNIT_TEST(testTdf125360_1); CPPUNIT_TEST(testTdf125360_2); CPPUNIT_TEST(testTdf127372); + CPPUNIT_TEST(testTdf127379); CPPUNIT_TEST_SUITE_END(); @@ -1894,6 +1896,32 @@ void SdOOXMLExportTest2::testTdf127372() CPPUNIT_ASSERT_EQUAL(sal_Int32(0x000000), aTransparenceGradient.EndColor); } +void SdOOXMLExportTest2::testTdf127379() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf127379.odp"), ODP); + xDocShRef = saveAndReload( xDocShRef.get(), PPTX ); + uno::Reference< drawing::XDrawPagesSupplier > xDoc( + xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW ); + CPPUNIT_ASSERT_EQUAL(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; + + drawing::FillStyle aFillStyle(drawing::FillStyle_NONE); + aXBackgroundPropSet->getPropertyValue("FillStyle") >>= aFillStyle; + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, aFillStyle); + + awt::Gradient aGradient; + CPPUNIT_ASSERT(aXBackgroundPropSet->getPropertyValue("FillGradient") >>= aGradient); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xFF0000), aGradient.StartColor); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x2A6099), aGradient.EndColor); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 366d8e4a180e..000af8dedc90 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -454,7 +454,6 @@ void PowerPointExport::ImplWriteBackground(const FSHelperPtr& pFS, const Referen mAny >>= aFillStyle; if (aFillStyle == FillStyle_NONE || - aFillStyle == FillStyle_GRADIENT || aFillStyle == FillStyle_HATCH) return; |