summaryrefslogtreecommitdiff
path: root/chart2/qa
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2023-06-03 14:56:29 +0200
committerRegina Henschel <rb.henschel@t-online.de>2023-06-05 17:34:57 +0200
commit6c49886ab46c53398d74610b264e5edb0332a059 (patch)
tree4be7b6fcc85f2ca9388ed0a470d035a7cb7a3c7d /chart2/qa
parent6014fd047a62e1a002cc27334e39e1d2e54e342f (diff)
tdf#155549 MCGR: Recreate 'axial' from symmetric 'linear'
When exporting a shape with an axial gradient fill to OOXML, it is converted to a linear gradient with multiple color stops. Versions before MCGR had recreated it as axial gradient on import from OOXML. But now LO is able to handle multiple color stops and so the linear gradient from OOXML is imported as linear gradient in LO. When such file is then written as ODF, the multiple color stops are in elements in extended namespace and versions before MCGR do not understand them. They show only the first and last color (which are equal) and the gradient is lost. With this patch LO converts the linear gradient back to an axial gradient on export to ODF. The exported axial gradient is rendered in a version with MCGR same as the linear gradient when opening the OOXML file. The difference is, that versions without MCGR now render an axial gradient with two colors. Change-Id: I2b416b4cdca75d8327107a4f259d63c2e6e97ac3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152574 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'chart2/qa')
-rw-r--r--chart2/qa/extras/chart2geometry.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/chart2/qa/extras/chart2geometry.cxx b/chart2/qa/extras/chart2geometry.cxx
index d52633c80814..f560d46ba054 100644
--- a/chart2/qa/extras/chart2geometry.cxx
+++ b/chart2/qa/extras/chart2geometry.cxx
@@ -340,9 +340,8 @@ void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
const OString sStart("//office:document-styles/office:styles/draw:opacity[" + sAttribute);
assertXPath(pXmlDoc2, sStart + "]", 1);
- // MCGR: Needs odf im/export for MCGR, then adapt.
- assertXPath(pXmlDoc2, sStart + " and @draw:style='linear']"); // MCGR: axial -> linear
- assertXPath(pXmlDoc2, sStart + " and @draw:start='100%']"); // MCGR: 0% -> 100%
+ assertXPath(pXmlDoc2, sStart + " and @draw:style='axial']");
+ assertXPath(pXmlDoc2, sStart + " and @draw:start='0%']");
assertXPath(pXmlDoc2, sStart + " and @draw:end='100%']");
}