[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 3 commits - cppuhelper/source javaunohelper/source ure/source
Michael Stahl
mst at kemper.freedesktop.org
Thu Aug 9 01:57:12 PDT 2012
cppuhelper/source/defaultbootstrap.cxx | 31 +++++++++------
javaunohelper/source/bootstrap.cxx | 2 -
javaunohelper/source/javaunohelper.cxx | 6 +--
javaunohelper/source/javaunohelper.map | 9 ----
javaunohelper/source/preload.cxx | 8 ++--
ure/source/uretest/Makefile | 15 +++----
ure/source/uretest/Makefile.pln | 65 +++++++++++++++------------------
ure/source/uretest/cppmain.cc | 11 ++---
ure/source/uretest/cppserver.cc | 2 -
ure/source/uretest/cpptest.cc | 2 -
ure/source/uretest/version.map | 40 --------------------
11 files changed, 69 insertions(+), 122 deletions(-)
New commits:
commit 2fbfc1d8f35de91a466be5e3b71549e0696e94ff
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Aug 8 18:11:34 2012 +0200
Make ure/source/uretest work again
...at least, Makefile (to be run from within an SDK environment) works again; I
reflected all the relevant changes in Makefile.pln (to be run from no specific
environment) too, but did not actually check the latter
(cherry picked from commit f98379816411f932ccdafede5f9b25c260c17361)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
Conflicts:
ure/source/uretest/version.map
Change-Id: Ie2012d26b3bd59335a0f872bbfc1414cc4f5edc5
diff --git a/ure/source/uretest/Makefile b/ure/source/uretest/Makefile
index df5f811..7b5ffa5 100644
--- a/ure/source/uretest/Makefile
+++ b/ure/source/uretest/Makefile
@@ -116,8 +116,7 @@ clean:
$(DELRECURSIVE) $(subst /,$(PS),out.sdk)
-out.sdk/cppmain.uno.$(SHAREDLIB_EXT): out.sdk/cppmain.$(OBJ_EXT) version.map | \
- out.sdk
+out.sdk/cppmain.uno.$(SHAREDLIB_EXT): out.sdk/cppmain.$(OBJ_EXT) | out.sdk
$(LINK) $(COMP_LINK_FLAGS) $(link_output_switch)$@ $< $(LINK_LIBS) \
$(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) $(SALHELPERLIB) \
$(link_std_libs)
@@ -129,8 +128,7 @@ out.sdk/cppmain.$(OBJ_EXT): cppmain.cc out.sdk/cpputypes.cppumaker.flag \
$(CC_DEFINES) $<
-out.sdk/cpptest.uno.$(SHAREDLIB_EXT): out.sdk/cpptest.$(OBJ_EXT) version.map | \
- out.sdk
+out.sdk/cpptest.uno.$(SHAREDLIB_EXT): out.sdk/cpptest.$(OBJ_EXT) | out.sdk
$(LINK) $(COMP_LINK_FLAGS) $(link_output_switch)$@ $< $(LINK_LIBS) \
$(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) $(link_std_libs)
@@ -141,8 +139,7 @@ out.sdk/cpptest.$(OBJ_EXT): cpptest.cc out.sdk/cpputypes.cppumaker.flag \
$(CC_DEFINES) $<
-out.sdk/cppserver.uno.$(SHAREDLIB_EXT): out.sdk/cppserver.$(OBJ_EXT) \
- version.map | out.sdk
+out.sdk/cppserver.uno.$(SHAREDLIB_EXT): out.sdk/cppserver.$(OBJ_EXT) | out.sdk
$(LINK) $(COMP_LINK_FLAGS) $(link_output_switch)$@ $< $(LINK_LIBS) \
$(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) $(link_std_libs)
@@ -156,11 +153,11 @@ out.sdk/cppserver.$(OBJ_EXT): cppserver.cc out.sdk/cpputypes.cppumaker.flag \
out.sdk/cpputypes.cppumaker.flag: | out.sdk
$(CPPUMAKER) -O./out.sdk/include/cpputypes \
"-Tcom.sun.star.lang.DisposedException;com.sun.star.lang.EventObject;com.sun.star.lang.XMain;com.sun.star.lang.XMultiComponentFactory;com.sun.star.lang.XMultiServiceFactory;com.sun.star.lang.XSingleComponentFactory;com.sun.star.lang.XSingleServiceFactory;com.sun.star.lang.XTypeProvider;com.sun.star.registry.XRegistryKey;com.sun.star.uno.DeploymentException;com.sun.star.uno.Exception;com.sun.star.uno.RuntimeException;com.sun.star.uno.XAggregation;com.sun.star.uno.XComponentContext;com.sun.star.uno.XCurrentContext;com.sun.star.uno.XInterface;com.sun.star.uno.XWeak" \
- -B/UCR "$(URE_TYPES)"
+ -BUCR "$(URE_TYPES)"
touch $@
out.sdk/types.cppumaker.flag: out.sdk/types.rdb | out.sdk
- $(CPPUMAKER) -O./out.sdk/include/types -B/UCR $< "-X$(URE_TYPES)"
+ $(CPPUMAKER) -O./out.sdk/include/types -BUCR $< "-X$(URE_TYPES)"
touch $@
@@ -283,7 +280,7 @@ out.sdk/types.mf: types.mf.template | out.sdk
out.sdk/types.javamaker.flag: out.sdk/types.rdb | out.sdk out.sdk/class
- $(DELRECURSIVE) $(subst /,$(PS),out.sdk/class/types)
- $(JAVAMAKER) -O./out.sdk/class/types -B/UCR $< "-X$(URE_TYPES)"
+ $(JAVAMAKER) -O./out.sdk/class/types -BUCR $< "-X$(URE_TYPES)"
touch $@
diff --git a/ure/source/uretest/Makefile.pln b/ure/source/uretest/Makefile.pln
index e8ec320..1b90086 100644
--- a/ure/source/uretest/Makefile.pln
+++ b/ure/source/uretest/Makefile.pln
@@ -88,62 +88,60 @@ clean:
rm -rf out.pln
-out.pln/cppmain.uno.so: out.pln/cppmain.o version.map | out.pln \
- out.pln/lib/libuno_cppu.so out.pln/lib/libuno_cppuhelpergcc3.so \
- out.pln/lib/libuno_sal.so out.pln/lib/libuno_salhelpergcc3.so \
- out.pln/lib/libstlport_gcc.so
- g++ -shared -o $@ -Wl,-z,defs -Wl,--fatal-warnings \
- -Wl,--version-script=version.map $< -Lout.pln/lib -luno_cppu \
- -luno_cppuhelpergcc3 -luno_sal -luno_salhelpergcc3 -lstlport_gcc
+out.pln/cppmain.uno.so: out.pln/cppmain.o | out.pln out.pln/lib/libuno_cppu.so \
+ out.pln/lib/libuno_cppuhelpergcc3.so out.pln/lib/libuno_sal.so \
+ out.pln/lib/libuno_salhelpergcc3.so
+ g++ -shared -o $@ -Wl,-z,defs -Wl,--fatal-warnings $< -Lout.pln/lib \
+ -luno_cppu -luno_cppuhelpergcc3 -luno_sal -luno_salhelpergcc3
out.pln/cppmain.o: cppmain.cc out.pln/cpputypes.cppumaker.flag \
out.pln/types.cppumaker.flag | out.pln
- g++ -c -o $@ -fpic -Wall -Wno-ctor-dtor-privacy -I $(SDK_HOME)/include/stl \
- -I $(SDK_HOME)/include -I out.pln/include/cpputypes \
- -I out.pln/include/types -DCPPU_ENV=gcc3 \
- -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) -DLINUX -DUNX $<
+ g++ -c -o $@ -fpic -fvisibility=hidden -Wall -Wno-ctor-dtor-privacy \
+ -I $(SDK_HOME)/include/stl -I $(SDK_HOME)/include \
+ -I out.pln/include/cpputypes -I out.pln/include/types \
+ -DCPPU_ENV=gcc3 -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) -DLINUX \
+ -DUNX $<
-out.pln/cpptest.uno.so: out.pln/cpptest.o version.map | out.pln \
- out.pln/lib/libuno_cppu.so out.pln/lib/libuno_cppuhelpergcc3.so \
- out.pln/lib/libuno_sal.so
- g++ -shared -o $@ -Wl,-z,defs -Wl,--fatal-warnings \
- -Wl,--version-script=version.map $< -Lout.pln/lib -luno_cppu \
- -luno_cppuhelpergcc3 -luno_sal
+out.pln/cpptest.uno.so: out.pln/cpptest.o | out.pln out.pln/lib/libuno_cppu.so \
+ out.pln/lib/libuno_cppuhelpergcc3.so out.pln/lib/libuno_sal.so
+ g++ -shared -o $@ -Wl,-z,defs -Wl,--fatal-warnings $< -Lout.pln/lib \
+ -luno_cppu -luno_cppuhelpergcc3 -luno_sal
out.pln/cpptest.o: cpptest.cc out.pln/cpputypes.cppumaker.flag \
out.pln/types.cppumaker.flag | out.pln
- g++ -c -o $@ -fpic -Wall -Wno-ctor-dtor-privacy -I $(SDK_HOME)/include/stl \
- -I $(SDK_HOME)/include -I out.pln/include/cpputypes \
- -I out.pln/include/types -DCPPU_ENV=gcc3 \
- -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) -DLINUX -DUNX $<
+ g++ -c -o $@ -fpic -fvisibility=hidden -Wall -Wno-ctor-dtor-privacy \
+ -I $(SDK_HOME)/include/stl -I $(SDK_HOME)/include \
+ -I out.pln/include/cpputypes -I out.pln/include/types \
+ -DCPPU_ENV=gcc3 -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) -DLINUX \
+ -DUNX $<
-out.pln/cppserver.uno.so: out.pln/cppserver.o version.map | out.pln \
+out.pln/cppserver.uno.so: out.pln/cppserver.o | out.pln \
out.pln/lib/libuno_cppu.so out.pln/lib/libuno_cppuhelpergcc3.so \
out.pln/lib/libuno_sal.so
- g++ -shared -o $@ -Wl,-z,defs -Wl,--fatal-warnings \
- -Wl,--version-script=version.map $< -Lout.pln/lib -luno_cppu \
- -luno_cppuhelpergcc3 -luno_sal
+ g++ -shared -o $@ -Wl,-z,defs -Wl,--fatal-warnings $< -Lout.pln/lib \
+ -luno_cppu -luno_cppuhelpergcc3 -luno_sal
out.pln/cppserver.o: cppserver.cc out.pln/cpputypes.cppumaker.flag \
out.pln/types.cppumaker.flag | out.pln
- g++ -c -o $@ -fpic -Wall -Wno-ctor-dtor-privacy -I $(SDK_HOME)/include/stl \
- -I $(SDK_HOME)/include -I out.pln/include/cpputypes \
- -I out.pln/include/types -DCPPU_ENV=gcc3 \
- -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) -DLINUX -DUNX $<
+ g++ -c -o $@ -fpic -fvisibility=hidden -Wall -Wno-ctor-dtor-privacy \
+ -I $(SDK_HOME)/include/stl -I $(SDK_HOME)/include \
+ -I out.pln/include/cpputypes -I out.pln/include/types \
+ -DCPPU_ENV=gcc3 -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) -DLINUX \
+ -DUNX $<
out.pln/cpputypes.cppumaker.flag: | out.pln
LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/bin/cppumaker \
-O./out.pln/include/cpputypes \
'-Tcom.sun.star.lang.DisposedException;com.sun.star.lang.EventObject;com.sun.star.lang.XMain;com.sun.star.lang.XMultiComponentFactory;com.sun.star.lang.XMultiServiceFactory;com.sun.star.lang.XSingleComponentFactory;com.sun.star.lang.XSingleServiceFactory;com.sun.star.lang.XTypeProvider;com.sun.star.registry.XRegistryKey;com.sun.star.uno.DeploymentException;com.sun.star.uno.Exception;com.sun.star.uno.RuntimeException;com.sun.star.uno.XAggregation;com.sun.star.uno.XComponentContext;com.sun.star.uno.XCurrentContext;com.sun.star.uno.XInterface;com.sun.star.uno.XWeak' \
- -B/UCR $(URE_HOME)/share/misc/types.rdb
+ -BUCR $(URE_HOME)/share/misc/types.rdb
touch $@
out.pln/types.cppumaker.flag: out.pln/types.rdb | out.pln
LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/bin/cppumaker \
- -O./out.pln/include/types -B/UCR $< \
+ -O./out.pln/include/types -BUCR $< \
-X$(URE_HOME)/share/misc/types.rdb
touch $@
@@ -267,7 +265,7 @@ out.pln/types.mf: types.mf.template | out.pln
out.pln/types.javamaker.flag: out.pln/types.rdb | out.pln out.pln/class
rm -rf out.pln/class/types
LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/bin/javamaker \
- -O./out.pln/class/types -B/UCR $< -X$(URE_HOME)/share/misc/types.rdb
+ -O./out.pln/class/types -BUCR $< -X$(URE_HOME)/share/misc/types.rdb
touch $@
@@ -301,9 +299,6 @@ out.pln/lib/libuno_sal.so: | out.pln/lib
out.pln/lib/libuno_salhelpergcc3.so: | out.pln/lib
ln -fs $(URE_HOME)/lib/libuno_salhelpergcc3.so.3 $@
-out.pln/lib/libstlport_gcc.so: | out.pln/lib
- ln -fs $(URE_HOME)/lib/libstlport_gcc.so $@
-
out.pln:
mkdir $@
diff --git a/ure/source/uretest/cppmain.cc b/ure/source/uretest/cppmain.cc
index 816c58e..b8ad02a 100644
--- a/ure/source/uretest/cppmain.cc
+++ b/ure/source/uretest/cppmain.cc
@@ -111,11 +111,8 @@ private:
}
static char const * const services[] = {
"com.sun.star.beans.Introspection",
- "com.sun.star.bridge.Bridge",
"com.sun.star.bridge.BridgeFactory",
- "com.sun.star.bridge.IiopBridge",
"com.sun.star.bridge.UnoUrlResolver",
- "com.sun.star.bridge.UrpBridge",
"com.sun.star.connection.Acceptor",
"com.sun.star.connection.Connector",
"com.sun.star.io.DataInputStream",
@@ -161,10 +158,10 @@ private:
static_cast< ::cppu::OWeakObject * >(this));
}
for (::std::size_t i = 0; i < SAL_N_ELEMENTS(services); ++i) {
+ ::rtl::OUString name(::rtl::OUString::createFromAscii(services[i]));
::css::uno::Reference< ::css::uno::XInterface > instance;
try {
- instance = manager->createInstanceWithContext(
- ::rtl::OUString::createFromAscii(services[i]), context_);
+ instance = manager->createInstanceWithContext(name, context_);
} catch (::css::uno::RuntimeException &) {
throw;
} catch (::css::uno::Exception &) {
@@ -175,7 +172,7 @@ private:
}
if (!instance.is()) {
throw ::css::uno::RuntimeException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("no instance")),
+ "no instance: " + name,
static_cast< ::cppu::OWeakObject * >(this));
}
}
@@ -252,7 +249,7 @@ namespace CppMain {
}
-extern "C" ::sal_Bool SAL_CALL component_writeInfo(
+extern "C" SAL_DLLPUBLIC_EXPORT ::sal_Bool SAL_CALL component_writeInfo(
void * serviceManager, void * registryKey)
{
return ::cppu::component_writeInfoHelper(
diff --git a/ure/source/uretest/cppserver.cc b/ure/source/uretest/cppserver.cc
index 960760c..03c2bd6 100644
--- a/ure/source/uretest/cppserver.cc
+++ b/ure/source/uretest/cppserver.cc
@@ -104,7 +104,7 @@ namespace CppServer {
}
-extern "C" ::sal_Bool SAL_CALL component_writeInfo(
+extern "C" SAL_DLLPUBLIC_EXPORT ::sal_Bool SAL_CALL component_writeInfo(
void * serviceManager, void * registryKey)
{
return ::cppu::component_writeInfoHelper(
diff --git a/ure/source/uretest/cpptest.cc b/ure/source/uretest/cpptest.cc
index e138b8d..b300993 100644
--- a/ure/source/uretest/cpptest.cc
+++ b/ure/source/uretest/cpptest.cc
@@ -104,7 +104,7 @@ cppu::ImplementationEntry entries[] = {
}
-extern "C" sal_Bool SAL_CALL component_writeInfo(
+extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
void * serviceManager, void * registryKey)
{
return cppu::component_writeInfoHelper(
diff --git a/ure/source/uretest/version.map b/ure/source/uretest/version.map
deleted file mode 100644
index 2061370..0000000
--- a/ure/source/uretest/version.map
+++ /dev/null
@@ -1,40 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-UDK_3_0_0 {
- global:
- component_getFactory;
- component_writeInfo;
-
- _ZTI*;
- _ZTS*;
-
- _ZN4_STL7num_put*; # for STLport
-
- local:
- *;
-};
commit c5c981c60d449549c00c5457c93e3c48a0488d7b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Aug 8 18:27:11 2012 +0200
ServiceManager::createInstanceWithContext needs to honor given Context
...in loadImplementation (instead of using the context the ServiceManager itself
was created with). Otherwise, the handcrafted context containing a fake
theJavaVirtualMachine singleton in install_vm_singleton
(javaunohelper/source/vm.cxx) would not be honored, so that if a Java process
bootstraps native (binary) UNO and from there tries to obtain that singleton, it
would erroneously try to instantiate another JVM instead of using the existing
one. This was a regression introduced with the new ServiceManager and could be
witnessed by test-javanative in ure/source/uretest/Makefile failing.
Change-Id: I58cfbc8cdaea7ee4ab80fac728ea3e85676d69e1
(cherry picked from commit 9fc870fc33c2872aa93477523da4a54c841cf9b5)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx
index 078ee29..151a36e 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -611,6 +611,7 @@ public:
Data const & getData() const { return data_; }
void loadImplementation(
+ css::uno::Reference< css::uno::XComponentContext > const & context,
boost::shared_ptr< ImplementationInfo > const & info,
css::uno::Reference< css::lang::XSingleComponentFactory > * factory1,
css::uno::Reference< css::lang::XSingleServiceFactory > * factory2);
@@ -784,6 +785,7 @@ private:
void removeImplementation(rtl::OUString name);
boost::shared_ptr< Implementation > findServiceImplementation(
+ css::uno::Reference< css::uno::XComponentContext > const & context,
rtl::OUString const & specifier);
css::uno::Reference< css::uno::XComponentContext > context_;
@@ -834,7 +836,8 @@ private:
virtual css::uno::Sequence< rtl::OUString > SAL_CALL
getSupportedServiceNames() throw (css::uno::RuntimeException);
- void loadImplementation();
+ void loadImplementation(
+ css::uno::Reference< css::uno::XComponentContext > const & context);
rtl::Reference< ServiceManager > manager_;
boost::shared_ptr< ImplementationInfo > info_;
@@ -846,6 +849,7 @@ private:
};
void ServiceManager::loadImplementation(
+ css::uno::Reference< css::uno::XComponentContext > const & context,
boost::shared_ptr< ImplementationInfo > const & info,
css::uno::Reference< css::lang::XSingleComponentFactory > * factory1,
css::uno::Reference< css::lang::XSingleServiceFactory > * factory2)
@@ -887,8 +891,8 @@ void ServiceManager::loadImplementation(
smgr = css::uno::Reference< css::lang::XMultiComponentFactory >(
ctxt->getServiceManager(), css::uno::UNO_SET_THROW);
} else {
- assert(context_.is());
- ctxt = context_;
+ assert(context.is());
+ ctxt = context;
smgr = this;
}
css::uno::Reference< css::loader::XImplementationLoader > loader(
@@ -982,7 +986,7 @@ ServiceManager::createInstanceWithContext(
throw (css::uno::Exception, css::uno::RuntimeException)
{
boost::shared_ptr< Implementation > impl(
- findServiceImplementation(aServiceSpecifier));
+ findServiceImplementation(Context, aServiceSpecifier));
if (impl.get() == 0) {
return css::uno::Reference< css::uno::XInterface >();
}
@@ -1005,7 +1009,7 @@ ServiceManager::createInstanceWithArgumentsAndContext(
throw (css::uno::Exception, css::uno::RuntimeException)
{
boost::shared_ptr< Implementation > impl(
- findServiceImplementation(ServiceSpecifier));
+ findServiceImplementation(Context, ServiceSpecifier));
if (impl.get() == 0) {
return css::uno::Reference< css::uno::XInterface >();
}
@@ -1819,6 +1823,7 @@ void ServiceManager::removeImplementation(rtl::OUString name) {
}
boost::shared_ptr< Implementation > ServiceManager::findServiceImplementation(
+ css::uno::Reference< css::uno::XComponentContext > const & context,
rtl::OUString const & specifier)
{
boost::shared_ptr< Implementation > impl;
@@ -1851,7 +1856,7 @@ boost::shared_ptr< Implementation > ServiceManager::findServiceImplementation(
if (!loaded) {
css::uno::Reference< css::lang::XSingleComponentFactory > f1;
css::uno::Reference< css::lang::XSingleServiceFactory > f2;
- loadImplementation(impl->info, &f1, &f2);
+ loadImplementation(context, impl->info, &f1, &f2);
osl::MutexGuard g(rBHelper.rMutex);
if (!(isDisposed() || impl->loaded)) {
impl->loaded = true;
@@ -1867,7 +1872,7 @@ FactoryWrapper::createInstanceWithContext(
css::uno::Reference< css::uno::XComponentContext > const & Context)
throw (css::uno::Exception, css::uno::RuntimeException)
{
- loadImplementation();
+ loadImplementation(Context);
return factory1_.is()
? factory1_->createInstanceWithContext(Context)
: factory2_->createInstance();
@@ -1879,7 +1884,7 @@ FactoryWrapper::createInstanceWithArgumentsAndContext(
css::uno::Reference< css::uno::XComponentContext > const & Context)
throw (css::uno::Exception, css::uno::RuntimeException)
{
- loadImplementation();
+ loadImplementation(Context);
return factory1_.is()
? factory1_->createInstanceWithArgumentsAndContext(Arguments, Context)
: factory2_->createInstanceWithArguments(Arguments);
@@ -1888,7 +1893,7 @@ FactoryWrapper::createInstanceWithArgumentsAndContext(
css::uno::Reference< css::uno::XInterface > FactoryWrapper::createInstance()
throw (css::uno::Exception, css::uno::RuntimeException)
{
- loadImplementation();
+ loadImplementation(manager_->getContext());
return factory1_.is()
? factory1_->createInstanceWithContext(manager_->getContext())
: factory2_->createInstance();
@@ -1899,7 +1904,7 @@ FactoryWrapper::createInstanceWithArguments(
css::uno::Sequence< css::uno::Any > const & Arguments)
throw (css::uno::Exception, css::uno::RuntimeException)
{
- loadImplementation();
+ loadImplementation(manager_->getContext());
return factory1_.is()
? factory1_->createInstanceWithArgumentsAndContext(
Arguments, manager_->getContext())
@@ -1944,7 +1949,9 @@ css::uno::Sequence< rtl::OUString > FactoryWrapper::getSupportedServiceNames()
return names;
}
-void FactoryWrapper::loadImplementation() {
+void FactoryWrapper::loadImplementation(
+ css::uno::Reference< css::uno::XComponentContext > const & context)
+{
{
osl::MutexGuard g(mutex_);
if (loaded_) {
@@ -1956,7 +1963,7 @@ void FactoryWrapper::loadImplementation() {
//TODO: There is a race here, as the relevant service factory can already
// have been removed and loading can thus fail, as the entity from which to
// load can disappear once the service factory is removed:
- manager_->loadImplementation(info_, &f1, &f2);
+ manager_->loadImplementation(context, info_, &f1, &f2);
if (!(f1.is() || f2.is())) {
throw css::uno::DeploymentException(
"Implementation " + info_->name + " does not provide a factory",
commit de536db02e13bfeed716ad6e8b4d9a12c421aca9
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Aug 8 18:20:49 2012 +0200
Export JNI functions from juh, juhx libs
...this had been broken with gbuild'ification of javaunohelper and caused
java.lang.UnsatisfiedLinkError from
com.sun.star.comp.helper.Bootstrap.cppuhelper_bootstrap, as could be witnessed
by test-javanative in ure/source/uretest/Makefile failing.
(cherry picked from commit e7a02843e54e1b64e2078549af110beaccf50348)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
Conflicts:
javaunohelper/source/javaunohelper.map
Change-Id: I8a76e1195c713895bfb8eae5070b0f73beb2b897
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx
index d053d57..5b01405 100644
--- a/javaunohelper/source/bootstrap.cxx
+++ b/javaunohelper/source/bootstrap.cxx
@@ -75,7 +75,7 @@ inline ::rtl::OUString jstring_to_oustring( jstring jstr, JNIEnv * jni_env )
}
//==================================================================================================
-extern "C" JNIEXPORT jobject JNICALL Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
+extern "C" SAL_DLLPUBLIC_EXPORT jobject JNICALL Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
JNIEnv * jni_env, SAL_UNUSED_PARAMETER jclass, jstring juno_rc, jobjectArray jpairs,
jobject loader )
{
diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx
index 9016b48..1ac04d5 100644
--- a/javaunohelper/source/javaunohelper.cxx
+++ b/javaunohelper/source/javaunohelper.cxx
@@ -61,7 +61,7 @@ using ::rtl::OUString;
* Method: component_writeInfo
* Signature: (Ljava/lang/String;Lcom/sun/star/lang/XMultiServiceFactory;Lcom/sun/star/registry/XRegistryKey;)Z
*/
-extern "C" JNIEXPORT jboolean JNICALL
+extern "C" SAL_DLLPUBLIC_EXPORT jboolean JNICALL
Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
JNIEnv * pJEnv, SAL_UNUSED_PARAMETER jclass, jstring jLibName, jobject jSMgr,
jobject jRegKey, jobject loader )
@@ -141,7 +141,7 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
* Method: component_getFactory
* Signature: (Ljava/lang/String;Ljava/lang/String;Lcom/sun/star/lang/XMultiServiceFactory;Lcom/sun/star/registry/XRegistryKey;)Ljava/lang/Object;
*/
-extern "C" JNIEXPORT jobject JNICALL
+extern "C" SAL_DLLPUBLIC_EXPORT jobject JNICALL
Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
JNIEnv * pJEnv, SAL_UNUSED_PARAMETER jclass, jstring jLibName, jstring jImplName,
jobject jSMgr, jobject jRegKey, jobject loader )
@@ -237,7 +237,7 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
* Method: createRegistryServiceFactory
* Signature: (Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/Object;
*/
-extern "C" JNIEXPORT jobject JNICALL
+extern "C" SAL_DLLPUBLIC_EXPORT jobject JNICALL
Java_com_sun_star_comp_helper_RegistryServiceFactory_createRegistryServiceFactory(
JNIEnv * pJEnv, SAL_UNUSED_PARAMETER jclass, jstring jWriteRegFile,
jstring jReadRegFile, jboolean jbReadOnly, jobject loader )
diff --git a/javaunohelper/source/javaunohelper.map b/javaunohelper/source/javaunohelper.map
deleted file mode 100644
index dcbe050..0000000
--- a/javaunohelper/source/javaunohelper.map
+++ /dev/null
@@ -1,9 +0,0 @@
-UDK_3_0_0 {
- global:
- Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo;
- Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory;
- Java_com_sun_star_comp_helper_RegistryServiceFactory_createRegistryServiceFactory;
- Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap;
- local:
- *;
-};
diff --git a/javaunohelper/source/preload.cxx b/javaunohelper/source/preload.cxx
index cfaa5aa..34b669f 100644
--- a/javaunohelper/source/preload.cxx
+++ b/javaunohelper/source/preload.cxx
@@ -114,7 +114,7 @@ static bool inited_juhx( JNIEnv * jni_env )
}
//==================================================================================================
-JNIEXPORT jboolean JNICALL
+SAL_DLLPUBLIC_EXPORT jboolean JNICALL
Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
JNIEnv * pJEnv, jclass jClass, jstring jLibName, jobject jSMgr,
jobject jRegKey, jobject loader )
@@ -125,7 +125,7 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
return JNI_FALSE;
}
//==================================================================================================
-JNIEXPORT jobject JNICALL
+SAL_DLLPUBLIC_EXPORT jobject JNICALL
Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
JNIEnv * pJEnv, jclass jClass, jstring jLibName, jstring jImplName,
jobject jSMgr, jobject jRegKey, jobject loader )
@@ -136,7 +136,7 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
return 0;
}
//==================================================================================================
-JNIEXPORT jobject JNICALL
+SAL_DLLPUBLIC_EXPORT jobject JNICALL
Java_com_sun_star_comp_helper_RegistryServiceFactory_createRegistryServiceFactory(
JNIEnv * pJEnv, jclass jClass, jstring jWriteRegFile,
jstring jReadRegFile, jboolean jbReadOnly, jobject loader )
@@ -149,7 +149,7 @@ Java_com_sun_star_comp_helper_RegistryServiceFactory_createRegistryServiceFactor
return 0;
}
//==================================================================================================
-JNIEXPORT jobject JNICALL
+SAL_DLLPUBLIC_EXPORT jobject JNICALL
Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
JNIEnv * jni_env, jclass jClass, jstring juno_rc, jobjectArray jpairs,
jobject loader )
More information about the Libreoffice-commits
mailing list