From 805fd61f8efaaac119bbe28ab51617c07f0d7058 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Thu, 6 Jun 2024 19:47:45 +0200 Subject: tdf#160591 PPTX export: fix colormap mapping in slide master Change-Id: I154f0ff1769fbda361ec62f1dd589ca0d7686bd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168506 Tested-by: Jenkins Reviewed-by: Nagy Tibor --- sd/qa/unit/data/pptx/tdf160591.pptx | Bin 0 -> 202978 bytes sd/qa/unit/export-tests-ooxml4.cxx | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 sd/qa/unit/data/pptx/tdf160591.pptx (limited to 'sd/qa') diff --git a/sd/qa/unit/data/pptx/tdf160591.pptx b/sd/qa/unit/data/pptx/tdf160591.pptx new file mode 100644 index 000000000000..9bc68d6ae4e9 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf160591.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml4.cxx b/sd/qa/unit/export-tests-ooxml4.cxx index fbf60274d785..63af283d664f 100644 --- a/sd/qa/unit/export-tests-ooxml4.cxx +++ b/sd/qa/unit/export-tests-ooxml4.cxx @@ -38,6 +38,29 @@ public: } }; +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testTdf160591) +{ + createSdImpressDoc("pptx/tdf160591.pptx"); + save(u"Impress Office Open XML"_ustr); + + // Char scheme color + xmlDocUniquePtr pXmlDoc1 = parseExport(u"ppt/slides/slide1.xml"_ustr); + assertXPath(pXmlDoc1, + "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:schemeClr"_ostr, + "val"_ostr, u"lt2"_ustr); + + // Master slide ColorMap + xmlDocUniquePtr pXmlDoc2 = parseExport(u"ppt/slideMasters/slideMaster1.xml"_ustr); + assertXPath(pXmlDoc2, "/p:sldMaster/p:clrMap"_ostr, "bg1"_ostr, u"dk1"_ustr); + assertXPath(pXmlDoc2, "/p:sldMaster/p:clrMap"_ostr, "tx1"_ostr, u"lt1"_ustr); + assertXPath(pXmlDoc2, "/p:sldMaster/p:clrMap"_ostr, "bg2"_ostr, u"dk2"_ustr); + assertXPath(pXmlDoc2, "/p:sldMaster/p:clrMap"_ostr, "tx2"_ostr, u"lt2"_ustr); + + // Master slide background + assertXPath(pXmlDoc2, "/p:sldMaster/p:cSld/p:bg/p:bgPr/a:solidFill/a:schemeClr"_ostr, + "val"_ostr, u"dk1"_ustr); +} + CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testSmartArtPreserve) { createSdImpressDoc("pptx/smartart-preserve.pptx"); -- cgit