summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/export/drawingml.cxx4
-rw-r--r--sd/qa/unit/data/pptx/tdf94238.pptxbin33928 -> 35015 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx6
3 files changed, 9 insertions, 1 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 9bcf08305afd..78efe5275cfa 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -407,7 +407,9 @@ void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet )
}
// check if an ooxml gradient had been imported and if the user has modified it
- if( EqualGradients( aOriginalGradient, aGradient ) )
+ // Gradient grab-bag depends on theme grab-bag, which is implemented
+ // only for DOCX.
+ if( EqualGradients( aOriginalGradient, aGradient ) && GetDocumentType() == DOCUMENT_DOCX)
{
// If we have no gradient stops that means original gradient were defined by a theme.
if( aGradientStops.hasElements() )
diff --git a/sd/qa/unit/data/pptx/tdf94238.pptx b/sd/qa/unit/data/pptx/tdf94238.pptx
index cf35ecee8d12..6f61cc5b43f1 100644
--- a/sd/qa/unit/data/pptx/tdf94238.pptx
+++ b/sd/qa/unit/data/pptx/tdf94238.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 5e961a19b8b1..3e328682f310 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -885,6 +885,12 @@ void SdOOXMLExportTest1::testTdf94238()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(100), aGradient.YOffset);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(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<sal_Int32>(0), aGradient.StartColor);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0x8B8B8B), aGradient.EndColor);
+
xDocShRef->DoClose();
}