Kaydet (Commit) e989d167 authored tarafından Michael Meeks's avatar Michael Meeks

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

üst a48d072f
...@@ -98,10 +98,6 @@ public class Bootstrap extends NativeActivity ...@@ -98,10 +98,6 @@ public class Bootstrap extends NativeActivity
// where the lo-bootstrap library is. // where the lo-bootstrap library is.
public static native void setCommandArgs(String[] argv); 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 // A wrapper for createWindowFoo() in the vcl library
public static native int createWindowFoo(); public static native int createWindowFoo();
......
...@@ -968,8 +968,6 @@ public class DocumentLoader ...@@ -968,8 +968,6 @@ public class DocumentLoader
Log.i(TAG, "desktop is" + (desktop!=null ? " not" : "") + " null"); Log.i(TAG, "desktop is" + (desktop!=null ? " not" : "") + " null");
Bootstrap.initUCBHelper();
componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop); componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop);
Log.i(TAG, "componentLoader is" + (componentLoader!=null ? " not" : "") + " null"); Log.i(TAG, "componentLoader is" + (componentLoader!=null ? " not" : "") + " null");
......
...@@ -998,8 +998,6 @@ public class DocumentLoader ...@@ -998,8 +998,6 @@ public class DocumentLoader
Log.i(TAG, "desktop is" + (desktop!=null ? " not" : "") + " null"); Log.i(TAG, "desktop is" + (desktop!=null ? " not" : "") + " null");
Bootstrap.initUCBHelper();
componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop); componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop);
Log.i(TAG, "componentLoader is" + (componentLoader!=null ? " not" : "") + " null"); Log.i(TAG, "componentLoader is" + (componentLoader!=null ? " not" : "") + " null");
...@@ -1021,7 +1019,7 @@ public class DocumentLoader ...@@ -1021,7 +1019,7 @@ public class DocumentLoader
flipper.addView(new PageViewer(i+1), i+1, matchParent); flipper.addView(new PageViewer(i+1), i+1, matchParent);
for (int i = 0; i < PAGECACHE_PLUSMINUS; i++) for (int i = 0; i < PAGECACHE_PLUSMINUS; i++)
flipper.addView(new PageViewer(-1), PAGECACHE_PLUSMINUS + i+1, matchParent); flipper.addView(new PageViewer(-1), PAGECACHE_PLUSMINUS + i+1, matchParent);
ll = (LinearLayout)findViewById( R.id.navigator); ll = (LinearLayout)findViewById( R.id.navigator);
inflater = (LayoutInflater) getApplicationContext().getSystemService( inflater = (LayoutInflater) getApplicationContext().getSystemService(
Context.LAYOUT_INFLATER_SERVICE); Context.LAYOUT_INFLATER_SERVICE);
......
...@@ -776,8 +776,6 @@ class ListItemAdapter implements ListAdapter{ ...@@ -776,8 +776,6 @@ class ListItemAdapter implements ListAdapter{
Log.i(TAG, "desktop is" + (desktop!=null ? " not" : "") + " null"); Log.i(TAG, "desktop is" + (desktop!=null ? " not" : "") + " null");
Bootstrap.initUCBHelper();
componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop); componentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, desktop);
Log.i(TAG, "componentLoader is" + (componentLoader!=null ? " not" : "") + " null"); Log.i(TAG, "componentLoader is" + (componentLoader!=null ? " not" : "") + " null");
......
...@@ -1616,27 +1616,6 @@ Java_org_libreoffice_android_Bootstrap_setCommandArgs(JNIEnv* env, ...@@ -1616,27 +1616,6 @@ Java_org_libreoffice_android_Bootstrap_setCommandArgs(JNIEnv* env,
(*osl_setCommandArgs)(c_argc, c_argv); (*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"))) __attribute__ ((visibility("default")))
jint jint
Java_org_libreoffice_android_Bootstrap_createWindowFoo(JNIEnv* env, Java_org_libreoffice_android_Bootstrap_createWindowFoo(JNIEnv* env,
......
...@@ -30,7 +30,6 @@ $(eval $(call gb_Library_add_exception_objects,ucbhelper,\ ...@@ -30,7 +30,6 @@ $(eval $(call gb_Library_add_exception_objects,ucbhelper,\
ucbhelper/source/client/activedatastreamer \ ucbhelper/source/client/activedatastreamer \
ucbhelper/source/client/commandenvironment \ ucbhelper/source/client/commandenvironment \
ucbhelper/source/client/content \ ucbhelper/source/client/content \
ucbhelper/source/client/contentbroker \
ucbhelper/source/client/fileidentifierconverter \ ucbhelper/source/client/fileidentifierconverter \
ucbhelper/source/client/interceptedinteraction \ ucbhelper/source/client/interceptedinteraction \
ucbhelper/source/client/proxydecider \ ucbhelper/source/client/proxydecider \
......
/* -*- 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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment