summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-09-20 09:37:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-09-20 11:20:13 +0200
commit3e2370260f2b79c43b4f8a86b123861aa95d3ef2 (patch)
tree0f5d0449d84e577ffbac604fd2a261abf2c76fae
parent499e4b2e56282fe2df9f6383652359206d2c9fcf (diff)
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 <sbergman@redhat.com>
-rw-r--r--odk/examples/cpp/Draw/Draw.cxx9
1 files changed, 5 insertions, 4 deletions
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 <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/drawing/XDrawPages.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/util/Color.hpp>
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<XComponent> openDraw(Reference<XComponentContext> xComponentContext);
Reference<XShape> createShape(Reference<XComponent> xDocComp, int height, int width, int x, int y,
- OUString kind, int col);
+ OUString kind, css::util::Color col);
Reference<XShapeGroup> createSequence(Reference<XComponent> xDocComp, Reference<XDrawPage> xDP);
int main()
@@ -126,7 +127,7 @@ Reference<XComponent> openDraw(Reference<XComponentContext> xContext)
}
Reference<XShape> createShape(Reference<XComponent> 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<XShapeGroup> createSequence(Reference<XComponent> 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: */