[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/qa sd/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 6 12:37:12 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 ad2417aa642b0847d4414cd852a75892a093b5a4
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:36:14 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/78705
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.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 e67933463c90..570096544c1a 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -203,6 +203,7 @@ public:
void testTdf125360_2();
void testSmartArtPreserve();
void testTdf127372();
+ void testTdf127379();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
@@ -289,6 +290,7 @@ public:
CPPUNIT_TEST(testTdf125360_2);
CPPUNIT_TEST(testSmartArtPreserve);
CPPUNIT_TEST(testTdf127372);
+ CPPUNIT_TEST(testTdf127379);
CPPUNIT_TEST_SUITE_END();
@@ -2262,6 +2264,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 13835deec2fe..9254d9010c34 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -442,7 +442,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