summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/qa/unit/data/tdf163803_image_with_fill.pptxbin0 -> 9204 bytes
-rw-r--r--oox/qa/unit/export.cxx16
-rw-r--r--oox/source/export/shapes.cxx1
3 files changed, 17 insertions, 0 deletions
diff --git a/oox/qa/unit/data/tdf163803_image_with_fill.pptx b/oox/qa/unit/data/tdf163803_image_with_fill.pptx
new file mode 100644
index 000000000000..db45264fb304
--- /dev/null
+++ b/oox/qa/unit/data/tdf163803_image_with_fill.pptx
Binary files differ
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
index aff4a634bcda..63351ae79e4b 100644
--- a/oox/qa/unit/export.cxx
+++ b/oox/qa/unit/export.cxx
@@ -1416,6 +1416,22 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134401_ExportAutoGrowToTextWordWrap)
assertXPathNoAttribute(pXmlDoc, "//p:sp[1]/p:txBody/a:bodyPr", "wrap");
assertXPath(pXmlDoc, "//p:sp[2]/p:txBody/a:bodyPr", "wrap", u"none");
}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf163803_ImageFill)
+{
+ loadFromFile(u"tdf163803_image_with_fill.pptx");
+ save(u"Impress Office Open XML"_ustr);
+
+ xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/slides/slide1.xml"_ustr);
+ // Check that the fill color is saved:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // - In <>, XPath '//p:pic/p:spPr/a:solidFill' number of nodes is incorrect
+ // i.e. the <a:solidFill> element was not written.
+ assertXPath(pXmlDoc, "//p:pic/p:spPr/a:solidFill");
+ assertXPath(pXmlDoc, "//p:pic/p:spPr/a:solidFill/a:srgbClr", "val", u"000000");
+}
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 5726e445a452..a2cac3d42710 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1553,6 +1553,7 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
}
WriteShapeTransformation( xShape, XML_a, bFlipH, false, false, false, true );
WritePresetShape( "rect"_ostr );
+ WriteFill(xShapeProps);
// graphic object can come with the frame (bnc#654525)
WriteOutline( xShapeProps );