diff options
-rw-r--r-- | android/Bootstrap/src/org/libreoffice/android/Bootstrap.java | 5 | ||||
-rw-r--r-- | sal/android/lo-bootstrap.c | 19 | ||||
-rw-r--r-- | vcl/source/window/wrkwin.cxx | 10 |
3 files changed, 33 insertions, 1 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java index a799f44175c1..25fded86dfc4 100644 --- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java +++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java @@ -97,10 +97,13 @@ public class Bootstrap extends NativeActivity // where the lo-bootstrap library is. public static native void setCommandArgs(String[] argv); - // A wrapper for InitUCBHelper() in he ucbhelper library + // A wrapper for InitUCBHelper() in the ucbhelper library // (contentbroker.cxx), also this called indirectly through the lo-bootstrap library public static native void initUCBHelper(); + // A wrapper for createWindowFoo() in the vcl library + public static native int createWindowFoo(); + // A method that starts a thread to redirect stdout and stderr writes to // the Android logging mechanism, or stops the redirection. public static native boolean redirect_stdio(boolean state); diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c index a180e62eb434..9adadef636ce 100644 --- a/sal/android/lo-bootstrap.c +++ b/sal/android/lo-bootstrap.c @@ -1633,6 +1633,25 @@ Java_org_libreoffice_android_Bootstrap_initUCBHelper(JNIEnv* env, (*InitUCBHelper)(); } +__attribute__ ((visibility("default"))) +jint +Java_org_libreoffice_android_Bootstrap_createWindowFoo(JNIEnv* env, + jobject clazz) +{ + int (*createWindowFoo)(void); + (void) env; + (void) clazz; + + lo_dlopen("libvcllo.so"); + createWindowFoo = dlsym(RTLD_DEFAULT, "createWindowFoo"); + if (createWindowFoo == NULL) { + LOGE("createWindowFoo: createWindowFoo not found"); + return 0; + } + return (*createWindowFoo)(); +} + + /* Code for reading lines from the pipe based on the (Apache-licensed) Android * logwrapper.c */ diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx index 64381456db48..a4f79d29ee32 100644 --- a/vcl/source/window/wrkwin.cxx +++ b/vcl/source/window/wrkwin.cxx @@ -107,6 +107,16 @@ WorkWindow::WorkWindow( WindowType nType ) : ImplInitWorkWindowData(); } +#ifdef ANDROID + +extern "C" void * +createWindowFoo(void) +{ + return (void*) new WorkWindow((Window *)NULL); +} + +#endif + // ----------------------------------------------------------------------- WorkWindow::WorkWindow( Window* pParent, WinBits nStyle ) : |