android/Bootstrap/Makefile.shared                                              
            |    3 
 android/experimental/DocumentLoader/Makefile                                   
            |    1 
 android/experimental/LibreOffice4Android/Makefile                              
            |  123 ++--------
 android/experimental/LibreOffice4Android/native-code.cxx                       
            |  100 ++++++++
 
android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
   |    6 
 
android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 |    5 
 6 files changed, 129 insertions(+), 109 deletions(-)

New commits:
commit 9aa37822a8edd9734993e83da1c9a36709b4f3bb
Author: Tor Lillqvist <t...@iki.fi>
Date:   Tue Oct 9 17:59:24 2012 +0300

    Drop confusing comment
    
    Change-Id: Ic702abecf1bd21893bd5d4dee532d2e342985e6e

diff --git a/android/experimental/DocumentLoader/Makefile 
b/android/experimental/DocumentLoader/Makefile
index 28ecce6..d9e7c88 100644
--- a/android/experimental/DocumentLoader/Makefile
+++ b/android/experimental/DocumentLoader/Makefile
@@ -183,7 +183,6 @@ uninstall:
        $(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
 
 run:
-# /data/local/tmp/sample-document.odt
        adb shell am start -n org.libreoffice.android.examples/.DocumentLoader 
-e input /assets/test1.odt
 
 
commit 5d7abe5e6b4c7997bdb4230f5ff34073c94b7ada
Author: Tor Lillqvist <t...@iki.fi>
Date:   Tue Oct 9 17:59:10 2012 +0300

    COPYSO should not be used with DISABLE_DYNLOADING
    
    Change-Id: I0e04cd8fe35a487b85cd3abd420d24ab2a55821a

diff --git a/android/Bootstrap/Makefile.shared 
b/android/Bootstrap/Makefile.shared
index f1a7aa9..e0bd143 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -15,8 +15,7 @@ SODEST=libs/$(ANDROID_APP_ABI)
 OBJLOCAL=obj/local/$(ANDROID_APP_ABI)
 
 define COPYSO
-cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if 
$(2),/$(2),/$(notdir $(1))) && \
-cp $(1) $(OBJLOCAL)$(if $(2),/$(2))
+       $(error COPYSO should not be used now with DISABLE_DYNLOADING)
 endef
 
 define COPYJAR
commit 8a245b3112f1914b373e6752171973e8a97cd98a
Author: Tor Lillqvist <t...@iki.fi>
Date:   Tue Oct 9 17:45:27 2012 +0300

    Adapt to disable-dynloading style
    
    No need to load any native libraries here any more.
    
    For now, using the same native-code.cxx as over in ../DocumentLoader
    works. In other words, we end up with the same code in
    liblo-native-code.so. This will obviously change if/when the UNO APIs
    that are called start to differ.
    
    Change-Id: Ia47ce833c5a290a93986005f92e981c89f63bf71

diff --git a/android/experimental/LibreOffice4Android/Makefile 
b/android/experimental/LibreOffice4Android/Makefile
index 3f0be60..f81e814 100644
--- a/android/experimental/LibreOffice4Android/Makefile
+++ b/android/experimental/LibreOffice4Android/Makefile
@@ -1,102 +1,36 @@
 include ../../../config_host.mk
-include ../../Bootstrap/Makefile.shared
 
-# The package of this app
-APP_PACKAGE=org.libreoffice
+LIBS = \
+  -Wl,--start-group \
+  $(wildcard $(OUTDIR)/lib/lib*.a) \
+  -Wl,--end-group
+
+WHOLELIBS = \
+  -Wl,--whole-archive \
+  $(addprefix -l,$(strip \
+       juh \
+  )) \
+  -Wl,--no-whole-archive
 
 # The default target just builds.
 
 all: build-ant
 
+include ../../Bootstrap/Makefile.shared
+
+# The package of this app
+APP_PACKAGE=org.libreoffice
+
+link-so:
+# Build the single .so for this app
+       mkdir -p $(OBJLOCAL)
+       $(CXX) -Wl,--stats -Wl,--no-keep-files-mapped -Wl,--no-undefined 
-DANDROID -DDISABLE_DYNLOADING -shared -o $(OBJLOCAL)/liblo-native-code.so 
-I$(OUTDIR)/inc native-code.cxx -L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) 
-lgnustl_static -landroid -llog -lz
+       mkdir -p $(SODEST)
+       cp $(OBJLOCAL)/liblo-native-code.so $(SODEST)
+       $(STRIP) --strip-debug $(SODEST)/liblo-native-code.so
+
 copy-stuff:
-# First always clean
-       rm -rf libs $(OBJLOCAL)
-       mkdir -p $(SODEST) $(OBJLOCAL)
-#
-# Copy shared libraries (including UNO components) we need to
-# libs/$(ANDROID_APP_ABI) so that ant will include them in the .apk.
-#
-# Copy them to obj/local/$(ANDROID_APP_ABI), too, where gdb will look for
-# them.
-#
-       for F in $(strip \
-                  basegfxlo \
-                  bootstrap.uno \
-                  chartcontrollerlo \
-                  chartcorelo \
-                  comphelpgcc3 \
-                  dbaxmllo \
-                  dbtoolslo \
-                  expwrap.uno \
-                  frmlo \
-                  gcc3_uno \
-                  i18nisolang1gcc3 \
-                  icudatalo \
-                  icui18nlo \
-                  iculelo \
-                  icuuclo \
-                  introspection.uno \
-                  java_uno \
-                  juh \
-                  juhx \
-                  jvmaccessgcc3 \
-                  jvmfwk \
-                  libotouchlo \
-                  lo-bootstrap \
-                  localedata_en \
-                  localedata_es \
-                  localedata_euro \
-                  localedata_others \
-                  lwpftlo \
-                  mergedlo \
-                  msfilterlo \
-                  mswordlo \
-                  ooxlo \
-                  reflection.uno \
-                  reg \
-                  sclo \
-                  sclo \
-                  scdlo \
-                  scfiltlo \
-                  sdlo \
-                  sddlo \
-                  smdlo \
-                  stocservices.uno \
-                  store \
-                  svgfilterlo \
-                  swdlo \
-                  swlo \
-                  swdlo \
-                  t602filterlo \
-                  textinstream.uno \
-                  tllo \
-                  ucbhelper4gcc3 \
-                  ucppkg1 \
-                  uno_cppu \
-                  uno_cppuhelpergcc3 \
-                  uno_sal \
-                  uno_salhelpergcc3 \
-                  uno_cppuhelpergcc3 \
-                  unordflo \
-                  unoxmllo \
-                  vbahelperlo \
-                  vbaswobj.uno \
-                  wpftdrawlo \
-                  wpftwriterlo \
-                  xml2 \
-                  xmlfdlo \
-                  xmlreader \
-                  xmlsecurity \
-                  xoflo \
-                  xslt \
-                 ); do \
-           $(call COPYSO,$(OUTDIR)/lib/lib$${F}.so); \
-       done
-#
-# Then the shared GNU C++ library
-       $(call 
COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ANDROID_APP_ABI)/libgnustl_shared.so)
-#
-# Then other "assets". Let the directory structure under assets mimic
+# Then "assets". Let the directory structure under assets mimic
 # that under solver for now.
 #
 # Please note that I have no idea what all of this is really necessary and for
@@ -195,10 +129,11 @@ copy-stuff:
 #
 # Then gdbserver and gdb.setup so that we can debug with ndk-gdb.
 #
+       mkdir -p $(SODEST)
        cp $(ANDROID_NDK_GDBSERVER) $(SODEST)
        echo set solib-search-path ./obj/local/$(ANDROID_APP_ABI) 
>$(SODEST)/gdb.setup
 
-build-ant: copy-stuff properties
+build-ant: copy-stuff link-so properties
        echo sdk.dir=$(ANDROID_SDK_HOME) >../../abs-lib/local.properties
 # ActionBarSherlock uses the v4 support library, apparently one needs to copy
 # it like this for it to be found
@@ -221,6 +156,4 @@ build-ant: copy-stuff properties
        unset JAVA_HOME && $(ANT) debug
 
 run:
-# /data/local/tmp/sample-document.odt
-# add -e lo-strace to strace
-       adb shell am start -n $(APP_PACKAGE)/.ui.LibreOfficeUIActivity  -e 
lo-strace -e input /assets/test1.odt
+       adb shell am start -n $(APP_PACKAGE)/.ui.LibreOfficeUIActivity -e input 
/assets/test1.odt
diff --git a/android/experimental/LibreOffice4Android/native-code.cxx 
b/android/experimental/LibreOffice4Android/native-code.cxx
new file mode 100644
index 0000000..d4ef4b0
--- /dev/null
+++ b/android/experimental/LibreOffice4Android/native-code.cxx
@@ -0,0 +1,100 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "osl/detail/android-bootstrap.h"
+
+extern "C"
+{
+    extern void * avmedia_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * dbaxml_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * evtatt_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * fileacc_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * frm_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * fsstorage_component_getFactory( const char * pImplName, void 
* pServiceManager, void * pRegistryKey );
+    extern void * fwk_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * fwl_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * fwm_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * hwp_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * hyphen_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * lng_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * lnth_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * lotuswordpro_component_getFactory( const char * pImplName, 
void * pServiceManager, void * pRegistryKey );
+    extern void * oox_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * sb_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * sc_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * scd_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * scfilt_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * sd_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    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 * svgfilter_component_getFactory( const char * pImplName, void 
* pServiceManager, void * pRegistryKey );
+    extern void * sw_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * swd_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * t602filter_component_getFactory( const char * pImplName, 
void * pServiceManager, void * pRegistryKey );
+    extern void * textfd_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * unoxml_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * unordf_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * wpftdraw_component_getFactory( const char * pImplName, void 
* pServiceManager, void * pRegistryKey );
+    extern void * wpftwriter_component_getFactory( const char * pImplName, 
void * pServiceManager, void * pRegistryKey );
+    extern void * xmlfd_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * xmlsecurity_component_getFactory( const char * pImplName, 
void * pServiceManager, void * pRegistryKey );
+    extern void * xo_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+    extern void * xof_component_getFactory( const char * pImplName, void * 
pServiceManager, void * pRegistryKey );
+}
+
+extern "C"
+__attribute__ ((visibility("default")))
+const lib_to_component_mapping *
+lo_get_libmap(void)
+{
+    static lib_to_component_mapping map[] = {
+        { "libavmedialo.a", avmedia_component_getFactory },
+        { "libdbaxmllo.a", dbaxml_component_getFactory },
+        { "libevtattlo.a", evtatt_component_getFactory },
+        { "libfileacc.a", fileacc_component_getFactory },
+        { "libfrmlo.a", frm_component_getFactory },
+        { "libfsstorage.uno.a", fsstorage_component_getFactory },
+        { "libfwklo.a", fwk_component_getFactory },
+        { "libfwllo.a", fwl_component_getFactory },
+        { "libfwmlo.a", fwm_component_getFactory },
+        { "libhwplo.a", hwp_component_getFactory },
+        { "libhyphenlo.a", hyphen_component_getFactory },
+        { "liblnglo.a", lng_component_getFactory },
+        { "liblnthlo.a", lnth_component_getFactory },
+        { "liblwpftlo.a", lotuswordpro_component_getFactory },
+        { "libooxlo.a", oox_component_getFactory },
+        { "libscdlo.a", scd_component_getFactory },
+        { "libscfiltlo.a", scfilt_component_getFactory },
+        { "libsblo.a", sb_component_getFactory },
+        { "libsclo.a", sc_component_getFactory },
+        { "libsddlo.a", sdd_component_getFactory },
+        { "libsdlo.a", sd_component_getFactory },
+        { "libsmdlo.a", smd_component_getFactory },
+        { "libsmlo.a", sm_component_getFactory },
+        { "libsvgfilterlo.a", svgfilter_component_getFactory },
+        { "libswdlo.a", swd_component_getFactory },
+        { "libswlo.a", sw_component_getFactory },
+        { "libt602filterlo.a", t602filter_component_getFactory },
+        { "libtextfdlo.a", textfd_component_getFactory },
+        { "libunordflo.a", unordf_component_getFactory },
+        { "libunoxmllo.a", unoxml_component_getFactory },
+        { "libwpftdrawlo.a", wpftdraw_component_getFactory },
+        { "libwpftwriterlo.a", wpftwriter_component_getFactory },
+        { "libxmlfdlo.a", xmlfd_component_getFactory },
+        { "libxmlsecurity.a", xmlsecurity_component_getFactory },
+        { "libxoflo.a", xof_component_getFactory },
+        { "libxolo.a", xo_component_getFactory },
+        { NULL, NULL }
+    };
+
+    return map;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
index 9f9790c..ede9980 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
@@ -961,12 +961,6 @@ public class DocumentLoader
             // Avoid all the old style OSL_TRACE calls especially in vcl
             Bootstrap.putenv("SAL_LOG=+WARN+INFO-INFO.legacy.osl");
 
-            // Load a lot of shlibs here explicitly in advance because that
-            // makes debugging work better, sigh
-            Bootstrap.dlopen("libmergedlo.so");
-            Bootstrap.dlopen("libswdlo.so");
-            Bootstrap.dlopen("libswlo.so");
-            
             // Log.i(TAG, "Sleeping NOW");
             // Thread.sleep(20000);
 
diff --git 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
index c0f4c4d..86c3080 100644
--- 
a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ 
b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -139,11 +139,6 @@ public class LibreOfficeUIActivity extends 
SherlockActivity implements ActionBar
 
         Bootstrap.putenv("SAL_LOG=yes");
 
-        // Load a lot of shlibs here explicitly in advance because that
-        // makes debugging work better, sigh
-        Bootstrap.dlopen("libmergedlo.so");
-        Bootstrap.dlopen("libswdlo.so");
-        Bootstrap.dlopen("libswlo.so");
     }
     
     public void createUI(){
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to