summaryrefslogtreecommitdiff
path: root/oox/qa
diff options
context:
space:
mode:
authorJaume Pujantell <jaume.pujantell@collabora.com>2024-11-07 12:52:31 +0100
committerJaume Pujantell <jaume.pujantell@collabora.com>2024-11-08 15:19:27 +0100
commit5ff283e3b841230a45715e48a251c3c4216d1cec (patch)
tree5c900d0cb52bc34b80c8b04b5af4f566fe0b0282 /oox/qa
parentca9e939f9481a092ca585da292d03c1c3308ed7f (diff)
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
Diffstat (limited to 'oox/qa')
-rw-r--r--oox/qa/unit/data/tdf163803_image_with_fill.pptxbin0 -> 9204 bytes
-rw-r--r--oox/qa/unit/export.cxx16
2 files changed, 16 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();