summaryrefslogtreecommitdiff
path: root/include/oox
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2023-05-16 15:59:42 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2023-05-19 10:09:11 +0200
commit428b8a8d23e473fecf2916591615ff38611b93c9 (patch)
treeed883778d6094cb6d24a30a8fd73df16ae2a17cd /include/oox
parent286a1c03fa10acf60f076a0af987112d24cb2ff5 (diff)
MCGR: Adaptions to WriteGradientFill and BGradient
Added code to make WriteGradientFill directly use the available BGradient implementation. The goal is to never directly work on awt::Gradient2, but use BGradient & it's tooling methods. Added constructors and tooling to BGradient and BColorStops to make that easier (single line conversions between uno::Any, basesgfx classes and awt:: incarnations). Directly handle uno::Any and awt:: classes, changed stuff to make use of this. Change-Id: I083a323b9efee8ca4f3becb2966aac0a294b9a60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151842 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'include/oox')
-rw-r--r--include/oox/export/drawingml.hxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 451b3f0eaae0..872dbfd98618 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -49,6 +49,7 @@
#include <tools/color.hxx>
#include <vcl/mapmod.hxx>
#include <svx/EnhancedCustomShape2d.hxx>
+#include <basegfx/utils/bgradient.hxx>
class Graphic;
class SdrObjCustomShape;
@@ -369,16 +370,16 @@ public:
void WriteGradientFill( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
/* New API for WriteGradientFill:
- If a awt::Gradient2 is given, it will be used. Else, the 'Fix' entry will be used for
+ If a BGradient is given, it will be used. Else, the 'Fix' entry will be used for
Color or Transparency. That way, less Pseudo(Color|Transparency)Gradients have to be
created at caller side.
NOTE: Giving no Gradient at all (both nullptr) is an error.
*/
void WriteGradientFill(
- const css::awt::Gradient2* pColorGradient, sal_Int32 nFixColor,
- const css::awt::Gradient2* pTransparenceGradient, double fFixTransparence = 0.0);
+ const basegfx::BGradient* pColorGradient, sal_Int32 nFixColor,
+ const basegfx::BGradient* pTransparenceGradient, double fFixTransparence = 0.0);
- void WriteGrabBagGradientFill( const css::uno::Sequence< css::beans::PropertyValue >& aGradientStops, const css::awt::Gradient2& rGradient);
+ void WriteGrabBagGradientFill( const css::uno::Sequence< css::beans::PropertyValue >& aGradientStops, const basegfx::BGradient& rGradient);
void WriteBlipOrNormalFill(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet,
const OUString& rURLPropName, const css::awt::Size& rSize = {});