[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sd/qa sd/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 6 12:36:40 UTC 2019
sd/qa/unit/data/odp/tdf127379.odp |binary
sd/qa/unit/export-tests-ooxml2.cxx | 28 ++++++++++++++++++++++++++++
sd/source/filter/eppt/pptx-epptooxml.cxx | 1 -
3 files changed, 28 insertions(+), 1 deletion(-)
New commits:
commit 86c45503a02a16f9e4987bee32f20fec29a7f7e6
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Sep 5 19:22:35 2019 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Sep 6 14:35:48 2019 +0200
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 at collabora.com>
(cherry picked from commit ced915bf4c4dfc890193bbea269ef74995ecc888)
Reviewed-on: https://gerrit.libreoffice.org/78706
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/sd/qa/unit/data/odp/tdf127379.odp b/sd/qa/unit/data/odp/tdf127379.odp
new file mode 100644
index 000000000000..91602c79623f
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf127379.odp differ
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;
More information about the Libreoffice-commits
mailing list