From 3e2370260f2b79c43b4f8a86b123861aa95d3ef2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 20 Sep 2021 09:37:26 +0200 Subject: Fix type of css.drawing.FillProperties FillColor property (where css.util.Color is a typedef for UNOIDL LONG). This caused issues on Windows, where in C/C++ sal_Int32 is a typedef for long rather than int. Change-Id: Ic0407674d06a219210d7f0448100005d7135eb79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122340 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- odk/examples/cpp/Draw/Draw.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'odk') diff --git a/odk/examples/cpp/Draw/Draw.cxx b/odk/examples/cpp/Draw/Draw.cxx index 511869fd1370..0e0f7ab41603 100644 --- a/odk/examples/cpp/Draw/Draw.cxx +++ b/odk/examples/cpp/Draw/Draw.cxx @@ -35,6 +35,7 @@ #include #include #include +#include using namespace std; using namespace cppu; @@ -49,10 +50,10 @@ using namespace css::drawing; using namespace css::awt; using namespace css::container; -int getCol(int r, int g, int b); +css::util::Color getCol(int r, int g, int b); Reference openDraw(Reference xComponentContext); Reference createShape(Reference xDocComp, int height, int width, int x, int y, - OUString kind, int col); + OUString kind, css::util::Color col); Reference createSequence(Reference xDocComp, Reference xDP); int main() @@ -126,7 +127,7 @@ Reference openDraw(Reference xContext) } Reference createShape(Reference xDocComp, int height, int width, int x, int y, - OUString kind, int col) + OUString kind, css::util::Color col) { // kind can be either 'Ellipse', 'Line' or 'Rectangle' Size size; @@ -230,6 +231,6 @@ Reference createSequence(Reference xDocComp, Reference< return xSGrouper->group(xShapes); } -int getCol(int r, int g, int b) { return r * 65536 + g * 256 + b; } +css::util::Color getCol(int r, int g, int b) { return r * 65536 + g * 256 + b; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3