[Libreoffice-commits] .: android/Bootstrap android/experimental sal/android ucbhelper/Library_ucbhelper.mk ucbhelper/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 19 11:41:12 PDT 2012


 android/Bootstrap/src/org/libreoffice/android/Bootstrap.java                                 |    4 
 android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java |    2 
 android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java     |    4 
 android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java   |    2 
 sal/android/lo-bootstrap.c                                                                   |   21 ---
 ucbhelper/Library_ucbhelper.mk                                                               |    1 
 ucbhelper/source/client/contentbroker.cxx                                                    |   58 ----------
 7 files changed, 1 insertion(+), 91 deletions(-)

New commits:
commit e989d167485e1e15d0aedef600ee450f01382382
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Sep 19 18:38:27 2012 +0100

    dung out no longer needed initUCBHelper methods; thanks to sberg.

diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
index 8c635d4..b97adfb 100644
--- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
+++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
@@ -98,10 +98,6 @@ public class Bootstrap extends NativeActivity
     // where the lo-bootstrap library is.
     public static native void setCommandArgs(String[] argv);
 
-    // 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();
 
diff --git a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index 39a8f01..638c9b9 100644
--- a/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ b/android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -968,8 +968,6 @@ public class DocumentLoader
 
             Log.i(TAG, "desktop is" + (desktop!=null ? " not" : "") + " null");
 
-            Bootstrap.initUCBHelper();
-
             componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop);
 
             Log.i(TAG, "componentLoader is" + (componentLoader!=null ? " not" : "") + " null");
diff --git a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
index 9f9790c..5fc3fad 100644
--- a/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
+++ b/android/experimental/LibreOffice4Android/src/org/libreoffice/android/DocumentLoader.java
@@ -998,8 +998,6 @@ public class DocumentLoader
 
             Log.i(TAG, "desktop is" + (desktop!=null ? " not" : "") + " null");
 
-            Bootstrap.initUCBHelper();
-
             componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop);
 
             Log.i(TAG, "componentLoader is" + (componentLoader!=null ? " not" : "") + " null");
@@ -1021,7 +1019,7 @@ public class DocumentLoader
                 flipper.addView(new PageViewer(i+1), i+1, matchParent);
             for (int i = 0; i < PAGECACHE_PLUSMINUS; i++)
                 flipper.addView(new PageViewer(-1), PAGECACHE_PLUSMINUS + i+1, matchParent);
-                
+
             ll = (LinearLayout)findViewById( R.id.navigator);
             inflater = (LayoutInflater) getApplicationContext().getSystemService(
 				Context.LAYOUT_INFLATER_SERVICE);
diff --git a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
index c0f4c4d..70ca6f6 100644
--- a/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/experimental/LibreOffice4Android/src/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -776,8 +776,6 @@ class ListItemAdapter implements ListAdapter{
 
                     Log.i(TAG, "desktop is" + (desktop!=null ? " not" : "") + " null");
 
-                    Bootstrap.initUCBHelper();
-
                     componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop);
 
                     Log.i(TAG, "componentLoader is" + (componentLoader!=null ? " not" : "") + " null");
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index 8cebea9..07f6a27 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -1616,27 +1616,6 @@ Java_org_libreoffice_android_Bootstrap_setCommandArgs(JNIEnv* env,
     (*osl_setCommandArgs)(c_argc, c_argv);
 }
 
-// public static native void initUCBhelper();
-
-__attribute__ ((visibility("default")))
-void
-Java_org_libreoffice_android_Bootstrap_initUCBHelper(JNIEnv* env,
-                                                     jobject clazz)
-{
-    void (*InitUCBHelper)(void);
-    (void) env;
-    (void) clazz;
-
-    /* This obviously should be called only after the ucbhelper so has been loaded */
-
-    InitUCBHelper = dlsym(RTLD_DEFAULT, "InitUCBHelper");
-    if (InitUCBHelper == NULL) {
-        LOGE("InitUCBHelper: InitUCBHelper not found");
-        return;
-    }
-    (*InitUCBHelper)();
-}
-
 __attribute__ ((visibility("default")))
 jint
 Java_org_libreoffice_android_Bootstrap_createWindowFoo(JNIEnv* env,
diff --git a/ucbhelper/Library_ucbhelper.mk b/ucbhelper/Library_ucbhelper.mk
index 0c761a6..e5a61fd 100644
--- a/ucbhelper/Library_ucbhelper.mk
+++ b/ucbhelper/Library_ucbhelper.mk
@@ -30,7 +30,6 @@ $(eval $(call gb_Library_add_exception_objects,ucbhelper,\
     ucbhelper/source/client/activedatastreamer \
     ucbhelper/source/client/commandenvironment \
     ucbhelper/source/client/content \
-    ucbhelper/source/client/contentbroker \
     ucbhelper/source/client/fileidentifierconverter \
     ucbhelper/source/client/interceptedinteraction \
     ucbhelper/source/client/proxydecider \
diff --git a/ucbhelper/source/client/contentbroker.cxx b/ucbhelper/source/client/contentbroker.cxx
deleted file mode 100644
index 4af05c6..0000000
--- a/ucbhelper/source/client/contentbroker.cxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "sal/config.h"
-
-#ifdef ANDROID
-
-#include <com/sun/star/ucb/UniversalContentBroker.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <cppuhelper/bootstrap.hxx>
-
-using namespace com::sun::star::ucb;
-using namespace com::sun::star::uno;
-
-//TODO: Is this relevant still?
-extern "C" __attribute__ ((visibility("default"))) void
-InitUCBHelper()
-{
-    Reference< XComponentContext > xCtx;
-    try
-    {
-        xCtx = ::cppu::defaultBootstrap_InitialComponentContext();
-    }
-    catch( Exception& )
-    {
-    }
-
-    if( !xCtx.is() )
-    {
-        fprintf( stderr,
-                 "Could not bootstrap UNO, installation must be in disorder. Exiting.\n" );
-        exit( 1 );
-    }
-
-    // Create UCB (for backwards compatibility, in case some code still uses
-    // plain createInstance w/o args directly to obtain an instance):
-    UniversalContentBroker::create( xCtx );
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list