summaryrefslogtreecommitdiffstats
path: root/vcl/source/app/svmain.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/app/svmain.cxx')
-rw-r--r--vcl/source/app/svmain.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index cf98fb8a0b6a..2624e6c32b44 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -56,6 +56,11 @@
#include <ole2.h> // for _beginthreadex
#endif
+#ifdef ANDROID
+#include <cppuhelper/bootstrap.hxx>
+#include <jni.h>
+#endif
+
// [ed 5/14/02 Add in explicit check for quartz graphics. OS X will define
// unx for both quartz and X11 graphics, but we include svunx.h only if we're
// building X11 graphics layers.
@@ -327,6 +332,23 @@ sal_Bool InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang
return sal_True;
}
+#ifdef ANDROID
+
+extern "C" __attribute__ ((visibility("default"))) void
+InitVCLWrapper()
+{
+ uno::Reference<uno::XComponentContext> xContext( cppu::defaultBootstrap_InitialComponentContext() );
+ uno::Reference<lang::XMultiComponentFactory> xFactory( xContext->getServiceManager() );
+
+ uno::Reference<lang::XMultiServiceFactory> xSM( xFactory, uno::UNO_QUERY_THROW );
+
+ comphelper::setProcessServiceFactory( xSM );
+
+ InitVCL( xSM );
+}
+
+#endif
+
namespace
{