tdf#163803 oox: export fill on graphic object
The fill contents of a graphic object are lost when saving a pptx. Change-Id: I055d778d4a92de18dfec59bd27c63a20c08b99f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176208 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit dfd8caa6c49bd33f549a37d6c0244e4cce8f16d8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176224 Reviewed-by: Jaume Pujantell <jaume.pujantell@collabora.com> Tested-by: Jenkins
This commit is contained in:
parent
ca9e939f94
commit
5ff283e3b8
3 changed files with 17 additions and 0 deletions
BIN
oox/qa/unit/data/tdf163803_image_with_fill.pptx
Normal file
BIN
oox/qa/unit/data/tdf163803_image_with_fill.pptx
Normal file
Binary file not shown.
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue