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-10-05 21:55:29 +0200 |
commit | 80ba3eda8cd3c8ebbf2e49b215e2f2eb6d4b1837 (patch) | |
tree | 746957595926a2530a922ffe1c05923df7fff1f8 /svx | |
parent | 2eb685b59b63e83d6130fdd2a97ce9bbb8b26823 (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>
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 3651205de848..797867949b22 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -2050,6 +2050,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 ), |