summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2023-06-05 17:15:34 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2023-06-09 10:17:07 +0200
commita6e72e2b314e64f3199f3eaf1ecf78157446f6dd (patch)
treee830caf26f28e3090868159687e504779759ea3c /vcl/source/control
parentbbf5f97967fb3cde25829e1c428ace31d7d5b8c7 (diff)
MCGR: tdf#155479 repair gradient SVG export for MCGR
Unfortunately SVG export is based on metafiles and thus there is (in principle) no way to get the BGradient/ColorStop/MCGR data transfered as needed. For that, using UNO API to read the model or using B2DPrimitives would help - as is better for the export respectively. Since there is not the time to re-design SVG export I added this 'compromize' as a fix. It gets the needed data transported over the metafile (that part is the compromize). It then exports the MCGR data to SVG (at least - as was already there - if it's a linear/axial gradient). This happens now with all Gradient Stops when there is a MCGR gradient. That part is/will hopefully be re-usable if SVG export gets redesigned. I also added a handling for StepCount feature, so when used (in LO, others do not have that) 'hard' color stops get generated to make the gradient look identical for SVG export. Had to make adding of that extra-information in metafiles dependent on exporting really to SVG. There are 51 cases which use 'MetaActionType::COMMENT' which would potentially have to be adapted. Also added code to solve the problem for TransparencePrimitive2D at VclMetafileProcessor2D::processTransparencePrimitive2D. This will now - also only for SVG export - directly create the needed MetaFloatTransparentAction and add additional MCGR information. This will be used on SVG export to write a 'Mask' as was done before. This is now capable of creating fill MCGR-Masks in the sense that any number of TransparencyStops will be supported. Change-Id: Ic6d022714eae96b8fbc09e60652851ac5799b757 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152623 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/fmtfield.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx
index 69497dec2c1b..fc7bdfee6f58 100644
--- a/vcl/source/control/fmtfield.cxx
+++ b/vcl/source/control/fmtfield.cxx
@@ -910,7 +910,7 @@ namespace
m_rSpinButton.SpinField::SetText(rText, rSel);
}
- virtual void SetEntryTextColor(const Color* pColor) override
+ virtual void SetEntryTextColor(const ::Color* pColor) override
{
if (pColor)
m_rSpinButton.SetControlForeground(*pColor);