From cd3990d1d8f212474dee1c1d989f005e4d9913a4 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Tue, 29 Sep 2020 15:11:41 +0200 Subject: lok: Add posibility to change chart fill gradient Change-Id: I942d478cd870036710390d2c03413b6fc0454038 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103619 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104808 Tested-by: Jenkins --- svx/source/xoutdev/xattr.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'svx') 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(this->GetStartColor()); + aGradient.EndColor = static_cast(this->GetEndColor()); + aGradient.Angle = static_cast(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 ), -- cgit