diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-09-29 15:11:41 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-11-11 09:58:11 +0100 |
commit | cd3990d1d8f212474dee1c1d989f005e4d9913a4 (patch) | |
tree | a1e4eaec70274fabdb5f978e70f0400f4f445600 /svx/source/xoutdev/xattr.cxx | |
parent | 287dff6de897ef2dfb6743cd9273cf595c1fec13 (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/+/104808
Tested-by: Jenkins
Diffstat (limited to 'svx/source/xoutdev/xattr.cxx')
-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 9d70537d188c..f8b532ab554e 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -2036,6 +2036,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 ), |