[Libreoffice-commits] .: Branch 'feature/androidapp' - android/qa desktop/source vcl/android vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Dec 17 08:23:14 PST 2012
android/qa/desktop/Makefile | 12 ++++++
android/qa/desktop/native-code.cxx | 2 +
android/qa/desktop/src/org/libreoffice/android/examples/LODesktop.java | 20 ++--------
desktop/source/app/app.cxx | 5 ++
desktop/source/app/sofficemain.cxx | 1
vcl/android/androidinst.cxx | 10 ++++-
vcl/source/app/svmain.cxx | 4 --
7 files changed, 33 insertions(+), 21 deletions(-)
New commits:
commit 508e5ce94814fa904c52f20e01ebab48a6015900
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon Dec 17 16:23:34 2012 +0000
more hackery - finally getting to missing components.
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 3a3562b..a8c2bc5 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -130,6 +130,18 @@ copy-stuff:
mkdir -p assets/presets/$$D ; \
echo "content" > assets/presets/$$D/stamp; \
done
+# lofficerc
+ mkdir -p assets/program/
+ echo "[Bootstrap]" > assets/program/lofficerc
+ echo "Logo=1" >> assets/program/lofficerc
+ echo "NativeProgress=1" >> assets/program/lofficerc
+ echo "URE_BOOTSTRAP=file:///assets/program/fundamentalrc" >> assets/program/lofficerc
+# echo "RTL_LOGFILE=file:///dev/log/main" >> assets/program/lofficerc
+ echo "HOME=$(APP_DATA_PATH)/files" >> assets/program/lofficerc
+ echo "OSL_SOCKET_PATH=$(APP_DATA_PATH)/files" >> assets/program/lofficerc
+# - this looks useful but breaks more than it fixes ...
+# echo "DISABLE_EXTENSION_SYNCHRONIZATION=1" >> assets/program/lofficerc
+
setup-jars:
#
diff --git a/android/qa/desktop/native-code.cxx b/android/qa/desktop/native-code.cxx
index e9298e0..566daac 100644
--- a/android/qa/desktop/native-code.cxx
+++ b/android/qa/desktop/native-code.cxx
@@ -36,6 +36,7 @@ extern "C"
extern void * sdd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * smd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
+ extern void * spl_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * spell_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * svgfilter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
@@ -83,6 +84,7 @@ lo_get_libmap(void)
{ "libsdlo.a", sd_component_getFactory },
{ "libsmdlo.a", smd_component_getFactory },
{ "libsmlo.a", sm_component_getFactory },
+ { "libspllo.a", spl_component_getFactory },
{ "libsvgfilterlo.a", svgfilter_component_getFactory },
{ "libswdlo.a", swd_component_getFactory },
{ "libswlo.a", sw_component_getFactory },
diff --git a/android/qa/desktop/src/org/libreoffice/android/examples/LODesktop.java b/android/qa/desktop/src/org/libreoffice/android/examples/LODesktop.java
index 287dbb6..bf370e6 100644
--- a/android/qa/desktop/src/org/libreoffice/android/examples/LODesktop.java
+++ b/android/qa/desktop/src/org/libreoffice/android/examples/LODesktop.java
@@ -240,17 +240,6 @@ public class LODesktop
bootstrapContext.mcf = bootstrapContext.componentContext.getServiceManager();
Log.i(TAG, "mcf is" + (bootstrapContext.mcf!=null ? " not" : "") + " null");
-
- Bootstrap.initVCL();
-
- Object desktop = bootstrapContext.mcf.createInstanceWithContext
- ("com.sun.star.frame.Desktop", bootstrapContext.componentContext);
-
- Log.i(TAG, "desktop is" + (desktop!=null ? " not" : "") + " null");
-
- bootstrapContext.componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop);
-
- Log.i(TAG, "componentLoader is" + (bootstrapContext.componentLoader!=null ? " not" : "") + " null");
}
catch (Exception e)
{
@@ -267,9 +256,11 @@ public class LODesktop
Log.i(TAG, "onCreate - added here\n");
try {
- String input = getIntent().getStringExtra("input");
- if (input == null)
- input = "/assets/test1.odt";
+ String input;
+// input = getIntent().getStringExtra("input");
+// if (input == null)
+// input = "/assets/test1.odt";
+ input = "-writer";
// We need to fake up an argv, and the argv[0] even needs to
// point to some file name that we can pretend is the "program".
@@ -284,7 +275,6 @@ public class LODesktop
initBootstrapContext();
spawnMain();
-
}
catch (Exception e) {
e.printStackTrace(System.err);
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index a70030e..3e88a42 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -584,9 +584,12 @@ void Desktop::Init()
}
}
- if ( m_aBootstrapError == BE_OK )
+ fprintf( stderr, "OfficeIPCThread %d ...\n", m_aBootstrapError == BE_OK );
+
+ if ( 1 )
{
const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
+
// start ipc thread only for non-remote offices
RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) ::OfficeIPCThread::EnableOfficeIPCThread" );
OfficeIPCThread::Status aStatus = OfficeIPCThread::EnableOfficeIPCThread();
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx
index 69697c9..1271da8 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -100,6 +100,7 @@ public:
nRet = soffice_main();
fprintf( stderr, "nRet %d\n", nRet );
} while (nRet == 81 || nRet == 79); // pretend to re-start.
+ exit (nRet);
}
};
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 85b8a0f..d7b5ea4 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -38,6 +38,8 @@
#include <rtl/strbuf.hxx>
#include <basebmp/scanlineformats.hxx>
+static bool bHitIdle = false;
+
class AndroidSalData : public SalGenericData
{
public:
@@ -297,7 +299,6 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow, ANativeWindow_Buf
for (int32_t x = 0; x < aOutBuffer.stride; x++)
*p++ = (y << 24) + (x << 10) + 0xff ;
}
-
#endif
int i = 0;
std::list< SalFrame* >::const_iterator it;
@@ -639,6 +640,10 @@ void AndroidSalInstance::Wakeup()
void AndroidSalInstance::DoReleaseYield (int nTimeoutMS)
{
+ if (!bHitIdle)
+ fprintf( stderr, "hit idle !\n" );
+ bHitIdle = true;
+
// Presumably this should never be called at all except in
// NativeActivity-based apps with a GUI, like android/qa/desktop, where
// the message pump is run here in vcl?
@@ -889,6 +894,9 @@ Java_org_libreoffice_android_examples_LODesktop_renderVCL(JNIEnv *env,
jobject /* dummy */,
jobject bitmap)
{
+ if (!bHitIdle)
+ return;
+
AndroidBitmapInfo info;
void* pixels;
int ret;
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 57367fb..31717c7 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -153,11 +153,7 @@ int ImplSVMain()
int nReturn = EXIT_FAILURE;
-#if 1 // android
- sal_Bool bInit = true; // already inited by Bootstrap.
-#else
sal_Bool bInit = InitVCL();
-#endif
fprintf (stderr, "init vcl %d\n", bInit);
More information about the Libreoffice-commits
mailing list