diff options
author | Justin Luth <jluth@mail.com> | 2024-02-20 16:11:08 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-02-27 08:40:50 +0100 |
commit | 38083e4c0b5638d69162593c3fbf599da6cd499f (patch) | |
tree | 3cd38a6ef659ca928351b9603bbaff1d2174d2b8 /oox | |
parent | c29d1d968acd53bd957eedc0d93bfaa620fc862b (diff) |
related tdf#126533 dml/vml import: import radials as radials
... and not as symmetrical linear gradients.
The benefit is that our export code
will be able to intelligently export it.
Apparently RTF export code does not intelligently export axials,
(now fixed - tdf#159824)
but VML and DML (and doc) do it well.
Unfortunately charts can be badly affected,
(avoided by ignoring when transparent)
and unit tests are implementation-tested...
This affects existing unit tests:
-tdf128345_Legend_CS_TG_axial.pptx: label imports fine:
lost on export (no change)
-tdf128345_ChartWall_CS_TG.pptx: wall gradient now looks axial:
lost on export (no change)
-textframe-gradient.docx: still round-trips OK: no change
-textframe-gradient.rtf: round-trips as linear: lost axial-ness
(now fixed: tdf#159824)
-fdo78663.docx: textbox font fill: still exports as solid: no change
I ran the assert check against chart2, oox, and sw
Change-Id: Ib16e9488a76b006bf335ff01a38acf7cde69cccb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163675
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/fillproperties.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index dec9ab9672cc..f24208722cb5 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -543,6 +543,8 @@ void FillProperties::pushToPropMap(ShapePropertyMap& rPropMap, const GraphicHelp // convert DrawingML angle (in 1/60000 degrees) to API angle (in 1/10 degrees) aGradient.SetAngle(Degree10(static_cast< sal_Int16 >( (8100 - (nDmlAngle / (PER_DEGREE / 10))) % 3600 ))); + if (!bContainsTransparency) + aGradient.tryToConvertToAxial(); } if (awt::GradientStyle_RECT == aGradient.GetGradientStyle()) |