[Libreoffice-commits] core.git: 5 commits - binaryurp/source bridges/inc bridges/test cli_ure/source configmgr/source connectivity/source cppuhelper/qa cppuhelper/source cppuhelper/test cppu/source desktop/test forms/source include/cppu include/linguistic include/uno javaunohelper/source lingucomponent/source linguistic/inc linguistic/source linguistic/workben sc/workben sd/source shell/source solenv/bin solenv/gbuild stoc/source stoc/test svx/source sw/source testtools/source ucb/source ure/source xmloff/source

Stephan Bergmann sbergman at redhat.com
Mon Dec 16 12:43:47 PST 2013


 binaryurp/source/binaryurp.component                                  |    4 
 bridges/inc/bridges/cpp_uno/bridge.hxx                                |    2 
 bridges/test/java_uno/acquire/testacquire.cxx                         |    1 
 bridges/test/java_uno/any/transport.cxx                               |    1 
 bridges/test/java_uno/equals/testequals.cxx                           |    1 
 bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx |    1 
 bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx |    1 
 cli_ure/source/native/native_share.h                                  |    1 
 configmgr/source/configmgr.component                                  |    4 
 connectivity/source/drivers/ado/Aservices.cxx                         |    8 
 connectivity/source/drivers/ado/ado.component                         |    3 
 connectivity/source/drivers/jdbc/jdbc.component                       |   13 +
 connectivity/source/drivers/jdbc/jservices.cxx                        |   15 -
 cppu/source/threadpool/current.cxx                                    |    1 
 cppu/source/uno/EnvStack.cxx                                          |    1 
 cppu/source/uno/cascade_mapping.cxx                                   |    1 
 cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx              |    1 
 cppuhelper/source/component_context.cxx                               |    3 
 cppuhelper/source/exc_thrower.cxx                                     |    1 
 cppuhelper/source/loadsharedlibcomponentfactory.hxx                   |    4 
 cppuhelper/source/macro_expander.cxx                                  |    3 
 cppuhelper/source/servicemanager.cxx                                  |   48 +++-
 cppuhelper/source/servicemanager.hxx                                  |   15 -
 cppuhelper/source/shlib.cxx                                           |  104 +++++-----
 cppuhelper/source/tdmgr.cxx                                           |    3 
 cppuhelper/test/bootstrap/bootstrap.test.cxx                          |    1 
 cppuhelper/test/testcmp/TestComponent.cxx                             |    3 
 desktop/test/deployment/active/active_native.cxx                      |    1 
 desktop/test/deployment/passive/passive_native.cxx                    |    1 
 forms/source/misc/services.cxx                                        |    1 
 include/cppu/macros.hxx                                               |    6 
 include/linguistic/hyphdta.hxx                                        |    1 
 include/linguistic/lngprophelp.hxx                                    |    1 
 include/linguistic/misc.hxx                                           |    1 
 include/linguistic/spelldta.hxx                                       |    1 
 include/uno/current_context.hxx                                       |    1 
 include/uno/environment.hxx                                           |    2 
 include/uno/lbnames.h                                                 |    9 
 include/uno/mapping.hxx                                               |    1 
 javaunohelper/source/bootstrap.cxx                                    |    1 
 javaunohelper/source/javaunohelper.cxx                                |    1 
 lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx    |    1 
 lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx          |    1 
 lingucomponent/source/spellcheck/spell/sspellimp.hxx                  |    1 
 lingucomponent/source/thesaurus/libnth/nthesdta.hxx                   |    1 
 lingucomponent/source/thesaurus/libnth/nthesimp.hxx                   |    1 
 linguistic/inc/iprcache.hxx                                           |    2 
 linguistic/source/dicimp.hxx                                          |    1 
 linguistic/source/dlistimp.hxx                                        |    1 
 linguistic/source/hyphdsp.hxx                                         |    1 
 linguistic/source/lngopt.cxx                                          |    1 
 linguistic/source/lngopt.hxx                                          |    1 
 linguistic/source/lngsvcmgr.hxx                                       |    1 
 linguistic/source/spelldsp.hxx                                        |    1 
 linguistic/source/thesdsp.hxx                                         |    1 
 linguistic/workben/sprophelp.hxx                                      |    1 
 linguistic/workben/sspellimp.hxx                                      |    1 
 sc/workben/addin.cxx                                                  |    1 
 sd/source/ui/unoidl/facreg.cxx                                        |    1 
 shell/source/backends/desktopbe/desktopbackend.cxx                    |    1 
 shell/source/backends/gconfbe/gconfbackend.cxx                        |    1 
 shell/source/backends/kde4be/kde4backend.cxx                          |    1 
 shell/source/backends/kdebe/kdebackend.cxx                            |    1 
 solenv/bin/createcomponent.xslt                                       |   30 ++
 solenv/gbuild/ComponentTarget.mk                                      |    5 
 stoc/source/bootstrap/services.cxx                                    |    1 
 stoc/source/corereflection/crefl.cxx                                  |    1 
 stoc/source/invocation_adapterfactory/iafactory.cxx                   |    1 
 stoc/source/javaloader/javaloader.cxx                                 |    1 
 stoc/source/javavm/javavm.cxx                                         |    1 
 stoc/source/proxy_factory/proxyfac.cxx                                |    1 
 stoc/source/security/access_controller.cxx                            |    1 
 stoc/source/stocservices/stocservices.cxx                             |    1 
 stoc/test/registry_tdprovider/testregistrytdprovider.cxx              |    1 
 stoc/test/tdmanager/testtdmanager.cxx                                 |    1 
 stoc/test/testproxyfac.cxx                                            |    1 
 svx/source/core/coreservices.cxx                                      |    2 
 svx/source/unodraw/unoctabl.cxx                                       |    1 
 sw/source/ui/uno/unofreg.cxx                                          |    1 
 testtools/source/bridgetest/bridgetest.cxx                            |    1 
 testtools/source/bridgetest/constructors.cxx                          |    1 
 testtools/source/performance/ubtest.cxx                               |    1 
 ucb/source/ucp/webdav/webdavservices.cxx                              |    1 
 ure/source/uretest/cppmain.cc                                         |    1 
 ure/source/uretest/cppserver.cc                                       |    1 
 ure/source/uretest/cpptest.cc                                         |    1 
 xmloff/source/core/facreg.cxx                                         |    1 
 87 files changed, 187 insertions(+), 166 deletions(-)

New commits:
commit b1d65c9f1535c9ef283d2a91a225359e5983f747
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Dec 16 21:39:14 2013 +0100

    Allow setting environment value directly in .component files
    
    ...for internal loader="com.sun.star.loader.SharedLibrary" components, instead
    of exported component_getImplementationEnvironmen (or implicit
    CPPU_CURRENT_LANGUAGE_BINDING_NAME).  Adapted a few .component files as proof-
    of-concept, more to follow.
    
    Change-Id: I82332e0a48e6fc1da245990bb72265fe6e58447e

diff --git a/binaryurp/source/binaryurp.component b/binaryurp/source/binaryurp.component
index 37fb96f..1eff0c2 100644
--- a/binaryurp/source/binaryurp.component
+++ b/binaryurp/source/binaryurp.component
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
 
-<component loader="com.sun.star.loader.SharedLibrary" prefix="binaryurp"
-    xmlns="http://openoffice.org/2010/uno-components">
+<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
+    prefix="binaryurp" xmlns="http://openoffice.org/2010/uno-components">
   <implementation name="com.sun.star.comp.bridge.BridgeFactory">
     <service name="com.sun.star.bridge.BridgeFactory"/>
   </implementation>
diff --git a/configmgr/source/configmgr.component b/configmgr/source/configmgr.component
index b409478..24fd608 100644
--- a/configmgr/source/configmgr.component
+++ b/configmgr/source/configmgr.component
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
 
-<component loader="com.sun.star.loader.SharedLibrary" prefix="configmgr"
-    xmlns="http://openoffice.org/2010/uno-components">
+<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
+    prefix="configmgr" xmlns="http://openoffice.org/2010/uno-components">
   <implementation name="com.sun.star.comp.configuration.ConfigurationProvider">
     <service name="com.sun.star.configuration.ConfigurationProvider"/>
   </implementation>
diff --git a/connectivity/source/drivers/ado/Aservices.cxx b/connectivity/source/drivers/ado/Aservices.cxx
index a5ef101..bd13201 100644
--- a/connectivity/source/drivers/ado/Aservices.cxx
+++ b/connectivity/source/drivers/ado/Aservices.cxx
@@ -19,7 +19,6 @@
 
 #include "ado/ADriver.hxx"
 #include <cppuhelper/factory.hxx>
-#include <uno/lbnames.h>
 
 using namespace connectivity::ado;
 using ::com::sun::star::uno::Reference;
@@ -75,14 +74,6 @@ struct ProviderRequest
 };
 
 //---------------------------------------------------------------------------------------
-extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ado_component_getImplementationEnvironment(
-                const sal_Char **ppEnvTypeName,
-                uno_Environment        ** /*ppEnv*/)
-{
-    *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ":affine";
-}
-
-//---------------------------------------------------------------------------------------
 extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL ado_component_getFactory(
                     const sal_Char* pImplementationName,
                     void* pServiceManager,
diff --git a/connectivity/source/drivers/ado/ado.component b/connectivity/source/drivers/ado/ado.component
index 9286ca0..b90673a 100644
--- a/connectivity/source/drivers/ado/ado.component
+++ b/connectivity/source/drivers/ado/ado.component
@@ -17,7 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
 
-<component loader="com.sun.star.loader.SharedLibrary" prefix="ado"
+<component loader="com.sun.star.loader.SharedLibrary"
+    environment="@CPPU_ENV@:affine" prefix="ado"
     xmlns="http://openoffice.org/2010/uno-components">
   <implementation name="com.sun.star.comp.sdbc.ado.ODriver">
     <service name="com.sun.star.sdbc.Driver"/>
diff --git a/connectivity/source/drivers/jdbc/jdbc.component b/connectivity/source/drivers/jdbc/jdbc.component
index 5b8b151..07fd03c 100644
--- a/connectivity/source/drivers/jdbc/jdbc.component
+++ b/connectivity/source/drivers/jdbc/jdbc.component
@@ -17,7 +17,18 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  -->
 
-<component loader="com.sun.star.loader.SharedLibrary" prefix="jdbc"
+<!-- Recent Java 6 VMs make calls to JNI Attach/DetachCurrentThread (which this
+     code does extensively) very expensive.  A follow-up JVM fix reduced the
+     overhead significantly again for all threads but the main thread.  So a
+     quick hack to improve performance of this component again is to confine it
+     in the affine apartment (where all code will run on a single, dedicated
+     thread that is guaranteed no to be the main thread).  However, a better fix
+     would still be to redesign the code so that it does not call
+     Attach/DetachCurrentThread so frequently:
+-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+    environment="@CPPU_ENV@:affine" prefix="jdbc"
     xmlns="http://openoffice.org/2010/uno-components">
   <implementation name="com.sun.star.comp.sdbc.JDBCDriver">
     <service name="com.sun.star.sdbc.Driver"/>
diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx
index 81cfc3c..438bb28 100644
--- a/connectivity/source/drivers/jdbc/jservices.cxx
+++ b/connectivity/source/drivers/jdbc/jservices.cxx
@@ -19,7 +19,6 @@
 
 #include "java/sql/Driver.hxx"
 #include <cppuhelper/factory.hxx>
-#include <uno/lbnames.h>
 
 using namespace connectivity;
 using ::com::sun::star::uno::Reference;
@@ -76,21 +75,6 @@ struct ProviderRequest
     void* getProvider() const { return xRet.get(); }
 };
 
-extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
-jdbc_component_getImplementationEnvironment(
-    char const ** ppEnvTypeName, uno_Environment **)
-{
-    // Recent Java 6 VMs make calls to JNI Attach/DetachCurrentThread (which
-    // this code does extensively) very expensive.  A follow-up JVM fix reduced
-    // the overhead significantly again for all threads but the main thread.  So
-    // a quick hack to improve performance of this component again is to confine
-    // it in the affine apartment (where all code will run on a single,
-    // dedicated thread that is guaranteed no to be the main thread).  However,
-    // a better fix would still be to redesign the code so that it does not call
-    // Attach/DetachCurrentThread so frequently:
-    *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ":affine";
-}
-
 extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL jdbc_component_getFactory(
                     const sal_Char* pImplementationName,
                     void* pServiceManager,
diff --git a/cppuhelper/source/loadsharedlibcomponentfactory.hxx b/cppuhelper/source/loadsharedlibcomponentfactory.hxx
index b0986dd..9809c55 100644
--- a/cppuhelper/source/loadsharedlibcomponentfactory.hxx
+++ b/cppuhelper/source/loadsharedlibcomponentfactory.hxx
@@ -23,8 +23,8 @@ namespace rtl { class OUString; }
 namespace cppuhelper { namespace detail {
 
 css::uno::Reference<css::uno::XInterface> loadSharedLibComponentFactory(
-    rtl::OUString const & uri, rtl::OUString const & prefix,
-    rtl::OUString const & rImplName,
+    rtl::OUString const & uri, rtl::OUString const & environment,
+    rtl::OUString const & prefix, rtl::OUString const & rImplName,
     css::uno::Reference<css::lang::XMultiServiceFactory> const & xMgr);
 
 } }
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 512fb6b..3420233 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -125,6 +125,7 @@ private:
     cppuhelper::ServiceManager::Data * data_;
     rtl::OUString attrLoader_;
     rtl::OUString attrUri_;
+    rtl::OUString attrEnvironment_;
     rtl::OUString attrPrefix_;
     boost::shared_ptr< cppuhelper::ServiceManager::Data::Implementation >
         implementation_;
@@ -244,6 +245,7 @@ Parser::Parser(
 void Parser::handleComponent() {
     attrLoader_ = rtl::OUString();
     attrUri_ = rtl::OUString();
+    attrEnvironment_ = rtl::OUString();
     attrPrefix_ = rtl::OUString();
     xmlreader::Span name;
     int nsId;
@@ -281,6 +283,23 @@ void Parser::handleComponent() {
                     css::uno::Reference< css::uno::XInterface >());
             }
         } else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE
+                   && name.equals(RTL_CONSTASCII_STRINGPARAM("environment")))
+        {
+            if (!attrEnvironment_.isEmpty()) {
+                throw css::registry::InvalidRegistryException(
+                    (reader_.getUrl() +
+                     ": <component> has multiple \"environment\" attributes"),
+                    css::uno::Reference< css::uno::XInterface >());
+            }
+            attrEnvironment_ = reader_.getAttributeValue(false)
+                .convertFromUtf8();
+            if (attrEnvironment_.isEmpty()) {
+                throw css::registry::InvalidRegistryException(
+                    (reader_.getUrl() +
+                     ": <component> has empty \"environment\" attribute"),
+                    css::uno::Reference< css::uno::XInterface >());
+            }
+        } else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE
                    && name.equals(RTL_CONSTASCII_STRINGPARAM("prefix")))
         {
             if (!attrPrefix_.isEmpty()) {
@@ -328,8 +347,8 @@ void Parser::handleImplementation() {
     OUString name(getNameAttribute());
     implementation_.reset(
         new cppuhelper::ServiceManager::Data::Implementation(
-            name, attrLoader_, attrUri_, attrPrefix_, alienContext_,
-            reader_.getUrl()));
+            name, attrLoader_, attrUri_, attrEnvironment_, attrPrefix_,
+            alienContext_, reader_.getUrl()));
     if (!data_->namedImplementations.insert(
             cppuhelper::ServiceManager::Data::NamedImplementations::value_type(
                 name, implementation_)).
@@ -643,16 +662,19 @@ void cppuhelper::ServiceManager::loadImplementation(
             static_cast< cppu::OWeakObject * >(this));
     }
     css::uno::Reference< css::uno::XInterface > f0;
-    // Shortcut loading via SharedLibrary loader, to pass in prefix argument
-    // (which the loader's activate implementation would normally obtain through
-    // the legacy xKey argument):
+    // Shortcut loading via SharedLibrary loader, to pass in environment and
+    // prefix arguments:
     if (!info->alienContext.is()
         && info->loader == "com.sun.star.loader.SharedLibrary")
     {
         f0 = cppuhelper::detail::loadSharedLibComponentFactory(
-            uri, info->prefix, info->name, this);
+            uri, info->environment, info->prefix, info->name, this);
     } else {
         SAL_WARN_IF(
+            !info->environment.isEmpty(), "cppuhelper",
+            "Loader " << info->loader << " and non-empty environment "
+                << info->environment);
+        SAL_WARN_IF(
             !info->prefix.isEmpty(), "cppuhelper",
             "Loader " << info->loader << " and non-empty prefix "
                 << info->prefix);
@@ -1287,8 +1309,7 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(rtl::OUString const & uri) {
         boost::shared_ptr< Data::Implementation > impl(
             new Data::Implementation(
                 name, readLegacyRdbString(uri, implKey, "UNO/ACTIVATOR"),
-                readLegacyRdbString(uri, implKey, "UNO/LOCATION"),
-                rtl::OUString(),
+                readLegacyRdbString(uri, implKey, "UNO/LOCATION"), "", "",
                 css::uno::Reference< css::uno::XComponentContext >(), uri));
         if (!data_.namedImplementations.insert(
                 Data::NamedImplementations::value_type(name, impl)).
diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx
index 78359a2..b68cd4b 100644
--- a/cppuhelper/source/servicemanager.hxx
+++ b/cppuhelper/source/servicemanager.hxx
@@ -53,13 +53,15 @@ public:
         struct ImplementationInfo: private boost::noncopyable {
             ImplementationInfo(
                 rtl::OUString const & theName, rtl::OUString const & theLoader,
-                rtl::OUString const & theUri, rtl::OUString const & thePrefix,
+                rtl::OUString const & theUri,
+                rtl::OUString const & theEnvironment,
+                rtl::OUString const & thePrefix,
                 css::uno::Reference< css::uno::XComponentContext > const &
                     theAlienContext,
                 rtl::OUString const & theRdbFile):
                 name(theName), loader(theLoader), uri(theUri),
-                prefix(thePrefix), alienContext(theAlienContext),
-                rdbFile(theRdbFile)
+                environment(theEnvironment), prefix(thePrefix),
+                alienContext(theAlienContext), rdbFile(theRdbFile)
             {}
 
             explicit ImplementationInfo(rtl::OUString const & theName):
@@ -68,6 +70,7 @@ public:
             rtl::OUString const name;
             rtl::OUString const loader;
             rtl::OUString const uri;
+            rtl::OUString const environment;
             rtl::OUString const prefix;
             css::uno::Reference< css::uno::XComponentContext > const
                 alienContext;
@@ -79,13 +82,15 @@ public:
         struct Implementation: private boost::noncopyable {
             Implementation(
                 rtl::OUString const & name, rtl::OUString const & loader,
-                rtl::OUString const & uri, rtl::OUString const & prefix,
+                rtl::OUString const & uri, rtl::OUString const & environment,
+                rtl::OUString const & prefix,
                 css::uno::Reference< css::uno::XComponentContext > const &
                     alienContext,
                 rtl::OUString const & rdbFile):
                 info(
                     new ImplementationInfo(
-                        name, loader, uri, prefix, alienContext, rdbFile)),
+                        name, loader, uri, environment, prefix, alienContext,
+                        rdbFile)),
                 loaded(false)
             {}
 
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 24bccf2..a6a048f 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -19,6 +19,8 @@
 
 #include "sal/config.h"
 
+#include <cassert>
+
 #include "osl/module.hxx"
 #include "uno/environment.h"
 #include <uno/lbnames.h>
@@ -49,11 +51,33 @@ using rtl::OUString;
 
 namespace {
 
+uno::Environment getEnvironment(
+    OUString const & name, OUString const & cImplName)
+{
+    OUString n(name);
+    static const char * pUNO_ENV_LOG = ::getenv( "UNO_ENV_LOG" );
+    if (pUNO_ENV_LOG && rtl_str_getLength(pUNO_ENV_LOG) )
+    {
+        OString implName(OUStringToOString(cImplName, RTL_TEXTENCODING_ASCII_US));
+        OString aEnv( pUNO_ENV_LOG );
+        sal_Int32 nIndex = 0;
+        do
+        {
+            const OString aStr( aEnv.getToken( 0, ';', nIndex ) );
+            if ( aStr.equals(implName) )
+            {
+                n += ::rtl::OUString(":log");
+                break;
+            }
+        } while( nIndex != -1 );
+    }
+    return uno::Environment(n);
+}
+
 #ifndef DISABLE_DYNLOADING
 
 void getLibEnv(oslModule                lib,
                       uno::Environment       * pEnv,
-                      OUString               * pSourceEnv_name,
                       uno::Environment const & cTargetEnv,
                       OUString         const & cImplName = OUString(),
                       OUString         const & rPrefix = OUString())
@@ -84,23 +108,8 @@ void getLibEnv(oslModule                lib,
 
     if (!pEnv->is() && pEnvTypeName)
     {
-        *pSourceEnv_name = OUString::createFromAscii(pEnvTypeName);
-        static const char * pUNO_ENV_LOG = ::getenv( "UNO_ENV_LOG" );
-        if (pUNO_ENV_LOG && rtl_str_getLength(pUNO_ENV_LOG) )
-        {
-            OString implName(OUStringToOString(cImplName, RTL_TEXTENCODING_ASCII_US));
-            OString aEnv( pUNO_ENV_LOG );
-            sal_Int32 nIndex = 0;
-            do
-            {
-                const OString aStr( aEnv.getToken( 0, ';', nIndex ) );
-                if ( aStr.equals(implName) )
-                {
-                    *pSourceEnv_name += ::rtl::OUString(":log");
-                    break;
-                }
-            } while( nIndex != -1 );
-        }
+        *pEnv = getEnvironment(
+            OUString::createFromAscii(pEnvTypeName), cImplName);
     }
 }
 
@@ -134,7 +143,7 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory(
     (void) rPath;
     (void) xKey;
     return cppuhelper::detail::loadSharedLibComponentFactory(
-        uri, "", rImplName, xMgr);
+        uri, "", "", rImplName, xMgr);
 }
 
 }
@@ -143,41 +152,19 @@ namespace
 {
 
 Reference< XInterface > invokeComponentFactory(
+    uno::Environment const & env,
     oslGenericFunction pGetter,
-    oslModule lib,
     OUString const & rModulePath,
     OUString const & rImplName,
     Reference< ::com::sun::star::lang::XMultiServiceFactory > const & xMgr,
-    OUString const & rPrefix,
     OUString &rExcMsg )
 {
     Reference< XInterface > xRet;
     uno::Environment currentEnv(Environment::getCurrent());
-    uno::Environment env;
-    OUString aEnvTypeName;
-
-#ifdef DISABLE_DYNLOADING
-    (void) lib;
-    (void) rPrefix;
-    // It seems that the only UNO components that have
-    // component_getImplementationEnvironment functions are the JDBC
-    // and ADO (whatever that is) database connectivity thingies
-    // neither of which make sense on iOS and Android (which are the
-    // only platforms for which DISABLE_DYNLOADING is intended,
-    // really). So we can simply bypass the getLibEnv() stuff and
-    // don't need to wonder how to find out what function to call at
-    // this point if statically linked.
-    aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-#else
-    getLibEnv(lib, &env, &aEnvTypeName, currentEnv, rImplName, rPrefix);
-#endif
 
     OString aImplName(
         OUStringToOString( rImplName, RTL_TEXTENCODING_ASCII_US ) );
 
-    if (!env.is())
-        env = uno::Environment(aEnvTypeName);
-
     if (env.is() && currentEnv.is())
     {
 #if OSL_DEBUG_LEVEL > 1
@@ -282,7 +269,8 @@ extern "C"
 namespace cppuhelper { namespace detail {
 
 css::uno::Reference<css::uno::XInterface> loadSharedLibComponentFactory(
-    OUString const & uri, OUString const & rPrefix, OUString const & rImplName,
+    OUString const & uri, OUString const & rEnvironment,
+    OUString const & rPrefix, OUString const & rImplName,
     css::uno::Reference<css::lang::XMultiServiceFactory> const & xMgr)
 {
 #ifndef DISABLE_DYNLOADING
@@ -388,7 +376,22 @@ css::uno::Reference<css::uno::XInterface> loadSharedLibComponentFactory(
 
     if (pSym != 0)
     {
-        xRet = invokeComponentFactory( pSym, lib, moduleUri, rImplName, xMgr, aFullPrefix, aExcMsg );
+        uno::Environment env;
+        if (rEnvironment.isEmpty()) {
+#if defined DISABLE_DYNLOADING
+            //TODO: assert(false); // this cannot happen
+            env = getEnvironment(CPPU_CURRENT_LANGUAGE_BINDING_NAME, rImplName);
+
+#else
+            getLibEnv(
+                lib, &env, Environment::getCurrent(), rImplName, aFullPrefix);
+#endif
+        } else {
+            env = getEnvironment(rEnvironment, rImplName);
+        }
+
+        xRet = invokeComponentFactory(
+            env, pSym, moduleUri, rImplName, xMgr, aExcMsg );
     }
     else
     {
@@ -451,18 +454,14 @@ void SAL_CALL writeSharedLibComponentInfo(
     uno::Environment currentEnv(Environment::getCurrent());
     uno::Environment env;
 
-    OUString aEnvTypeName;
     OUString aExcMsg;
 
-    getLibEnv(lib, &env, &aEnvTypeName, currentEnv);
+    getLibEnv(lib, &env, currentEnv);
 
     OUString aWriteInfoName = COMPONENT_WRITEINFO;
     oslGenericFunction pSym = osl_getFunctionSymbol( lib, aWriteInfoName.pData );
     if (pSym != 0)
     {
-        if (!env.is())
-            env = uno::Environment(aEnvTypeName);
-
         if (env.is() && currentEnv.is())
         {
             Mapping aCurrent2Env( currentEnv, env );
diff --git a/solenv/bin/createcomponent.xslt b/solenv/bin/createcomponent.xslt
index b6cb141..4e20a2d 100644
--- a/solenv/bin/createcomponent.xslt
+++ b/solenv/bin/createcomponent.xslt
@@ -22,6 +22,7 @@
     xmlns="http://openoffice.org/2010/uno-components"
     xmlns:uc="http://openoffice.org/2010/uno-components">
   <xsl:param name="uri"/>
+  <xsl:param name="cppu_env"/>
   <xsl:strip-space elements="*"/>
   <xsl:template match="uc:component">
     <components>
@@ -40,7 +41,36 @@
       <xsl:apply-templates/>
     </xsl:copy>
   </xsl:template>
+  <xsl:template match="@environment">
+    <xsl:attribute name="environment">
+      <xsl:call-template name="replace">
+        <xsl:with-param name="input" select="current()"/>
+        <xsl:with-param name="pattern" select="'@CPPU_ENV@'"/>
+        <xsl:with-param name="replace" select="$cppu_env"/>
+      </xsl:call-template>
+    </xsl:attribute>
+  </xsl:template>
   <xsl:template match="@*">
     <xsl:copy/>
   </xsl:template>
+  <xsl:template name="replace">
+    <xsl:param name="input"/>
+    <xsl:param name="pattern"/>
+    <xsl:param name="replace"/>
+    <xsl:choose>
+      <xsl:when test="contains($input, $pattern)">
+        <xsl:value-of select="substring-before($input, $pattern)"/>
+        <xsl:value-of select="$replace"/>
+        <xsl:call-template name="replace">
+          <xsl:with-param
+              name="input" select="substring-after($input, $pattern)"/>
+          <xsl:with-param name="pattern" select="$pattern"/>
+          <xsl:with-param name="replace" select="$replace"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$input"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
 </xsl:stylesheet>
diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk
index 56fa9e6..5395a4a 100644
--- a/solenv/gbuild/ComponentTarget.mk
+++ b/solenv/gbuild/ComponentTarget.mk
@@ -30,8 +30,9 @@ $(call gb_Output_announce,$(3),$(true),CMP,1)
 $(if $(LIBFILENAME),,$(call gb_Output_error,No LIBFILENAME set at component target: $(1)))
 $(call gb_Helper_abbreviate_dirs,\
 	mkdir -p $(dir $(1)) && \
-	$(call gb_ExternalExecutable_get_command,xsltproc) --nonet --stringparam uri \
-		'$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(subst \d,$$,$(COMPONENTPREFIX)))$(LIBFILENAME)' -o $(1) \
+	$(call gb_ExternalExecutable_get_command,xsltproc) --nonet \
+		--stringparam uri '$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(subst \d,$$,$(COMPONENTPREFIX)))$(LIBFILENAME)' \
+		--stringparam cppu_env $(gb_CPPU_ENV) -o $(1) \
 		$(gb_ComponentTarget_XSLTCOMMANDFILE) $(2))
 endef
 
commit 9630b973553c7db8e591adb34470228965f01491
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Dec 16 16:52:04 2013 +0100

    Parser::attrImplementation_ can be a local var
    
    Change-Id: I402040a4b747d457b1b7a3695d0b3567fa7bf478

diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index f05ebaf..512fb6b 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -126,7 +126,6 @@ private:
     rtl::OUString attrLoader_;
     rtl::OUString attrUri_;
     rtl::OUString attrPrefix_;
-    rtl::OUString attrImplementation_;
     boost::shared_ptr< cppuhelper::ServiceManager::Data::Implementation >
         implementation_;
 };
@@ -326,19 +325,19 @@ void Parser::handleComponent() {
 }
 
 void Parser::handleImplementation() {
-    attrImplementation_ = getNameAttribute();
+    OUString name(getNameAttribute());
     implementation_.reset(
         new cppuhelper::ServiceManager::Data::Implementation(
-            attrImplementation_, attrLoader_, attrUri_, attrPrefix_,
-            alienContext_, reader_.getUrl()));
+            name, attrLoader_, attrUri_, attrPrefix_, alienContext_,
+            reader_.getUrl()));
     if (!data_->namedImplementations.insert(
             cppuhelper::ServiceManager::Data::NamedImplementations::value_type(
-                attrImplementation_, implementation_)).
+                name, implementation_)).
         second)
     {
         throw css::registry::InvalidRegistryException(
-            (reader_.getUrl() + ": duplicate <implementation name=\""
-             + attrImplementation_ + "\">"),
+            (reader_.getUrl() + ": duplicate <implementation name=\"" + name
+             + "\">"),
             css::uno::Reference< css::uno::XInterface >());
     }
 }
commit ab16d1c619f27864a4a7315932acf2ecb5f16e78
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Dec 16 16:46:48 2013 +0100

    CPPU_CURRENT_NAMESPACE is impl detail, mark @deprecated
    
    Change-Id: I4f66403c197bb94ec0ce178f949ece80bab1116f

diff --git a/include/cppu/macros.hxx b/include/cppu/macros.hxx
index cc6d93a..d52a6ef 100644
--- a/include/cppu/macros.hxx
+++ b/include/cppu/macros.hxx
@@ -21,7 +21,10 @@
 
 #include <sal/types.h>
 
-/** Namespace name for compiler/ platform, e.g. gcc3, msci */
+/** Namespace name for compiler/ platform, e.g. gcc3, msci
+
+    @deprecated implementation detail, not to be used by client code
+*/
 #define CPPU_CURRENT_NAMESPACE CPPU_ENV
 
 /// @cond INTERNAL
commit a83b2af9abddfb2a6a127049374269b53241c183
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Dec 16 16:45:46 2013 +0100

    Clean-up uno/lbnames.h
    
    Change-Id: I4bd729499aa8be58f04194656e35c1f79d5d4919

diff --git a/bridges/inc/bridges/cpp_uno/bridge.hxx b/bridges/inc/bridges/cpp_uno/bridge.hxx
index ba9a847..e6ffc49 100644
--- a/bridges/inc/bridges/cpp_uno/bridge.hxx
+++ b/bridges/inc/bridges/cpp_uno/bridge.hxx
@@ -25,7 +25,7 @@
 #include <rtl/ustrbuf.hxx>
 #include <com/sun/star/uno/genfunc.hxx>
 #include <com/sun/star/uno/XInterface.hpp>
-
+#include <uno/lbnames.h>
 
 namespace CPPU_CURRENT_NAMESPACE
 {
diff --git a/bridges/test/java_uno/acquire/testacquire.cxx b/bridges/test/java_uno/acquire/testacquire.cxx
index 0aacd14..99d0a98 100644
--- a/bridges/test/java_uno/acquire/testacquire.cxx
+++ b/bridges/test/java_uno/acquire/testacquire.cxx
@@ -46,7 +46,6 @@
 #include "test/javauno/acquire/XDerived.hpp"
 #include "test/javauno/acquire/XTest.hpp"
 #include "uno/environment.h"
-#include "uno/lbnames.h"
 
 #include <iostream>
 #include <cstdlib>
diff --git a/bridges/test/java_uno/any/transport.cxx b/bridges/test/java_uno/any/transport.cxx
index 2200e32..240b5f8 100644
--- a/bridges/test/java_uno/any/transport.cxx
+++ b/bridges/test/java_uno/any/transport.cxx
@@ -20,6 +20,7 @@
 
 #include "jni.h"
 
+#include <uno/lbnames.h>
 #include "uno/mapping.hxx"
 #include "uno/environment.hxx"
 #include "jvmaccess/virtualmachine.hxx"
diff --git a/bridges/test/java_uno/equals/testequals.cxx b/bridges/test/java_uno/equals/testequals.cxx
index 393202c..4078729 100644
--- a/bridges/test/java_uno/equals/testequals.cxx
+++ b/bridges/test/java_uno/equals/testequals.cxx
@@ -45,7 +45,6 @@
 #include "test/java_uno/equals/XDerived.hpp"
 #include "test/java_uno/equals/XTestInterface.hpp"
 #include "uno/environment.h"
-#include "uno/lbnames.h"
 
 namespace {
 
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
index 0577ad9..6657a05 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
@@ -42,7 +42,6 @@
 #include "osl/thread.hxx"
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
-#include "uno/lbnames.h"
 
 #include <iostream>
 
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
index 6a0258a..7f8c675 100644
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
@@ -39,7 +39,6 @@
 #include "cppuhelper/weak.hxx"
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
-#include "uno/lbnames.h"
 
 namespace {
 
diff --git a/cli_ure/source/native/native_share.h b/cli_ure/source/native/native_share.h
index 7c97153..aaae581 100644
--- a/cli_ure/source/native/native_share.h
+++ b/cli_ure/source/native/native_share.h
@@ -21,6 +21,7 @@
 #using "cli_uretypes.dll"
 
 #include "rtl/ustring.hxx"
+#include <uno/lbnames.h>
 #include "uno/mapping.hxx"
 
 #include <vcclr.h>
diff --git a/connectivity/source/drivers/ado/Aservices.cxx b/connectivity/source/drivers/ado/Aservices.cxx
index f1a9df4..a5ef101 100644
--- a/connectivity/source/drivers/ado/Aservices.cxx
+++ b/connectivity/source/drivers/ado/Aservices.cxx
@@ -19,6 +19,7 @@
 
 #include "ado/ADriver.hxx"
 #include <cppuhelper/factory.hxx>
+#include <uno/lbnames.h>
 
 using namespace connectivity::ado;
 using ::com::sun::star::uno::Reference;
diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx
index e485b61..81cfc3c 100644
--- a/connectivity/source/drivers/jdbc/jservices.cxx
+++ b/connectivity/source/drivers/jdbc/jservices.cxx
@@ -19,6 +19,7 @@
 
 #include "java/sql/Driver.hxx"
 #include <cppuhelper/factory.hxx>
+#include <uno/lbnames.h>
 
 using namespace connectivity;
 using ::com::sun::star::uno::Reference;
diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx
index 227a9ab..340ef21 100644
--- a/cppu/source/threadpool/current.cxx
+++ b/cppu/source/threadpool/current.cxx
@@ -24,7 +24,6 @@
 
 #include "uno/environment.hxx"
 #include "uno/mapping.hxx"
-#include "uno/lbnames.h"
 #include "typelib/typedescription.h"
 
 #include "current.hxx"
diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx
index 59da613..0d56124 100644
--- a/cppu/source/uno/EnvStack.cxx
+++ b/cppu/source/uno/EnvStack.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "uno/environment.hxx"
+#include <uno/lbnames.h>
 
 #include "cppu/EnvDcp.hxx"
 #include "cppu/Enterable.hxx"
diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx
index bc954c6..7a8f859 100644
--- a/cppu/source/uno/cascade_mapping.cxx
+++ b/cppu/source/uno/cascade_mapping.cxx
@@ -20,6 +20,7 @@
 #include "osl/interlck.h"
 #include "rtl/ustring.hxx"
 #include "uno/environment.hxx"
+#include <uno/lbnames.h>
 #include "uno/mapping.hxx"
 #include "uno/dispatcher.h"
 
diff --git a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
index 88919ed..cd62d5e 100644
--- a/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
+++ b/cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
@@ -47,7 +47,6 @@
 #include "rtl/ustring.h"
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
-#include "uno/lbnames.h"
 
 namespace com { namespace sun { namespace star {
     class XEventListener;
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index ab2ebf9..8f722f0 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -37,6 +37,7 @@
 
 #include <rtl/ustrbuf.hxx>
 
+#include <uno/lbnames.h>
 #include <uno/mapping.hxx>
 
 #include <cppuhelper/implbase1.hxx>
@@ -859,7 +860,7 @@ Reference< XComponentContext > SAL_CALL createComponentContext(
     SAL_THROW(())
 {
     uno::Environment curr_env(Environment::getCurrent());
-    uno::Environment source_env(rtl::OUString(CPPU_STRINGIFY(CPPU_ENV)));
+    uno::Environment source_env(CPPU_CURRENT_LANGUAGE_BINDING_NAME);
 
     uno::Mapping curr2source(curr_env, source_env);
     uno::Mapping source2curr(source_env, curr_env);
diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx
index a7de5c8..7a32220 100644
--- a/cppuhelper/source/exc_thrower.cxx
+++ b/cppuhelper/source/exc_thrower.cxx
@@ -23,6 +23,7 @@
 #include "osl/doublecheckedlocking.h"
 #include "osl/mutex.hxx"
 #include "uno/dispatcher.hxx"
+#include <uno/lbnames.h>
 #include "uno/mapping.hxx"
 #include "cppuhelper/detail/XExceptionThrower.hpp"
 #include "com/sun/star/uno/RuntimeException.hpp"
diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx
index 24708d9..4574296 100644
--- a/cppuhelper/source/macro_expander.cxx
+++ b/cppuhelper/source/macro_expander.cxx
@@ -20,6 +20,7 @@
 
 #include <rtl/bootstrap.hxx>
 
+#include <uno/lbnames.h>
 #include <uno/mapping.hxx>
 
 #include <cppuhelper/factory.hxx>
@@ -198,7 +199,7 @@ Reference< lang::XSingleComponentFactory > create_bootstrap_macro_expander_facto
                                                         s_get_service_names() ));
 
     uno::Environment curr_env(Environment::getCurrent());
-    uno::Environment target_env(rtl::OUString(CPPU_STRINGIFY(CPPU_ENV)));
+    uno::Environment target_env(CPPU_CURRENT_LANGUAGE_BINDING_NAME);
 
     uno::Mapping target2curr(target_env, curr_env);
 
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 4af19ec..24bccf2 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -21,6 +21,7 @@
 
 #include "osl/module.hxx"
 #include "uno/environment.h"
+#include <uno/lbnames.h>
 #include "uno/mapping.hxx"
 #include "cppuhelper/factory.hxx"
 #include "cppuhelper/shlib.hxx"
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index 023e112..df6adc6 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -28,6 +28,7 @@
 #include <rtl/alloc.h>
 #include <rtl/ustring.hxx>
 
+#include <uno/lbnames.h>
 #include <uno/mapping.hxx>
 
 #include <cppuhelper/bootstrap.hxx>
@@ -746,7 +747,7 @@ sal_Bool SAL_CALL installTypeDescriptionManager(
     SAL_THROW(())
 {
     uno::Environment curr_env(Environment::getCurrent());
-    uno::Environment target_env(rtl::OUString(CPPU_STRINGIFY(CPPU_ENV)));
+    uno::Environment target_env(CPPU_CURRENT_LANGUAGE_BINDING_NAME);
 
     uno::Mapping curr2target(curr_env, target_env);
 
diff --git a/cppuhelper/test/bootstrap/bootstrap.test.cxx b/cppuhelper/test/bootstrap/bootstrap.test.cxx
index 27ae9ed..7c566d9 100644
--- a/cppuhelper/test/bootstrap/bootstrap.test.cxx
+++ b/cppuhelper/test/bootstrap/bootstrap.test.cxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/lang/XComponent.hpp>
 
 #include "uno/environment.hxx"
+#include <uno/lbnames.h>
 #include "cppu/EnvDcp.hxx"
 #include "cppu/EnvGuards.hxx"
 
diff --git a/cppuhelper/test/testcmp/TestComponent.cxx b/cppuhelper/test/testcmp/TestComponent.cxx
index 999417a..3e5db32 100644
--- a/cppuhelper/test/testcmp/TestComponent.cxx
+++ b/cppuhelper/test/testcmp/TestComponent.cxx
@@ -40,6 +40,7 @@
 #include "cppu/EnvDcp.hxx"
 
 #include <uno/environment.hxx>
+#include <uno/lbnames.h>
 
 using namespace ::com::sun::star;
 
@@ -222,7 +223,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT  void SAL_CALL component_getImplementationEnviro
     else
     {
         char buff[256];
-        strcpy(buff, CPPU_STRINGIFY(CPPU_ENV));
+        strcpy(buff, CPPU_CURRENT_LANGUAGE_BINDING_NAME);
         strcat(buff, purpose.getStr());
 
         *envTypeName = strdup(buff);
diff --git a/desktop/test/deployment/active/active_native.cxx b/desktop/test/deployment/active/active_native.cxx
index f84336d..9591c9d 100644
--- a/desktop/test/deployment/active/active_native.cxx
+++ b/desktop/test/deployment/active/active_native.cxx
@@ -54,7 +54,6 @@
 #include "rtl/ustring.hxx"
 #include "sal/log.hxx"
 #include "sal/types.h"
-#include "uno/lbnames.h"
 
 namespace {
 
diff --git a/desktop/test/deployment/passive/passive_native.cxx b/desktop/test/deployment/passive/passive_native.cxx
index 93af8ab..b4f7887 100644
--- a/desktop/test/deployment/passive/passive_native.cxx
+++ b/desktop/test/deployment/passive/passive_native.cxx
@@ -51,7 +51,6 @@
 #include "cppuhelper/weak.hxx"
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
-#include "uno/lbnames.h"
 
 namespace {
 
diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx
index 372d0f0..e071c63 100644
--- a/forms/source/misc/services.cxx
+++ b/forms/source/misc/services.cxx
@@ -20,7 +20,6 @@
 #include "services.hxx"
 #include "frm_module.hxx"
 #include <cppuhelper/factory.hxx>
-#include <uno/lbnames.h>
 #include <osl/diagnose.h>
 #include <uno/mapping.hxx>
 
diff --git a/include/cppu/macros.hxx b/include/cppu/macros.hxx
index 86c2b1e..cc6d93a 100644
--- a/include/cppu/macros.hxx
+++ b/include/cppu/macros.hxx
@@ -20,7 +20,6 @@
 #define INCLUDED_CPPU_MACROS_HXX
 
 #include <sal/types.h>
-#include <uno/lbnames.h>
 
 /** Namespace name for compiler/ platform, e.g. gcc3, msci */
 #define CPPU_CURRENT_NAMESPACE CPPU_ENV
diff --git a/include/linguistic/hyphdta.hxx b/include/linguistic/hyphdta.hxx
index c3edd44..a6cc8c2 100644
--- a/include/linguistic/hyphdta.hxx
+++ b/include/linguistic/hyphdta.hxx
@@ -23,7 +23,6 @@
 #include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
 #include <com/sun/star/linguistic2/XPossibleHyphens.hpp>
 #include <tools/solar.h>
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 #include <linguistic/lngdllapi.h>
 
diff --git a/include/linguistic/lngprophelp.hxx b/include/linguistic/lngprophelp.hxx
index d082586..f1ba3d1 100644
--- a/include/linguistic/lngprophelp.hxx
+++ b/include/linguistic/lngprophelp.hxx
@@ -21,7 +21,6 @@
 #define INCLUDED_LINGUISTIC_LNGPROPHELP_HXX
 
 #include <tools/solar.h>
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase2.hxx>
 #include <cppuhelper/interfacecontainer.h>
 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
diff --git a/include/linguistic/misc.hxx b/include/linguistic/misc.hxx
index 5bbc321..101ffd4 100644
--- a/include/linguistic/misc.hxx
+++ b/include/linguistic/misc.hxx
@@ -31,7 +31,6 @@
 #include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
 #include <com/sun/star/linguistic2/XLinguProperties.hpp>
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 #include <unotools/pathoptions.hxx>
 #include <i18nlangtag/lang.h>
diff --git a/include/linguistic/spelldta.hxx b/include/linguistic/spelldta.hxx
index c4e8348..362b8a5 100644
--- a/include/linguistic/spelldta.hxx
+++ b/include/linguistic/spelldta.hxx
@@ -27,7 +27,6 @@
 
 #include <tools/solar.h>
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase2.hxx>
 #include <linguistic/lngdllapi.h>
 
diff --git a/include/uno/current_context.hxx b/include/uno/current_context.hxx
index 3019006..e75f41f 100644
--- a/include/uno/current_context.hxx
+++ b/include/uno/current_context.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_UNO_CURRENT_CONTEXT_HXX
 
 #include <uno/current_context.h>
+#include <uno/lbnames.h>
 
 #include <com/sun/star/uno/XCurrentContext.hpp>
 
diff --git a/include/uno/environment.hxx b/include/uno/environment.hxx
index cd5db7a..0f4d15b 100644
--- a/include/uno/environment.hxx
+++ b/include/uno/environment.hxx
@@ -55,7 +55,7 @@ public:
                           respectively to current C++ Environment.
         @since UDK 3.2.7
     */
-    inline static Environment getCurrent(rtl::OUString const & typeName = rtl::OUString(CPPU_STRINGIFY(CPPU_ENV))) SAL_THROW(());
+    inline static Environment getCurrent(rtl::OUString const & typeName = rtl::OUString(CPPU_CURRENT_LANGUAGE_BINDING_NAME)) SAL_THROW(());
 
     /// @cond INTERNAL
     // these are here to force memory de/allocation to sal lib.
diff --git a/include/uno/lbnames.h b/include/uno/lbnames.h
index bc2afa6..83a4608 100644
--- a/include/uno/lbnames.h
+++ b/include/uno/lbnames.h
@@ -21,15 +21,16 @@
 
 /* I assume "LB" means "Language Binding" */
 
+#include <sal/config.h>
+
+#include <sal/macros.h>
+
 #ifdef __cplusplus
 
 #ifdef CPPU_ENV
 
-#define CPPU_STRINGIFY_EX( x ) #x
-#define CPPU_STRINGIFY( x ) CPPU_STRINGIFY_EX( x )
-
 /** Name for C++ compiler/ platform, e.g. "gcc3", "msci" */
-#define CPPU_CURRENT_LANGUAGE_BINDING_NAME CPPU_STRINGIFY( CPPU_ENV )
+#define CPPU_CURRENT_LANGUAGE_BINDING_NAME SAL_STRINGIFY( CPPU_ENV )
 
 #else
 
diff --git a/include/uno/mapping.hxx b/include/uno/mapping.hxx
index 5f96972..f882817 100644
--- a/include/uno/mapping.hxx
+++ b/include/uno/mapping.hxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/uno/Reference.hxx>
 #include <cppu/unotype.hxx>
 #include <uno/environment.hxx>
+#include <uno/lbnames.h>
 
 typedef struct _typelib_TypeDescription typelib_TypeDescription;
 typedef struct _typelib_InterfaceTypeDescription typelib_InterfaceTypeDescription;
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx
index 0fa2558..645d6cd 100644
--- a/javaunohelper/source/bootstrap.cxx
+++ b/javaunohelper/source/bootstrap.cxx
@@ -25,6 +25,7 @@
 #include "rtl/bootstrap.hxx"
 #include "rtl/string.hxx"
 
+#include <uno/lbnames.h>
 #include "uno/mapping.hxx"
 #include "uno/environment.hxx"
 
diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx
index 0ba0b5f..968acac 100644
--- a/javaunohelper/source/javaunohelper.cxx
+++ b/javaunohelper/source/javaunohelper.cxx
@@ -23,6 +23,7 @@
 #include <osl/module.h>
 
 #include <uno/environment.hxx>
+#include <uno/lbnames.h>
 #include <uno/mapping.hxx>
 
 #include <cppuhelper/factory.hxx>
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
index 69be979..ec984a9 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
@@ -21,7 +21,6 @@
 #ifndef _LINGU2_HYPHENIMP_HXX_
 #define _LINGU2_HYPHENIMP_HXX_
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/implbase6.hxx>
 #include <com/sun/star/lang/XComponent.hpp>
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
index 06db942..4ca0254 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.hxx
@@ -20,7 +20,6 @@
 #ifndef _MACSPELLIMP_H_
 #define _MACSPELLIMP_H_
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/implbase6.hxx>
 
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx
index 89ac20e..1ea380b 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_LINGUCOMPONENT_SOURCE_SPELLCHECK_SPELL_SSPELLIMP_HXX
 #define INCLUDED_LINGUCOMPONENT_SOURCE_SPELLCHECK_SPELL_SSPELLIMP_HXX
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/implbase6.hxx>
 #include <com/sun/star/lang/XComponent.hpp>
diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
index fb9d6fb..dce8c47 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
@@ -25,7 +25,6 @@
 
 #include <tools/solar.h>
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 
 
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
index d362a90..bf00ab0 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx
@@ -20,7 +20,6 @@
 #ifndef _LINGU2_THESIMP_HXX_
 #define _LINGU2_THESIMP_HXX_
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/implbase5.hxx>
 #include <com/sun/star/uno/Reference.h>
diff --git a/linguistic/inc/iprcache.hxx b/linguistic/inc/iprcache.hxx
index db98fb4..806d09c 100644
--- a/linguistic/inc/iprcache.hxx
+++ b/linguistic/inc/iprcache.hxx
@@ -20,8 +20,6 @@
 #ifndef INCLUDED_LINGUISTIC_INC_IPRCACHE_HXX
 #define INCLUDED_LINGUISTIC_INC_IPRCACHE_HXX
 
-
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase2.hxx>
 
 #include <com/sun/star/uno/Reference.h>
diff --git a/linguistic/source/dicimp.hxx b/linguistic/source/dicimp.hxx
index baf1db4..dee9df3 100644
--- a/linguistic/source/dicimp.hxx
+++ b/linguistic/source/dicimp.hxx
@@ -24,7 +24,6 @@
 #include <com/sun/star/frame/XStorable.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase2.hxx>
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/interfacecontainer.h>
diff --git a/linguistic/source/dlistimp.hxx b/linguistic/source/dlistimp.hxx
index daf5b18..ddfafe6 100644
--- a/linguistic/source/dlistimp.hxx
+++ b/linguistic/source/dlistimp.hxx
@@ -24,7 +24,6 @@
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/implbase3.hxx>
 #include <cppuhelper/interfacecontainer.h>
diff --git a/linguistic/source/hyphdsp.hxx b/linguistic/source/hyphdsp.hxx
index 90b1630..390bd44 100644
--- a/linguistic/source/hyphdsp.hxx
+++ b/linguistic/source/hyphdsp.hxx
@@ -30,7 +30,6 @@
 #include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
 #include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp>
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 
 #include <boost/shared_ptr.hpp>
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 694d6a7..7dbf331 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -25,7 +25,6 @@
 #include <tools/debug.hxx>
 #include <unotools/lingucfg.hxx>
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 
 #include <cppuhelper/factory.hxx>
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 4d68370..4e3df8e 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_LINGUISTIC_SOURCE_LNGOPT_HXX
 #define INCLUDED_LINGUISTIC_SOURCE_LNGOPT_HXX
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase5.hxx>
 #include <cppuhelper/interfacecontainer.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index 2ad9416..cc926b6 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_LINGUISTIC_SOURCE_LNGSVCMGR_HXX
 #define INCLUDED_LINGUISTIC_SOURCE_LNGSVCMGR_HXX
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase3.hxx>
 #include <cppuhelper/interfacecontainer.h>
 
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx
index b00f084..1c95e8d 100644
--- a/linguistic/source/spelldsp.hxx
+++ b/linguistic/source/spelldsp.hxx
@@ -24,7 +24,6 @@
 #include "linguistic/misc.hxx"
 #include "iprcache.hxx"
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/implbase2.hxx>
 #include <cppuhelper/implbase7.hxx>
diff --git a/linguistic/source/thesdsp.hxx b/linguistic/source/thesdsp.hxx
index f49b953..1f9e897 100644
--- a/linguistic/source/thesdsp.hxx
+++ b/linguistic/source/thesdsp.hxx
@@ -32,7 +32,6 @@
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/linguistic2/XThesaurus.hpp>
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/implbase5.hxx>
 #include <cppuhelper/interfacecontainer.h>
diff --git a/linguistic/workben/sprophelp.hxx b/linguistic/workben/sprophelp.hxx
index c6f4da4..50a6bb8 100644
--- a/linguistic/workben/sprophelp.hxx
+++ b/linguistic/workben/sprophelp.hxx
@@ -22,7 +22,6 @@
 
 #include <tools/solar.h>
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase2.hxx>
 #include <cppuhelper/interfacecontainer.h>
 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
diff --git a/linguistic/workben/sspellimp.hxx b/linguistic/workben/sspellimp.hxx
index f53cb46..2ee5745 100644
--- a/linguistic/workben/sspellimp.hxx
+++ b/linguistic/workben/sspellimp.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_LINGUISTIC_WORKBEN_SSPELLIMP_HXX
 #define INCLUDED_LINGUISTIC_WORKBEN_SSPELLIMP_HXX
 
-#include <uno/lbnames.h>
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/implbase6.hxx>
 #include <com/sun/star/lang/XComponent.hpp>
diff --git a/sc/workben/addin.cxx b/sc/workben/addin.cxx
index 1d4d38a..e1ac997 100644
--- a/sc/workben/addin.cxx
+++ b/sc/workben/addin.cxx
@@ -30,7 +30,6 @@
 #include <svl/itemprop.hxx>
 #include <usr/proptypehlp.hxx>
 #include <cppuhelper/factory.hxx>
-#include <uno/lbnames.h>
 #include <osl/diagnose.h>
 
 #include <com/sun/star/util/date.hpp>
diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx
index 9b533ea..b77e26d 100644
--- a/sd/source/ui/unoidl/facreg.cxx
+++ b/sd/source/ui/unoidl/facreg.cxx
@@ -22,7 +22,6 @@
 #include "sddll.hxx"
 
 #include <cppuhelper/factory.hxx>
-#include <uno/lbnames.h>
 #include <sfx2/sfxmodelfactory.hxx>
 #include "osl/diagnose.h"
 #include "sal/types.h"
diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx
index 3e8e8c1..8233bff 100644
--- a/shell/source/backends/desktopbe/desktopbackend.cxx
+++ b/shell/source/backends/desktopbe/desktopbackend.cxx
@@ -49,7 +49,6 @@
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
 #include "uno/current_context.hxx"
-#include "uno/lbnames.h"
 
 namespace {
 
diff --git a/shell/source/backends/gconfbe/gconfbackend.cxx b/shell/source/backends/gconfbe/gconfbackend.cxx
index 97441d9..47d6cdb 100644
--- a/shell/source/backends/gconfbe/gconfbackend.cxx
+++ b/shell/source/backends/gconfbe/gconfbackend.cxx
@@ -48,7 +48,6 @@
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
 #include "uno/current_context.hxx"
-#include "uno/lbnames.h"
 
 #include "gconfaccess.hxx"
 
diff --git a/shell/source/backends/kde4be/kde4backend.cxx b/shell/source/backends/kde4be/kde4backend.cxx
index 672c41e..bf12683 100644
--- a/shell/source/backends/kde4be/kde4backend.cxx
+++ b/shell/source/backends/kde4be/kde4backend.cxx
@@ -48,7 +48,6 @@
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
 #include "uno/current_context.hxx"
-#include "uno/lbnames.h"
 
 #include "kde4access.hxx"
 
diff --git a/shell/source/backends/kdebe/kdebackend.cxx b/shell/source/backends/kdebe/kdebackend.cxx
index 607e1b5..8089632 100644
--- a/shell/source/backends/kdebe/kdebackend.cxx
+++ b/shell/source/backends/kdebe/kdebackend.cxx
@@ -46,7 +46,6 @@
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
 #include "uno/current_context.hxx"
-#include "uno/lbnames.h"
 
 #include "shell/kde_headers.h"
 
diff --git a/stoc/source/bootstrap/services.cxx b/stoc/source/bootstrap/services.cxx
index 7e81e13..126558e 100644
--- a/stoc/source/bootstrap/services.cxx
+++ b/stoc/source/bootstrap/services.cxx
@@ -24,7 +24,6 @@
 #include "cppuhelper/implementationentry.hxx"
 #include "sal/types.h"
 #include "uno/environment.h"
-#include "uno/lbnames.h"
 
 #include <stdio.h>
 
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index f5919ca..866a4f7 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/reflection/XConstantTypeDescription.hpp>
 #include <com/sun/star/reflection/XTypeDescription.hpp>
 #include "com/sun/star/uno/RuntimeException.hpp"
+#include <uno/lbnames.h>
 
 using namespace com::sun::star;
 using namespace com::sun::star::lang;
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index 9f49476..93f2b68 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -28,6 +28,7 @@
 #include <uno/dispatcher.h>
 #include <uno/data.h>
 #include <uno/any2.h>
+#include <uno/lbnames.h>
 #include <uno/mapping.hxx>
 
 #include <cppuhelper/factory.hxx>
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx
index 83887e9..164006f 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -25,6 +25,7 @@
 #include <rtl/ustrbuf.hxx>
 
 #include <uno/environment.h>
+#include <uno/lbnames.h>
 #include <uno/mapping.hxx>
 #include "com/sun/star/uno/RuntimeException.hpp"
 
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index a102b86..b1cbf95 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -70,7 +70,6 @@
 #include "sal/types.h"
 #include "uno/current_context.hxx"
 #include "uno/environment.h"
-#include "uno/lbnames.h"
 #include "jvmfwk/framework.h"
 #include "jni.h"
 
diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx
index 5ac0864..d4cb327 100644
--- a/stoc/source/proxy_factory/proxyfac.cxx
+++ b/stoc/source/proxy_factory/proxyfac.cxx
@@ -25,6 +25,7 @@
 #include "rtl/ref.hxx"
 #include "uno/dispatcher.hxx"
 #include "uno/data.h"
+#include <uno/lbnames.h>
 #include "uno/mapping.hxx"
 #include "uno/environment.hxx"
 #include "typelib/typedescription.hxx"
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index ee218a8..30f4efb 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -30,6 +30,7 @@
 #include <rtl/string.hxx>
 
 #include <uno/current_context.h>
+#include <uno/lbnames.h>
 
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/compbase3.hxx>
diff --git a/stoc/source/stocservices/stocservices.cxx b/stoc/source/stocservices/stocservices.cxx
index 44fcc4e..fc4d765 100644
--- a/stoc/source/stocservices/stocservices.cxx
+++ b/stoc/source/stocservices/stocservices.cxx
@@ -24,7 +24,6 @@
 #include "cppuhelper/implementationentry.hxx"
 #include "sal/types.h"
 #include "uno/environment.h"
-#include "uno/lbnames.h"
 
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
diff --git a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx
index 8038d61..3b94260 100644
--- a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx
+++ b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx
@@ -50,7 +50,6 @@
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
 #include "uno/environment.h"
-#include "uno/lbnames.h"
 
 #include /*MSVC trouble: <cstdlib>*/ <stdlib.h>
 #include <iostream>
diff --git a/stoc/test/tdmanager/testtdmanager.cxx b/stoc/test/tdmanager/testtdmanager.cxx
index c4e19a1..59fa9c2 100644
--- a/stoc/test/tdmanager/testtdmanager.cxx
+++ b/stoc/test/tdmanager/testtdmanager.cxx
@@ -48,7 +48,6 @@
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
 #include "uno/environment.h"
-#include "uno/lbnames.h"
 
 #include /*MSVC trouble: <cstdlib>*/ <stdlib.h>
 #include <iostream>
diff --git a/stoc/test/testproxyfac.cxx b/stoc/test/testproxyfac.cxx
index 769e93e..d564ba6 100644
--- a/stoc/test/testproxyfac.cxx
+++ b/stoc/test/testproxyfac.cxx
@@ -22,6 +22,7 @@
 #include "osl/diagnose.h"
 #include "rtl/alloc.h"
 #include "uno/environment.hxx"
+#include <uno/lbnames.h>
 #include "cppuhelper/servicefactory.hxx"
 #include "cppuhelper/implbase1.hxx"
 #include "cppuhelper/implbase3.hxx"
diff --git a/svx/source/core/coreservices.cxx b/svx/source/core/coreservices.cxx
index 37bc2e3..4258864 100644
--- a/svx/source/core/coreservices.cxx
+++ b/svx/source/core/coreservices.cxx
@@ -23,8 +23,6 @@
 #include "sal/types.h"
 #include "osl/diagnose.h"
 #include "cppuhelper/factory.hxx"
-#include "uno/lbnames.h"
-
 
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx
index 37c34c5..6963cf9 100644
--- a/svx/source/unodraw/unoctabl.cxx
+++ b/svx/source/unodraw/unoctabl.cxx
@@ -229,7 +229,6 @@ uno::Reference< uno::XInterface > SAL_CALL create_EnhancedCustomShapeEngine( con
 #include "sal/types.h"
 #include "osl/diagnose.h"
 #include "cppuhelper/factory.hxx"
-#include "uno/lbnames.h"
 #include <svx/sdr/primitive2d/primitiveFactory2d.hxx>
 #include "sidebar/PanelFactory.hxx"
 
diff --git a/sw/source/ui/uno/unofreg.cxx b/sw/source/ui/uno/unofreg.cxx
index 995c263..4c36a3c 100644
--- a/sw/source/ui/uno/unofreg.cxx
+++ b/sw/source/ui/uno/unofreg.cxx
@@ -20,7 +20,6 @@
 #include "SwXFilterOptions.hxx"
 #include "sal/types.h"
 #include <osl/diagnose.h>
-#include <uno/lbnames.h>
 #include <cppuhelper/factory.hxx>
 #include <sfx2/sfxmodelfactory.hxx>
 
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index fc03a85..fbc8791 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -26,6 +26,7 @@
 #include <sal/types.h>
 #include "typelib/typedescription.hxx"
 #include <uno/dispatcher.hxx>
+#include <uno/lbnames.h>
 #include "uno/mapping.hxx"
 #include <uno/data.h>
 #include "uno/environment.hxx"
diff --git a/testtools/source/bridgetest/constructors.cxx b/testtools/source/bridgetest/constructors.cxx
index ac011bf..4bf77b9 100644
--- a/testtools/source/bridgetest/constructors.cxx
+++ b/testtools/source/bridgetest/constructors.cxx
@@ -45,7 +45,6 @@
 #include "test/testtools/bridgetest/TestPolyStruct.hpp"
 #include "test/testtools/bridgetest/TestPolyStruct2.hpp"
 #include "test/testtools/bridgetest/XMultiBase1.hpp"
-#include "uno/lbnames.h"
 
 namespace {
 
diff --git a/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx
index 00c2a35..acdeb82 100644
--- a/testtools/source/performance/ubtest.cxx
+++ b/testtools/source/performance/ubtest.cxx
@@ -44,6 +44,7 @@
 #include <rtl/ustrbuf.hxx>
 
 #include <uno/environment.hxx>
+#include <uno/lbnames.h>
 #include <uno/mapping.hxx>
 
 #include <cppuhelper/factory.hxx>
diff --git a/ucb/source/ucp/webdav/webdavservices.cxx b/ucb/source/ucp/webdav/webdavservices.cxx
index 6bf9f78..2aaaea1 100644
--- a/ucb/source/ucp/webdav/webdavservices.cxx
+++ b/ucb/source/ucp/webdav/webdavservices.cxx
@@ -20,6 +20,7 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <com/sun/star/registry/XRegistryKey.hpp>
+#include <uno/lbnames.h>
 #include "webdavprovider.hxx"
 
 using namespace com::sun::star;
diff --git a/ure/source/uretest/cppmain.cc b/ure/source/uretest/cppmain.cc
index 2759356..1e63cd3 100644
--- a/ure/source/uretest/cppmain.cc
+++ b/ure/source/uretest/cppmain.cc
@@ -68,7 +68,6 @@
 #include "salhelper/simplereferenceobject.hxx"
 #include "uno/current_context.hxx"
 #include "uno/environment.h"
-#include "uno/lbnames.h"
 
 #include "test/types/CppTest.hpp"
 #include "test/types/JavaTest.hpp"
diff --git a/ure/source/uretest/cppserver.cc b/ure/source/uretest/cppserver.cc
index cee80d3..450c04d 100644
--- a/ure/source/uretest/cppserver.cc
+++ b/ure/source/uretest/cppserver.cc
@@ -34,7 +34,6 @@
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
 #include "uno/environment.h"
-#include "uno/lbnames.h"
 
 #include "test/types/Data.hpp"
 #include "test/types/XServer.hpp"
diff --git a/ure/source/uretest/cpptest.cc b/ure/source/uretest/cpptest.cc
index 5bd2006..04dba6f 100644
--- a/ure/source/uretest/cpptest.cc
+++ b/ure/source/uretest/cpptest.cc
@@ -32,7 +32,6 @@
 #include "rtl/ustring.hxx"
 #include "sal/types.h"
 #include "uno/environment.h"
-#include "uno/lbnames.h"
 
 #include "test/types/TestException.hpp"
 #include "test/types/XTest.hpp"
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index 229399a..141ef860 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -28,7 +28,6 @@
 #include <osl/diagnose.h>
 
 #include <cppuhelper/factory.hxx>
-#include <uno/lbnames.h>
 #include <xmloff/xmlreg.hxx>
 
 using namespace com::sun::star;
commit 698158655a9e2e74acc065899e668d365c2b4195
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Dec 16 15:11:56 2013 +0100

    Clean-up: The "_" delimiter is logically not part of the prefix
    
    Change-Id: I60329aabe465da48aac11ad76dd72e9a0ae4d078

diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index ae2060d..f05ebaf 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -650,12 +650,8 @@ void cppuhelper::ServiceManager::loadImplementation(
     if (!info->alienContext.is()
         && info->loader == "com.sun.star.loader.SharedLibrary")
     {
-        rtl::OUString prefix(info->prefix);
-        if (!prefix.isEmpty()) {
-            prefix += "_";
-        }
         f0 = cppuhelper::detail::loadSharedLibComponentFactory(
-            uri, prefix, info->name, this);
+            uri, info->prefix, info->name, this);
     } else {
         SAL_WARN_IF(
             !info->prefix.isEmpty(), "cppuhelper",
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index ecb3f1f..4af19ec 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -316,7 +316,11 @@ css::uno::Reference<css::uno::XInterface> loadSharedLibComponentFactory(
 
     OUString aExcMsg;
 
-    OUString aGetFactoryName = rPrefix + COMPONENT_GETFACTORY;
+    OUString aFullPrefix(rPrefix);
+    if (!aFullPrefix.isEmpty()) {
+        aFullPrefix += "_";
+    }
+    OUString aGetFactoryName = aFullPrefix + COMPONENT_GETFACTORY;
 
     oslGenericFunction pSym = NULL;
 
@@ -383,7 +387,7 @@ css::uno::Reference<css::uno::XInterface> loadSharedLibComponentFactory(
 
     if (pSym != 0)
     {
-        xRet = invokeComponentFactory( pSym, lib, moduleUri, rImplName, xMgr, rPrefix, aExcMsg );
+        xRet = invokeComponentFactory( pSym, lib, moduleUri, rImplName, xMgr, aFullPrefix, aExcMsg );
     }
     else
     {


More information about the Libreoffice-commits mailing list