[Libreoffice-commits] core.git: odk/examples
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 20 09:20:48 UTC 2021
odk/examples/cpp/Draw/Draw.cxx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 3e2370260f2b79c43b4f8a86b123861aa95d3ef2
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Sep 20 09:37:26 2021 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Sep 20 11:20:13 2021 +0200
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 at redhat.com>
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: */
More information about the Libreoffice-commits
mailing list