summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/fillproperties.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-08-09 13:27:49 +0200
committerTomaž Vajngerl <quikee@gmail.com>2023-08-21 09:27:12 +0200
commit242bb3fdda5be165bd00701518df47cc1276438f (patch)
treebc61d6d7fa1b3ee628bfe2ff875c03b89728f59f /oox/source/drawingml/fillproperties.cxx
parent84b12cd3ea96ee9b02365b5239f391af242f7303 (diff)
move BGradient to awt::Gradient2 UNO conversion into docmodel
This is needed because the module dependencies are an issues if the conversion is done in basegfx. The bigger issue will come when the ComplexColor conversion will be done as basegfx can't depend on docmodel because of circular dependencies. The BGradient is also more suitable for docmodel anyway as the previously it was part of the model and is not a basic (gfx) type - however this doesn't move the whole BGradient into docmodel yet. Change-Id: Id91ce52232f89f00e09b451c13da36e2854ae14b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155674 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'oox/source/drawingml/fillproperties.cxx')
-rw-r--r--oox/source/drawingml/fillproperties.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 8cc400257155..9f18e7d65f7d 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -27,6 +27,7 @@
#include <vcl/BitmapFilter.hxx>
#include <vcl/BitmapMonochromeFilter.hxx>
#include <docmodel/uno/UnoComplexColor.hxx>
+#include <docmodel/uno/UnoGradientTools.hxx>
#include <basegfx/utils/gradienttools.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -547,7 +548,7 @@ void FillProperties::pushToPropMap(ShapePropertyMap& rPropMap, const GraphicHelp
}
// push gradient or named gradient to property map
- if (rPropMap.setProperty(ShapeProperty::FillGradient, aGradient.getAsGradient2()))
+ if (rPropMap.setProperty(ShapeProperty::FillGradient, model::gradient::createUnoGradient2(aGradient)))
{
eFillStyle = FillStyle_GRADIENT;
}
@@ -556,7 +557,7 @@ void FillProperties::pushToPropMap(ShapePropertyMap& rPropMap, const GraphicHelp
if (!aTransparencyStops.empty())
{
aGradient.SetColorStops(aTransparencyStops);
- rPropMap.setProperty(ShapeProperty::GradientTransparency, aGradient.getAsGradient2());
+ rPropMap.setProperty(ShapeProperty::GradientTransparency, model::gradient::createUnoGradient2(aGradient));
}
}
break;