diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-09-29 15:11:41 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-10-07 08:52:58 +0200 |
commit | 8fdaa15db9a9303c42184e7d3a2b32a4b5e1c340 (patch) | |
tree | ce1ba1d6a1621dcf1dff09d06621e974f55bf0e3 /svx | |
parent | 4941dced3db465d7e2e88db0864fd785a4574882 (diff) |
lok: Add posibility to change chart fill gradient
Change-Id: I942d478cd870036710390d2c03413b6fc0454038
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103619
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104034
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/xoutdev/xattr.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 682396b0de5e..b3b7a1c8d44a 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -2044,6 +2044,24 @@ XGradient XGradient::fromJSON(const OUString& rJSON) return lcl_buildGradientFromStringMap(aMap); } +css::awt::Gradient XGradient::toGradientUNO() +{ + css::awt::Gradient aGradient; + + aGradient.Style = this->GetGradientStyle(); + aGradient.StartColor = static_cast<sal_Int32>(this->GetStartColor()); + aGradient.EndColor = static_cast<sal_Int32>(this->GetEndColor()); + aGradient.Angle = static_cast<short>(this->GetAngle()); + aGradient.Border = this->GetBorder(); + aGradient.XOffset = this->GetXOffset(); + aGradient.YOffset = this->GetYOffset(); + aGradient.StartIntensity = this->GetStartIntens(); + aGradient.EndIntensity = this->GetEndIntens(); + aGradient.StepCount = this->GetSteps(); + + return aGradient; +} + XGradient::XGradient() : eStyle( css::awt::GradientStyle_LINEAR ), aStartColor( COL_BLACK ), |