summaryrefslogtreecommitdiff
path: root/cui/source/inc
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2023-06-21 15:01:20 +0200
committerRegina Henschel <rb.henschel@t-online.de>2023-06-23 10:54:24 +0200
commitbb19bda1dc620f0f8662776d9818aedf45486994 (patch)
treeb3642e60db311287a935b54d46fd7b440e2d36f0 /cui/source/inc
parent8ec8d592e31aebe19075e9f89c4c2c7abcf8d420 (diff)
tdf#155901 MCGR: preserve first and last gradient stop too
Error was, that only the in-between gradient stops were preserve. First stop was set with fixed offset 0, last stop with fixed offset 1. The offsets of first and last gradient stop of the original gradient were lost. Now in all cases (hopefully) the complete gradient stops vector is preserved and the original offset is used, if e.g. the user changes the color. For calculating transparence the indirect way over Color is removed. Instead percent is directly transformed to the 0..1 values of BColor. That avoids rounding errors. Change-Id: Icdf699a6c2e9c6289d2f77033858448e58396a60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153395 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'cui/source/inc')
-rw-r--r--cui/source/inc/cuitabarea.hxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 2d6c713236da..4e766c76e57d 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -169,7 +169,7 @@ class SvxTransparenceTabPage : public SfxTabPage
std::unique_ptr<weld::CustomWeld> m_xCtlBitmapPreview;
std::unique_ptr<weld::CustomWeld> m_xCtlXRectPreview;
- // MCGR: Preserve in-between ColorStops until we have an UI to edit these
+ // MCGR: Preserve ColorStops until we have a UI to edit these
basegfx::BColorStops maColorStops;
DECL_LINK(ClickTransOffHdl_Impl, weld::Toggleable&, void);
@@ -187,7 +187,7 @@ class SvxTransparenceTabPage : public SfxTabPage
bool InitPreview ( const SfxItemSet& rSet );
void InvalidatePreview (bool bEnable = true );
- // MCGR: Preserve in-between ColorStops until we have an UI to edit these
+ // MCGR: Preserve ColorStops until we have a UI to edit these
basegfx::BColorStops createColorStops();
public:
@@ -367,7 +367,7 @@ private:
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
- // MCGR: Preserve in-between ColorStops until we have an UI to edit these
+ // MCGR: Preserve ColorStops until we have a UI to edit these
basegfx::BColorStops m_aColorStops;
SvxXRectPreview m_aCtlPreview;
@@ -409,7 +409,7 @@ private:
void SetControlState_Impl( css::awt::GradientStyle eXGS );
sal_Int32 SearchGradientList(std::u16string_view rGradientName);
- // MCGR: Preserve in-between ColorStops until we have an UI to edit these
+ // MCGR: Preserve ColorStops until we have a UI to edit these
basegfx::BColorStops createColorStops();
public: