[Libreoffice-commits] .: 2 commits - bean/native
Tor Lillqvist
tml at kemper.freedesktop.org
Wed Jun 29 02:43:08 PDT 2011
bean/native/win32/com_sun_star_beans_LocalOfficeWindow.c | 8 ---
bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c | 23 +++++++++-
2 files changed, 22 insertions(+), 9 deletions(-)
New commits:
commit 2c48643deb0ca265742be52c9f9a546bd3b3253f
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jun 29 12:39:08 2011 +0300
Don't use the (win32) jawt_md.h as we don't have that when cross-compiling
Just insert the trivial JAWT_GetAWT declaration and
JAWT_Win32DrawingSurfaceInfo struct definition.
diff --git a/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c b/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c
index 0f7b0d8..3707566 100644
--- a/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c
+++ b/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c
@@ -34,12 +34,33 @@
#pragma warning(pop)
#endif
+#include <windows.h>
+#define JAWT_GetAWT hidden_JAWT_GetAWT
#include "jawt.h"
+#undef JAWT_GetAWT
#if defined _MSC_VER
#pragma warning(push, 1)
#endif
-#include "jawt_md.h"
+/* When cross-compiling to Windows we don't have any Windows JDK
+ * available. Copying this short snippet from win32/jawt_md.h can
+ * surely not be against its license. The intent is to enable
+ * interoperation with real Oracle Java after all. We leave out the
+ * informative comments that might have "artistic merit" and be more
+ * copyrightable. Use this also for native Windows compilation for
+ * simplicity.
+ */
+typedef struct jawt_Win32DrawingSurfaceInfo {
+ union {
+ HWND hwnd;
+ HBITMAP hbitmap;
+ void* pbits;
+ };
+ HDC hdc;
+ HPALETTE hpalette;
+} JAWT_Win32DrawingSurfaceInfo;
+
+extern __declspec(dllimport) unsigned char __stdcall JAWT_GetAWT(JNIEnv *, JAWT *);
#if defined _MSC_VER
#pragma warning(pop)
#endif
commit 8b6b868301967e0c8690281c37099fe743da9016
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jun 29 12:37:20 2011 +0300
jawt_md.h is not needed in this file
diff --git a/bean/native/win32/com_sun_star_beans_LocalOfficeWindow.c b/bean/native/win32/com_sun_star_beans_LocalOfficeWindow.c
index 26074c5..ea37612 100644
--- a/bean/native/win32/com_sun_star_beans_LocalOfficeWindow.c
+++ b/bean/native/win32/com_sun_star_beans_LocalOfficeWindow.c
@@ -36,14 +36,6 @@
#include "jawt.h"
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include "jawt_md.h"
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-
#if defined assert
#undef assert
#endif
More information about the Libreoffice-commits
mailing list