From cfc1f4ea4889f768d689a0df71519e9bcb707bc0 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 5 Feb 2019 09:32:35 +0100 Subject: oox: disable gradient fill grab-bag for PPTX This was added in commit 2fcf3a871c94feeca11619ef5c8c0466ce61eb74 (ooxml: preserve gradient shape fill, 2014-01-31), and assumes that the theme colors can be preserved, as the theme definition is grab-bagged as well. But the theme is grab-bagged only for DOCX, not for PPTX, so skip gradient grab-bag for PPTX, otherwise the gradient would refer to incorrect colors in the theme. Change-Id: I98e1c67d4b10e68916f81dd7fc508eb4146d506b Reviewed-on: https://gerrit.libreoffice.org/67386 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sd/qa/unit/data/pptx/tdf94238.pptx | Bin 33928 -> 35015 bytes sd/qa/unit/export-tests-ooxml1.cxx | 6 ++++++ 2 files changed, 6 insertions(+) (limited to 'sd') diff --git a/sd/qa/unit/data/pptx/tdf94238.pptx b/sd/qa/unit/data/pptx/tdf94238.pptx index cf35ecee8d12..6f61cc5b43f1 100644 Binary files a/sd/qa/unit/data/pptx/tdf94238.pptx and b/sd/qa/unit/data/pptx/tdf94238.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index f3e167f9f16c..e7a5ec7b0f16 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -877,6 +877,12 @@ void SdOOXMLExportTest1::testTdf94238() CPPUNIT_ASSERT_EQUAL(static_cast(100), aGradient.YOffset); CPPUNIT_ASSERT_EQUAL(static_cast(39), aGradient.Border); + // Without the accompanying fix in place, this test would have failed with + // 'Expected: 0, Actual : 10592673', i.e. the start color of the gradient + // was incorrect. + CPPUNIT_ASSERT_EQUAL(static_cast(0), aGradient.StartColor); + CPPUNIT_ASSERT_EQUAL(static_cast(0x8B8B8B), aGradient.EndColor); + xDocShRef->DoClose(); } -- cgit