diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2023-06-21 15:01:20 +0200 |
---|---|---|
committer | Regina Henschel <rb.henschel@t-online.de> | 2023-06-23 10:54:24 +0200 |
commit | bb19bda1dc620f0f8662776d9818aedf45486994 (patch) | |
tree | b3642e60db311287a935b54d46fd7b440e2d36f0 /include/svx | |
parent | 8ec8d592e31aebe19075e9f89c4c2c7abcf8d420 (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 'include/svx')
-rw-r--r-- | include/svx/sidebar/AreaPropertyPanelBase.hxx | 4 | ||||
-rw-r--r-- | include/svx/sidebar/AreaTransparencyGradientPopup.hxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx index 8e822dfd4f47..c2c967a8333b 100644 --- a/include/svx/sidebar/AreaPropertyPanelBase.hxx +++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx @@ -151,7 +151,7 @@ protected: std::unique_ptr< XFillFloatTransparenceItem > mpFloatTransparenceItem; std::unique_ptr< SfxUInt16Item > mpTransparenceItem; - // 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_DLLPRIVATE_LINK(SelectFillTypeHdl, weld::ComboBox&, void ); @@ -169,7 +169,7 @@ protected: void SelectFillAttrHdl_Impl(); void FillStyleChanged(bool bUpdateModel); - // 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(); }; diff --git a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx index bd6b24b6c828..6caf6487417b 100644 --- a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx +++ b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx @@ -45,11 +45,11 @@ private: std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrEndValue; std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrBorder; - // 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; void InitStatus(XFillFloatTransparenceItem const* pGradientItem); - void ExecuteValueModify(sal_uInt8 nStartCol, sal_uInt8 nEndCol); + void ExecuteValueModify(); DECL_LINK(ModifiedTrgrHdl_Impl, weld::MetricSpinButton&, void); DECL_LINK(Left_Click45_Impl, const OUString&, void); DECL_LINK(Right_Click45_Impl, const OUString&, void); |