[Libreoffice-commits] core.git: 3 commits - animations/source bridges/inc bridges/source cli_ure/source comphelper/inc configmgr/source connectivity/source dbaccess/source dtrans/source extensions/source forms/source io/source mysqlc/source odk/examples remotebridges/source sal/test scripting/source sdext/source stoc/source vcl/aqua

Matúš Kukan matus.kukan at gmail.com
Fri Apr 19 07:52:28 PDT 2013


 animations/source/animcore/factreg.cxx                             |    7 
 animations/source/animcore/factreg.hxx                             |    3 
 bridges/inc/bridges/cpp_uno/bridge.hxx                             |    9 
 bridges/source/cpp_uno/shared/bridge.cxx                           |    7 
 bridges/source/cpp_uno/shared/component.cxx                        |   19 
 bridges/source/cpp_uno/shared/component.hxx                        |   33 
 bridges/source/jni_uno/jni_bridge.cxx                              |   18 
 cli_ure/source/uno_bridge/cli_bridge.cxx                           |    9 
 comphelper/inc/comphelper/componentmodule.hxx                      |    2 
 configmgr/source/configurationprovider.cxx                         |    1 
 configmgr/source/configurationprovider.hxx                         |    1 
 connectivity/source/drivers/ado/Aservices.cxx                      |    2 
 connectivity/source/drivers/calc/Cservices.cxx                     |    2 
 connectivity/source/drivers/dbase/Dservices.cxx                    |    2 
 connectivity/source/drivers/evoab2/NServices.cxx                   |    2 
 connectivity/source/drivers/flat/Eservices.cxx                     |    2 
 connectivity/source/drivers/hsqldb/Hservices.cxx                   |    2 
 connectivity/source/drivers/jdbc/jservices.cxx                     |    2 
 connectivity/source/drivers/kab/KServices.cxx                      |    2 
 connectivity/source/drivers/macab/MacabServices.cxx                |    2 
 connectivity/source/drivers/mozab/MServices.cxx                    |    2 
 connectivity/source/drivers/mysql/Yservices.cxx                    |    2 
 connectivity/source/drivers/odbc/oservices.cxx                     |    2 
 dbaccess/source/inc/registrationhelper.hxx                         |    2 
 dtrans/source/win32/dnd/dndentry.cxx                               |    5 
 dtrans/source/win32/dnd/idroptarget.cxx                            |    5 
 dtrans/source/win32/dnd/source.cxx                                 |   16 
 dtrans/source/win32/dnd/sourcecontext.cxx                          |    4 
 dtrans/source/win32/dnd/target.cxx                                 |   11 
 dtrans/source/win32/dnd/targetdragcontext.cxx                      |    5 
 dtrans/source/win32/dnd/targetdropcontext.cxx                      |    5 
 extensions/source/inc/componentmodule.hxx                          |    2 
 extensions/source/ole/servprov.cxx                                 |   17 
 extensions/source/ole/servreg.cxx                                  |   23 
 forms/source/inc/forms_module.hxx                                  |    2 
 io/source/TextInputStream/TextInputStream.cxx                      |   20 
 io/source/TextOutputStream/TextOutputStream.cxx                    |   16 
 io/source/acceptor/acc_pipe.cxx                                    |    3 
 io/source/acceptor/acc_socket.cxx                                  |    2 
 io/source/acceptor/acceptor.cxx                                    |   23 
 io/source/acceptor/acceptor.hxx                                    |    3 
 io/source/connector/connector.cxx                                  |   27 
 io/source/connector/connector.hxx                                  |    3 
 io/source/connector/ctr_pipe.cxx                                   |    2 
 io/source/connector/ctr_socket.cxx                                 |    2 
 io/source/stm/factreg.cxx                                          |   34 
 io/source/stm/factreg.hxx                                          |    3 
 io/source/stm/odata.cxx                                            |    8 
 io/source/stm/omark.cxx                                            |    4 
 io/source/stm/opipe.cxx                                            |    2 
 io/source/stm/opump.cxx                                            |    2 
 mysqlc/source/mysqlc_services.cxx                                  |    2 
 odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx |    2 
 remotebridges/source/unourl_resolver/unourl_resolver.cxx           |   23 
 sal/test/unloading/exports.dxp                                     |    3 
 sal/test/unloading/readme.txt                                      |   14 
 sal/test/unloading/samplelib1.cxx                                  |  255 ---
 sal/test/unloading/samplelib2.cxx                                  |  222 ---
 sal/test/unloading/unloadTest.cxx                                  |  645 ----------
 scripting/source/provider/MasterScriptProvider.cxx                 |    2 
 sdext/source/presenter/PresenterComponent.cxx                      |   19 
 stoc/source/bootstrap/services.cxx                                 |   39 
 stoc/source/corereflection/crefl.cxx                               |   32 
 stoc/source/defaultregistry/defaultregistry.cxx                    |   12 
 stoc/source/implementationregistration/implreg.cxx                 |   12 
 stoc/source/invocation/invocation.cxx                              |   29 
 stoc/source/invocation_adapterfactory/iafactory.cxx                |   20 
 stoc/source/javavm/javavm.cxx                                      |    2 
 stoc/source/loader/dllcomponentloader.cxx                          |    7 
 stoc/source/namingservice/namingservice.cxx                        |   24 
 stoc/source/proxy_factory/proxyfac.cxx                             |   23 
 stoc/source/registry_tdprovider/base.hxx                           |   38 
 stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx           |    6 
 stoc/source/registry_tdprovider/td.cxx                             |    6 
 stoc/source/registry_tdprovider/tdcomp.cxx                         |    1 
 stoc/source/registry_tdprovider/tdconsts.cxx                       |    2 
 stoc/source/registry_tdprovider/tdef.cxx                           |    5 
 stoc/source/registry_tdprovider/tdenum.cxx                         |    1 
 stoc/source/registry_tdprovider/tdiface.cxx                        |   27 
 stoc/source/registry_tdprovider/tdmodule.cxx                       |    2 
 stoc/source/registry_tdprovider/tdprop.cxx                         |    5 
 stoc/source/registry_tdprovider/tdprovider.cxx                     |   11 
 stoc/source/registry_tdprovider/tdservice.cxx                      |   14 
 stoc/source/registry_tdprovider/tdsingleton.cxx                    |    5 
 stoc/source/security/access_controller.cxx                         |   38 
 stoc/source/security/file_policy.cxx                               |   10 
 stoc/source/security/permissions.h                                 |    3 
 stoc/source/servicemanager/servicemanager.cxx                      |   33 
 stoc/source/simpleregistry/simpleregistry.cxx                      |    7 
 stoc/source/stocservices/stocservices.cxx                          |   31 
 stoc/source/tdmanager/tdmgr.cxx                                    |   18 
 stoc/source/tdmanager/tdmgr_common.hxx                             |    3 
 stoc/source/tdmanager/tdmgr_tdenumeration.cxx                      |    4 
 stoc/source/typeconv/convert.cxx                                   |   13 
 vcl/aqua/source/dtrans/DragSource.cxx                              |    1 
 vcl/aqua/source/dtrans/DragSourceContext.cxx                       |    1 
 vcl/aqua/source/dtrans/DropTarget.cxx                              |    1 
 97 files changed, 138 insertions(+), 1919 deletions(-)

New commits:
commit ecafcceca7cafff5dc01ef3260f9c7ae38cef478
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Wed Apr 10 16:33:05 2013 +0200

    sal: remove obsolete test/unloading
    
    Change-Id: I76ede5abd4662aaa2f5b01739da07cf3169ddb69
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/test/unloading/exports.dxp b/sal/test/unloading/exports.dxp
deleted file mode 100644
index 9990690..0000000
--- a/sal/test/unloading/exports.dxp
+++ /dev/null
@@ -1,3 +0,0 @@
-component_writeInfo
-component_getFactory
-component_canUnload
diff --git a/sal/test/unloading/readme.txt b/sal/test/unloading/readme.txt
deleted file mode 100644
index 7fae885..0000000
--- a/sal/test/unloading/readme.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-The test program test the unloading API, and the default factories from cppuhelper 
-for their new XUnloadingPreference interface.
-
-The makefile produces the executable unloading.exe as wells as two 
-libraries, samplelib1 and samplelib2, which contain services.
-
-
-Usage:
- Copy unloading, samplelib1, samplelib2 into the program directory
-of an office.
-
-Register samplelib1 and samplelib2 with regcomp
-
-Run unloading.
\ No newline at end of file
diff --git a/sal/test/unloading/samplelib1.cxx b/sal/test/unloading/samplelib1.cxx
deleted file mode 100644
index 1cde5d4..0000000
--- a/sal/test/unloading/samplelib1.cxx
+++ /dev/null
@@ -1,255 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <sal/types.h>
-#include <osl/time.h>
-#include <rtl/ustring.hxx>
-#include <uno/environment.h>
-#include <cppu/macros.hxx>
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <cppuhelper/implbase1.hxx>
-#include <rtl/unload.h>
-#include <rtl/string.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-
-using namespace ::com::sun::star::registry;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::rtl;
-using namespace ::cppu;
-
-#define IMPLNAME1 "com.sun.star.comp.sal.UnloadingTest1"
-#define SERVICENAME1 "com.sun.star.UnloadingTest1"
-#define IMPLNAME2 "com.sun.star.comp.sal.UnloadingTest2"
-#define SERVICENAME2 "com.sun.star.UnloadingTest2"
-#define IMPLNAME3 "com.sun.star.comp.sal.UnloadingTest3"
-#define SERVICENAME3 "com.sun.star.UnloadingTest3"
-#define IMPLNAME4 "com.sun.star.comp.sal.OneInstanceTest"
-#define SERVICENAME4 "com.sun.star.OneInstanceTest"
-
-
-// Unloading Support ----------------------------------------------
-rtl_StandardModuleCount globalModuleCount= MODULE_COUNT_INIT;
-//rtl_StandardModuleCount globalModuleCount= { {rtl_moduleCount_acquire,rtl_moduleCount_release}, rtl_moduleCount_canUnload,0,{0,0}}; //, 0, {0, 0}};
-// Services -------------------------------------------------------
-class TestService: public WeakImplHelper1<XServiceInfo>
-{
-OUString m_implName;
-OUString m_serviceName;
-public:
-    TestService( OUString implName, OUString serviceName);
-    ~TestService();
-    virtual OUString SAL_CALL getImplementationName(  )  throw (RuntimeException);
-    virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (RuntimeException);
-    virtual Sequence<OUString > SAL_CALL getSupportedServiceNames(  ) throw (RuntimeException);
-};
-
-TestService::TestService( OUString implName, OUString serviceName):
-            m_implName(implName),m_serviceName(serviceName)
-{   // Library unloading support
-    globalModuleCount.modCnt.acquire( &globalModuleCount.modCnt);
-}
-
-TestService::~TestService()
-{   // Library unloading support
-    globalModuleCount.modCnt.release( &globalModuleCount.modCnt);
-}
-
-OUString SAL_CALL TestService::getImplementationName(  )  throw (RuntimeException)
-{
-    return m_implName;
-}
-sal_Bool SAL_CALL TestService::supportsService( const OUString& ServiceName ) throw (RuntimeException)
-{
-    return ServiceName.equals( m_serviceName);
-}
-Sequence<OUString > SAL_CALL TestService::getSupportedServiceNames(  ) throw (RuntimeException)
-{
-    return Sequence<OUString>( &m_serviceName, 1);
-}
-
-
-// Creator functions for Services -------------------------------------------------
-static Reference<XInterface> SAL_CALL test1_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
-        throw (RuntimeException)
-{
-    return Reference<XInterface>( static_cast<XWeak*>( new TestService(
-        OUString(  IMPLNAME1),
-        OUString(  SERVICENAME1) )), UNO_QUERY);
-}
-static Reference<XInterface> SAL_CALL test2_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
-        throw (RuntimeException)
-{
-    return Reference<XInterface>( static_cast<XWeak*>( new TestService(
-        OUString(  IMPLNAME2),
-        OUString(  SERVICENAME2) )), UNO_QUERY);
-}
-static Reference<XInterface> SAL_CALL test3_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
-        throw (RuntimeException)
-{
-    return Reference<XInterface>( static_cast<XWeak*>( new TestService(
-        OUString(  IMPLNAME3),
-        OUString(  SERVICENAME3) )), UNO_QUERY);
-}
-static Reference<XInterface> SAL_CALL test4_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
-        throw (RuntimeException)
-{
-    return Reference<XInterface>( static_cast<XWeak*>( new TestService(
-        OUString(  IMPLNAME4),
-        OUString(  SERVICENAME4) )), UNO_QUERY);
-}
-
-
-// Standard UNO library interface -------------------------------------------------
-extern "C" {
-    sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey) throw()
-    {
-        if (pRegistryKey)
-        {
-            try
-            {
-                Reference< XRegistryKey > xNewKey(
-                    reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-                        OUString( "/" IMPLNAME1 "/UNO/SERVICES" ) ) );
-
-                xNewKey->createKey( OUString(  SERVICENAME1));
-
-                xNewKey=
-                    reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-                        OUString( "/" IMPLNAME2 "/UNO/SERVICES" ) );
-
-                xNewKey->createKey(OUString(  SERVICENAME2));
-                xNewKey=
-                    reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-                        OUString( "/" IMPLNAME3 "/UNO/SERVICES" )   );
-
-                xNewKey->createKey(OUString(  SERVICENAME3));
-
-                xNewKey=
-                    reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-                        OUString( "/" IMPLNAME4 "/UNO/SERVICES" )   );
-
-                xNewKey->createKey(OUString(  SERVICENAME4));
-                return sal_True;
-            }
-            catch (const InvalidRegistryException &)
-            {
-                OSL_FAIL( "### InvalidRegistryException!" );
-            }
-        }
-        return sal_False;
-    }
-
-    SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey) throw()
-    {
-        void * pRet = 0;
-
-
-        OUString implname1(  IMPLNAME1 );
-        OUString serviceName1(  SERVICENAME1 );
-        OUString implname2(  IMPLNAME2 );
-        OUString serviceName2(  SERVICENAME2 );
-        OUString implname3(  IMPLNAME3 );
-        OUString serviceName3(  SERVICENAME3 );
-        OUString implname4(  IMPLNAME4 );
-        OUString serviceName4(  SERVICENAME4 );
-
-        if (implname1.equals( OUString::createFromAscii(pImplName)))
-        {
-            Reference<XMultiServiceFactory> mgr= reinterpret_cast<XMultiServiceFactory *>(pServiceManager);
-            Reference<XSingleServiceFactory> xFactory( createSingleFactory(
-                reinterpret_cast<XMultiServiceFactory *>(pServiceManager),
-                implname1,
-                test1_createInstance,
-                Sequence<OUString>( &serviceName1, 1),
-                &globalModuleCount.modCnt
-                ));
-
-            if (xFactory.is())
-            {
-                xFactory->acquire();
-                pRet = xFactory.get();
-            }
-        }
-        else if( implname2.equals( OUString::createFromAscii(pImplName)))
-        {
-            Reference<XMultiServiceFactory> mgr= reinterpret_cast<XMultiServiceFactory *>(pServiceManager);
-            Reference<XSingleServiceFactory> xFactory( createSingleFactory(
-                reinterpret_cast<XMultiServiceFactory *>(pServiceManager),
-                implname2,
-                test2_createInstance,
-                Sequence<OUString>( &serviceName2, 1),
-                &globalModuleCount.modCnt
-                ));
-
-            if (xFactory.is())
-            {
-                xFactory->acquire();
-                pRet = xFactory.get();
-            }
-        }
-        else if( implname3.equals( OUString::createFromAscii(pImplName)))
-        {
-            Reference<XMultiServiceFactory> mgr= reinterpret_cast<XMultiServiceFactory *>(pServiceManager);
-            Reference<XSingleServiceFactory> xFactory( createSingleFactory(
-                reinterpret_cast<XMultiServiceFactory *>(pServiceManager),
-                implname3,
-                test3_createInstance,
-                Sequence<OUString>( &serviceName3, 1),
-                &globalModuleCount.modCnt
-                ));
-
-            if (xFactory.is())
-            {
-                xFactory->acquire();
-                pRet = xFactory.get();
-            }
-        }
-        else if( implname4.equals( OUString::createFromAscii(pImplName)))
-        {
-            Reference<XMultiServiceFactory> mgr= reinterpret_cast<XMultiServiceFactory *>(pServiceManager);
-            Reference<XSingleServiceFactory> xFactory( createOneInstanceFactory(
-                reinterpret_cast<XMultiServiceFactory *>(pServiceManager),
-                implname3,
-                test4_createInstance,
-                Sequence<OUString>( &serviceName3, 1),
-                &globalModuleCount.modCnt
-                ));
-
-            if (xFactory.is())
-            {
-                xFactory->acquire();
-                pRet = xFactory.get();
-            }
-        }
-        return pRet;
-    }
-
-    SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue* libUnused)
-    {
-        return globalModuleCount.canUnload( &globalModuleCount, libUnused);
-    }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/test/unloading/samplelib2.cxx b/sal/test/unloading/samplelib2.cxx
deleted file mode 100644
index f6f0f28..0000000
--- a/sal/test/unloading/samplelib2.cxx
+++ /dev/null
@@ -1,222 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <sal/types.h>
-#include <osl/time.h>
-#include <rtl/ustring.hxx>
-#include <uno/environment.h>
-#include <cppu/macros.hxx>
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <cppuhelper/implbase1.hxx>
-#include <rtl/unload.h>
-#include <rtl/string.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-
-using namespace ::com::sun::star::registry;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::rtl;
-using namespace ::cppu;
-
-#define IMPLNAME1 "com.sun.star.comp.sal.UnloadingTest21"
-#define SERVICENAME1 "com.sun.star.UnloadingTest21"
-#define IMPLNAME2 "com.sun.star.comp.sal.UnloadingTest22"
-#define SERVICENAME2 "com.sun.star.UnloadingTest22"
-#define IMPLNAME3 "com.sun.star.comp.sal.UnloadingTest23"
-#define SERVICENAME3 "com.sun.star.UnloadingTest23"
-
-// Unloading Support ----------------------------------------------
-rtl_StandardModuleCount globalModuleCount= MODULE_COUNT_INIT;
-//rtl_StandardModuleCount globalModuleCount= { {rtl_moduleCount_acquire,rtl_moduleCount_release}, rtl_moduleCount_canUnload,0,{0,0}}; //, 0, {0, 0}};
-// Services -------------------------------------------------------
-class TestService: public WeakImplHelper1<XServiceInfo>
-{
-OUString m_implName;
-OUString m_serviceName;
-public:
-    TestService( OUString implName, OUString serviceName);
-    ~TestService();
-    virtual OUString SAL_CALL getImplementationName(  )  throw (RuntimeException);
-    virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (RuntimeException);
-    virtual Sequence<OUString > SAL_CALL getSupportedServiceNames(  ) throw (RuntimeException);
-};
-
-TestService::TestService( OUString implName, OUString serviceName):
-            m_implName(implName),m_serviceName(serviceName)
-{   // Library unloading support
-    globalModuleCount.modCnt.acquire( &globalModuleCount.modCnt);
-}
-
-TestService::~TestService()
-{   // Library unloading support
-    globalModuleCount.modCnt.release( &globalModuleCount.modCnt);
-}
-
-OUString SAL_CALL TestService::getImplementationName(  )  throw (RuntimeException)
-{
-    return m_implName;
-}
-sal_Bool SAL_CALL TestService::supportsService( const OUString& ServiceName ) throw (RuntimeException)
-{
-    return ServiceName.equals( m_serviceName);
-}
-Sequence<OUString > SAL_CALL TestService::getSupportedServiceNames(  ) throw (RuntimeException)
-{
-    return Sequence<OUString>( &m_serviceName, 1);
-}
-
-
-// Creator functions for Services -------------------------------------------------
-static Reference<XInterface> SAL_CALL test21_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
-        throw (RuntimeException)
-{
-    return Reference<XInterface>( static_cast<XWeak*>( new TestService(
-        OUString(  IMPLNAME1),
-        OUString(  SERVICENAME1) )), UNO_QUERY);
-}
-static Reference<XInterface> SAL_CALL test22_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
-        throw (RuntimeException)
-{
-    return Reference<XInterface>( static_cast<XWeak*>( new TestService(
-        OUString(  IMPLNAME2),
-        OUString(  SERVICENAME2) )), UNO_QUERY);
-}
-static Reference<XInterface> SAL_CALL test23_createInstance(const Reference<XMultiServiceFactory> & rSMgr)
-        throw (RuntimeException)
-{
-    return Reference<XInterface>( static_cast<XWeak*>( new TestService(
-        OUString(  IMPLNAME3),
-        OUString(  SERVICENAME3) )), UNO_QUERY);
-}
-
-
-// Standard UNO library interface -------------------------------------------------
-extern "C" {
-    sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey) throw()
-    {
-        if (pRegistryKey)
-        {
-            try
-            {
-                Reference< XRegistryKey > xNewKey(
-                    reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-                        OUString( "/" IMPLNAME1 "/UNO/SERVICES" ) ) );
-
-                xNewKey->createKey( OUString(  SERVICENAME1));
-
-                xNewKey=
-                    reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-                        OUString( "/" IMPLNAME2 "/UNO/SERVICES" ) );
-
-                xNewKey->createKey(OUString(  SERVICENAME2));
-                xNewKey=
-                    reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
-                        OUString( "/" IMPLNAME3 "/UNO/SERVICES" )   );
-
-                xNewKey->createKey(OUString(  SERVICENAME3));
-
-                return sal_True;
-            }
-            catch (InvalidRegistryException &)
-            {
-                OSL_FAIL( "### InvalidRegistryException!" );
-            }
-        }
-        return sal_False;
-    }
-
-    SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey) throw()
-    {
-        void * pRet = 0;
-
-
-        OUString implname1(  IMPLNAME1 );
-        OUString serviceName1(  SERVICENAME1 );
-        OUString implname2(  IMPLNAME2 );
-        OUString serviceName2(  SERVICENAME2 );
-        OUString implname3(  IMPLNAME3 );
-        OUString serviceName3(  SERVICENAME3 );
-
-        if (implname1.equals( OUString::createFromAscii(pImplName)))
-        {
-            Reference<XMultiServiceFactory> mgr= reinterpret_cast<XMultiServiceFactory *>(pServiceManager);
-            Reference<XSingleServiceFactory> xFactory( createSingleFactory(
-                reinterpret_cast<XMultiServiceFactory *>(pServiceManager),
-                implname1,
-                test21_createInstance,
-                Sequence<OUString>( &serviceName1, 1),
-                &globalModuleCount.modCnt
-                ));
-
-            if (xFactory.is())
-            {
-                xFactory->acquire();
-                pRet = xFactory.get();
-            }
-        }
-        else if( implname2.equals( OUString::createFromAscii(pImplName)))
-        {
-            Reference<XMultiServiceFactory> mgr= reinterpret_cast<XMultiServiceFactory *>(pServiceManager);
-            Reference<XSingleServiceFactory> xFactory( createSingleFactory(
-                reinterpret_cast<XMultiServiceFactory *>(pServiceManager),
-                implname2,
-                test22_createInstance,
-                Sequence<OUString>( &serviceName2, 1),
-                &globalModuleCount.modCnt
-                ));
-
-            if (xFactory.is())
-            {
-                xFactory->acquire();
-                pRet = xFactory.get();
-            }
-        }
-        else if( implname3.equals( OUString::createFromAscii(pImplName)))
-        {
-            Reference<XMultiServiceFactory> mgr= reinterpret_cast<XMultiServiceFactory *>(pServiceManager);
-            Reference<XSingleServiceFactory> xFactory( createSingleFactory(
-                reinterpret_cast<XMultiServiceFactory *>(pServiceManager),
-                implname3,
-                test23_createInstance,
-                Sequence<OUString>( &serviceName3, 1),
-                &globalModuleCount.modCnt
-                ));
-
-            if (xFactory.is())
-            {
-                xFactory->acquire();
-                pRet = xFactory.get();
-            }
-        }
-
-        return pRet;
-    }
-
-    SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue* libUnused)
-    {
-        return globalModuleCount.canUnload( &globalModuleCount, libUnused);
-    }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/test/unloading/unloadTest.cxx b/sal/test/unloading/unloadTest.cxx
deleted file mode 100644
index b822f8e..0000000
--- a/sal/test/unloading/unloadTest.cxx
+++ /dev/null
@@ -1,645 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include<osl/module.hxx>
-#include <osl/time.h>
-#include <rtl/ustring.hxx>
-#include <stdio.h>
-#include <cppuhelper/factory.hxx>
-#include <cppuhelper/servicefactory.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/uno/XUnloadingPreference.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/container/XContentEnumerationAccess.hpp>
-
-using namespace ::rtl;
-using namespace ::osl;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::cppu;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::container;
-
-#define IMPLNAME1 "com.sun.star.comp.sal.UnloadingTest1"
-#define SERVICENAME1 "com.sun.star.UnloadingTest1"
-#define IMPLNAME2 "com.sun.star.comp.sal.UnloadingTest2"
-#define SERVICENAME2 "com.sun.star.UnloadingTest2"
-#define IMPLNAME3 "com.sun.star.comp.sal.UnloadingTest3"
-#define SERVICENAME3 "com.sun.star.UnloadingTest3"
-#define IMPLNAME4 "com.sun.star.comp.sal.OneInstanceTest"
-#define SERVICENAME4 "com.sun.star.OneInstanceTest"
-
-#define IMPLNAME21 "com.sun.star.comp.sal.UnloadingTest21"
-#define SERVICENAME21 "com.sun.star.UnloadingTest21"
-#define IMPLNAME22 "com.sun.star.comp.sal.UnloadingTest22"
-#define SERVICENAME22 "com.sun.star.UnloadingTest22"
-#define IMPLNAME23 "com.sun.star.comp.sal.UnloadingTest23"
-#define SERVICENAME23 "com.sun.star.UnloadingTest23"
-
-#ifdef UNX
-#define LIBRARY1 "libsamplelib1.so"
-#define LIBRARY2 "libsamplelib2.so"
-#elif defined WNT
-#define LIBRARY1 "samplelib1"
-#define LIBRARY2 "samplelib2"
-#endif
-/*
-Tested: rtl_registerModuleForUnloading, rtl_unregisterModuleForUnloading, rtl_unloadUnusedLibraries
-        1 component.
-
-next: Test with multiple components
-        Listener mechanism.
-*/
-
-sal_Bool test1();
-sal_Bool test2();
-sal_Bool test3();
-sal_Bool test4();
-sal_Bool test5();
-sal_Bool test6();
-sal_Bool test7();
-sal_Bool test8();
-sal_Bool test9();
-void SAL_CALL listenerCallback( void* id);
-
-int main(int argc, char* argv[])
-{
-  // Test if the servicemanager can be created and if the sample libs
-  // can be loaded
-//  Reference<XMultiServiceFactory> serviceManager= createRegistryServiceFactory(
-//     OUString("applicat.rdb"));
-//    if( !serviceManager.is())
-//    {
-//      printf("\n ####################################################\n"
-//         "Error: could not create service manager. \n"
-//         "Is the executable in the office program directory?\n");
-//      return -1;
-//    }
-
-//    Reference<XInterface> xint1=  serviceManager->createInstance( OUString(
-//                  RTL_CONSTASCII_USTRINGPARAM(SERVICENAME1)));
-
-//    if( !xint1.is())
-//    {
-//        printf("\n ###################################################\n"
-//           "Error: could not create service from samplelib1\n"
-//           "Is samplelib1 in the office program directory and is it "
-//           "registered?\n");
-//        return -1;
-//    }
-//    Reference<XInterface> xint2=  serviceManager->createInstance( OUString(
-//                  RTL_CONSTASCII_USTRINGPARAM(SERVICENAME21)));
-//    if( !xint2.is())
-//      {
-//        printf("\n ###################################################"
-//           "Error: could not create service from samplelib2\n"
-//           "Is samplelib2 in the office program directory and is it "
-//           "registered?\n");
-//        return -1;
-//      }
-//        //destroy servicemanager
-//        Reference<XPropertySet> xSet( serviceManager, UNO_QUERY);
-//        Any any_prop= xSet->getPropertyValue( OUString("DefaultContext"));
-//        Reference<XComponentContext> xContext;
-//        any_prop >>= xContext;
-//        Reference<XComponent> xComponent( xContext, UNO_QUERY);
-//        xComponent->dispose();
-
-//        //unload samplelib1 and samplelib2. We need the handles, therefore load
-//        // the libs
-//        OUString libname1( RTL_CONSTASCII_USTRINGPARAM(LIBRARY1));
-//        OUString libname2( RTL_CONSTASCII_USTRINGPARAM(LIBRARY2));
-//        oslModule m1= osl_loadModule(libname1.pData, 0);
-//        oslModule m2= osl_loadModule(libname2.pData, 0);
-//        osl_unloadModule( m1);
-//        osl_unloadModule( m1);
-//        osl_unloadModule( m2);
-//        osl_unloadModule( m2);
-
-
-  sal_Bool ret1= test1();
-  if( ret1) printf( "\n Test 1 successful \n");
-    else printf("\n !!!!!! Test 1 failed\n");
-    sal_Bool ret2= test2();
-    if( ret2) printf( "\n Test 2 successful \n");
-    else printf("\n !!!!!! Test 2 failed\n");
-    sal_Bool ret3= test3();
-    if( ret3) printf( "\n Test 3 successful \n");
-    else printf("\n !!!!!! Test 3 failed\n");
-    sal_Bool ret4= test4();
-    if( ret4) printf( "\n Test 4 successful \n");
-    else printf("\n !!!!!! Test 4 failed\n");
-    sal_Bool ret5= test5();
-    if( ret5) printf( "\n Test 5 successful \n");
-    else printf("\n !!!!!! Test 5 failed\n");
-    // takes some time (10s)
-    sal_Bool ret6= test6();
-    sal_Bool ret7= test7(); // prints message itself
-    sal_Bool ret8= test8();
-    if( ret8) printf( "\n Test 8 successful \n");
-    else printf("\n !!!!!! Test 8 failed\n");
-    sal_Bool ret9= test9();
-    if( ret9) printf( "\n Test 9 successful: service manager is unloading listener\n");
-    else printf("\n !!!!! Test 9 failed\n");
-
-    return 0;
-}
-
-/* Create an instance of SERVICENAME1, call a function and unload module.
-   This tests the loader and basic functionality.
-   The library will be loaded once manually and the handle will be stored.
-   Then the library will be unloaded. After rtl_unloadUnusedLibraries we try to
-   get a symbol of the unloaded lib. If this fails then the test is successful.
-*/
-sal_Bool test1()
-{
-    printf("Test 1 ####################################################\n");
-    oslModule handleMod=0;
-    OUString lib1Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY1));
-    {
-    Reference<XMultiServiceFactory> serviceManager= createRegistryServiceFactory(
-        OUString("applicat.rdb"));
-    Reference<XInterface> xint= serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME1)));
-
-    // get the handle
-    handleMod=  osl_loadModule( lib1Name.pData, 0);
-    osl_unloadModule( handleMod);
-    xint=0;
-
-    Reference<XPropertySet> xSet( serviceManager, UNO_QUERY);
-    Any any_prop=   xSet->getPropertyValue( OUString("DefaultContext"));
-    Reference<XComponentContext> xContext;
-    any_prop >>= xContext;
-    Reference<XComponent> xComponent( xContext, UNO_QUERY);
-    xComponent->dispose();
-    }
-    rtl_unloadUnusedModules( NULL);
-
-    // Try to get a symbol, must fail
-    OUString sSymbol("component_getFactory");
-    void* pSymbol= osl_getSymbol(  handleMod, sSymbol.pData);
-
-    if( !pSymbol)
-        return sal_True;
-    return sal_False;
-}
-
-/* Multipe loadModule + rtl_registerModuleForUnloading.
-The module will be registered as often as it has been loaded.
-*/
-sal_Bool test2()
-{
-    printf("Test 2 ####################################################\n");
-    oslModule handleMod=0;
-    OUString lib1Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY1));
-    {
-    Reference<XMultiServiceFactory> serviceManager= createRegistryServiceFactory(
-         OUString("applicat.rdb"));
-
-    Reference<XInterface> xint= serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME1)));
-
-    handleMod=  osl_loadModule( lib1Name.pData, 0);
-    osl_unloadModule( handleMod);
-    //-----------------------------------------------------------
-    oslModule mod1= osl_loadModule( lib1Name.pData, 0);
-    oslModule mod2= osl_loadModule( lib1Name.pData, 0);
-    oslModule mod3= osl_loadModule( lib1Name.pData, 0);
-
-    rtl_registerModuleForUnloading(mod1);
-    rtl_registerModuleForUnloading(mod2);
-    rtl_registerModuleForUnloading(mod3);
-    // ----------------------------------------------------------
-    Reference<XPropertySet> xSet( serviceManager, UNO_QUERY);
-    Any any_prop=   xSet->getPropertyValue( OUString("DefaultContext"));
-    Reference<XComponentContext> xContext;
-    any_prop >>= xContext;
-    Reference<XComponent> xComponent( xContext, UNO_QUERY);
-    xComponent->dispose();
-    }
-    rtl_unloadUnusedModules( NULL);
-
-    // Try to get a symbol, must fail
-    OUString sSymbol("component_getFactory");
-    void* pSymbol= osl_getSymbol(  handleMod, sSymbol.pData);
-
-    if( !pSymbol)
-        return sal_True;
-    return sal_False;
-}
-
-/* Multipe loadModule + rtl_registerModuleForUnloading.
-The module will be registered one time less as it has been loaded.
-*/
-sal_Bool test3()
-{
-    printf("Test 3 ####################################################\n");
-    oslModule handleMod=0;
-    sal_Bool retval=sal_False;
-    OUString lib1Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY1));
-    {
-    Reference<XMultiServiceFactory> serviceManager= createRegistryServiceFactory(
-         OUString("applicat.rdb"));
-
-    Reference<XInterface> xint= serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME1)));
-
-    handleMod=  osl_loadModule( lib1Name.pData, 0);
-    osl_unloadModule( handleMod);
-    //-----------------------------------------------------------
-    oslModule mod1= osl_loadModule( lib1Name.pData, 0);
-    oslModule mod2= osl_loadModule( lib1Name.pData, 0);
-    oslModule mod3= osl_loadModule( lib1Name.pData, 0);
-
-    rtl_registerModuleForUnloading(mod1);
-    rtl_registerModuleForUnloading(mod2);
-    // ----------------------------------------------------------
-    Reference<XPropertySet> xSet( serviceManager, UNO_QUERY);
-    Any any_prop=   xSet->getPropertyValue( OUString("DefaultContext"));
-    Reference<XComponentContext> xContext;
-    any_prop >>= xContext;
-    Reference<XComponent> xComponent( xContext, UNO_QUERY);
-    xComponent->dispose();
-    }
-    rtl_unloadUnusedModules( NULL);
-
-    // Try to get a symbol, must succeed
-    OUString sSymbol("component_getFactory");
-    void* pSymbol= osl_getSymbol(  handleMod, sSymbol.pData);
-
-    if( pSymbol)
-    {
-        retval= sal_True;
-        osl_unloadModule( handleMod);
-        pSymbol= osl_getSymbol( handleMod, sSymbol.pData);
-    }
-    return retval;
-}
-/* 2 Modules
-
-*/
-sal_Bool test4()
-{
-    printf("Test 4 ####################################################\n");
-    oslModule handleMod1=0;
-    oslModule handleMod2=0;
-    OUString lib1Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY1));
-    OUString lib2Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY2));
-    {
-    Reference<XMultiServiceFactory> serviceManager= createRegistryServiceFactory(
-         OUString("applicat.rdb"));
-
-    Reference<XInterface> xint= serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME1)));
-
-    handleMod1= osl_loadModule( lib1Name.pData, 0);
-    osl_unloadModule( handleMod1);
-    Reference<XInterface> xint2=    serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME21)));
-
-    handleMod2= osl_loadModule( lib2Name.pData, 0);
-    osl_unloadModule( handleMod2);
-
-    //-----------------------------------------------------------
-    // ----------------------------------------------------------
-    Reference<XPropertySet> xSet( serviceManager, UNO_QUERY);
-    Any any_prop=   xSet->getPropertyValue( OUString("DefaultContext"));
-    Reference<XComponentContext> xContext;
-    any_prop >>= xContext;
-    Reference<XComponent> xComponent( xContext, UNO_QUERY);
-    xComponent->dispose();
-    }
-    rtl_unloadUnusedModules( NULL);
-
-    // Try to get a symbol, must fail
-    OUString sSymbol("component_getFactory");
-    void* pSymbol= osl_getSymbol(  handleMod1, sSymbol.pData);
-
-    void* pSymbol2= osl_getSymbol(  handleMod2, sSymbol.pData);
-    if( ! pSymbol && !pSymbol2)
-        return sal_True;
-    return sal_False;
-}
-
-/* 2 Modules and 6 services
-
-*/
-sal_Bool test5()
-{
-    printf("test5 ####################################################\n");
-    oslModule handleMod1=0;
-    oslModule handleMod2=0;
-    sal_Bool btest1= sal_False;
-    OUString lib1Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY1));
-    OUString lib2Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY2));
-    OUString sSymbol("component_getFactory");
-    {
-    Reference<XMultiServiceFactory> serviceManager= createRegistryServiceFactory(
-         OUString("applicat.rdb"));
-
-    //-----------------------------------------------------------
-    Reference<XInterface> xint= serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME1)));
-    Reference<XInterface> xint2=    serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME2)));
-    Reference<XInterface> xint3=    serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME3)));
-    Reference<XInterface> xint4=    serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME21)));
-    Reference<XInterface> xint5=    serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME22)));
-    Reference<XInterface> xint6=    serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME23)));
-
-    // ----------------------------------------------------------
-    handleMod1= osl_loadModule( lib1Name.pData, 0);
-    osl_unloadModule( handleMod1);
-    handleMod2= osl_loadModule( lib2Name.pData, 0);
-    osl_unloadModule( handleMod2);
-
-    // get rid of the service manager
-    Reference<XPropertySet> xSet( serviceManager, UNO_QUERY);
-    Any any_prop=   xSet->getPropertyValue( OUString("DefaultContext"));
-    Reference<XComponentContext> xContext;
-    any_prop >>= xContext;
-    Reference<XComponent> xComponent( xContext, UNO_QUERY);
-    xComponent->dispose();
-
-    // try unloading, must fail
-    rtl_unloadUnusedModules( NULL);
-    void* pSymbol= osl_getSymbol(  handleMod1, sSymbol.pData);
-
-    void* pSymbol2= osl_getSymbol(  handleMod2, sSymbol.pData);
-    if(  pSymbol && pSymbol2)
-        btest1= sal_True;
-
-    }
-
-    // Try to get a symbol, must succeed
-    rtl_unloadUnusedModules( NULL);
-
-    void* pSymbol= osl_getSymbol(  handleMod1, sSymbol.pData);
-    void* pSymbol2= osl_getSymbol(  handleMod2, sSymbol.pData);
-    if( ! pSymbol && !pSymbol2 && btest1)
-        return sal_True;
-    return sal_False;
-}
-
-/*
-TimeValue Test
-rtl_unloadUnusedModules takes a TimeValue which determines a timespan
-a module must have been constantly unused in order to be unloaded.
-This is only a rough test. To make accurate tests, one should directly
-write code in the unload.cxx file.
-The function will not return (loop) when the test fails or the result value
-is far off the 10 seconds value.
-*/
-sal_Bool test6()
-{
-    printf("test6 ####################################################\n");
-    oslModule handleMod1=0;
-    oslModule handleMod2=0;
-    OUString lib1Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY1));
-    OUString lib2Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY2));
-    OUString sSymbol("component_getFactory");
-    {
-    Reference<XMultiServiceFactory> serviceManager= createRegistryServiceFactory(
-         OUString("applicat.rdb"));
-    Reference<XInterface> xint= serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME1)));
-
-    // ----------------------------------------------------------
-    handleMod1= osl_loadModule( lib1Name.pData, 0);
-    osl_unloadModule( handleMod1);
-
-    // get rid of the service manager
-    Reference<XPropertySet> xSet( serviceManager, UNO_QUERY);
-    Any any_prop=   xSet->getPropertyValue( OUString("DefaultContext"));
-    Reference<XComponentContext> xContext;
-    any_prop >>= xContext;
-    Reference<XComponent> xComponent( xContext, UNO_QUERY);
-    xComponent->dispose();
-    }
-
-    // Enter a loop and try unloading. At least after 10 seconds
-    // this should be successful.
-    TimeValue time={10,0};
-
-    TimeValue beforeTime={0,0};
-    printf("\n unloading should take about 10 seconds\n");
-    osl_getSystemTime( &beforeTime);
-    for(;;)
-    {
-
-        rtl_unloadUnusedModules( &time);
-        void* pSymbol= osl_getSymbol(  handleMod1, sSymbol.pData);
-        if( ! pSymbol)
-            break;
-    }
-    TimeValue afterTime={0,0};
-    osl_getSystemTime( &afterTime);
-
-    printf("\n it took about %i seconds \n Check the value!!!", afterTime.Seconds - beforeTime.Seconds);
-    printf(" hit return to continue\n");
-    getchar();
-
-    return sal_True;
-}
-
-/*
-*/
-sal_Bool test7()
-{
-    printf("Test 7 ####################################################"
-            "\nThe callback function should be called 3 times\n");
-    sal_Int32 id1=1;
-    sal_Int32 id2=2;
-    sal_Int32 id3=3;
-    sal_Int32 cookie1= rtl_addUnloadingListener( listenerCallback, &id1);
-    sal_Int32 cookie2= rtl_addUnloadingListener( listenerCallback, &id2);
-    sal_Int32 cookie3= rtl_addUnloadingListener( listenerCallback, &id3);
-
-    printf("\nTest 7 \nThe listener should be called 3 times\n");
-    rtl_unloadUnusedModules( NULL);
-
-    rtl_removeUnloadingListener( cookie1);
-    rtl_removeUnloadingListener( cookie2);
-    rtl_removeUnloadingListener( cookie3);
-
-    sal_Int32 cookie4= rtl_addUnloadingListener( listenerCallback, &id1);
-    sal_Int32 cookie5= rtl_addUnloadingListener( listenerCallback, &id2);
-    sal_Int32 cookie6= rtl_addUnloadingListener( listenerCallback, &id3);
-
-    if( cookie1 == cookie4 &&
-        cookie2 == cookie5 )
-    {
-        printf("\n###cookie recycling works\n");
-        printf("hit return to continue\n");
-        getchar();
-    }
-    else
-    {
-        printf("\n###cookie recycling failed!!!\n");
-        printf("hit return to continue\n");
-        getchar();
-    }
-
-    rtl_removeUnloadingListener( cookie1);
-    rtl_removeUnloadingListener( cookie2);
-    rtl_removeUnloadingListener( cookie3);
-    return sal_True;
-}
-
-/* Test one-instance-service default factory (XUnloadingPreference)
-    cppuhelper/source/factory.cxx
-*/
-sal_Bool test8()
-{
-    printf("Test 8 ####################################################\n");
-    oslModule handleMod1=0;
-    OUString lib1Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY1));
-    OUString sSymbol("component_getFactory");
-
-    sal_Bool b_ifaceSupported=sal_False;
-    sal_Bool b_instances_identical= sal_False;
-    sal_Bool b_releaseBeforeLoading= sal_False;
-    sal_Bool b_releaseAfterLoading= sal_False;
-    sal_Bool b_unloaded= sal_False;
-
-    {
-    Reference<XMultiServiceFactory> serviceManager= createRegistryServiceFactory(
-         OUString("applicat.rdb"));
-    Reference<XContentEnumerationAccess> xContent( serviceManager, UNO_QUERY);
-    Reference<XEnumeration> xenum=  xContent->createContentEnumeration(
-        OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICENAME4)));
-
-    Any any_elem;
-    if( xenum->hasMoreElements())
-        any_elem= xenum->nextElement();
-    Reference<XInterface> xinterfaceFact;
-    any_elem>>=xinterfaceFact;
-    Reference<XTypeProvider> xprov( xinterfaceFact, UNO_QUERY);
-
-    Sequence<Type> seqTypes= xprov->getTypes();
-
-    //  XTypeProvider test
-    for( sal_Int32 i=0; i<seqTypes.getLength(); i++)
-    {
-        OUString name= seqTypes[i].getTypeName();
-        if ( name == "com.sun.star.uno.XUnloadingPreference" )
-            b_ifaceSupported= sal_True;
-    }
-
-    // XUnloadingPreference::releaseOnNotification should return true now because we haven't
-    // created an instance yet
-    Reference<XUnloadingPreference> xreject( xinterfaceFact, UNO_QUERY);
-    b_releaseBeforeLoading= xreject->releaseOnNotification();
-
-    // Create instance. Afterwards releaseOnNotification should return false.
-    Reference<XInterface> xint= serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME4)));
-    b_releaseAfterLoading= xreject->releaseOnNotification();
-    b_releaseAfterLoading= b_releaseAfterLoading? sal_False : sal_True;
-
-    // safe the handle of the module
-    handleMod1= osl_loadModule( lib1Name.pData, 0);
-    osl_unloadModule( handleMod1);
-
-    // ----------------------------------------------------------
-    // for debugging
-    Reference<XServiceInfo> info( xint, UNO_QUERY);
-    OUString s= info->getImplementationName();
-
-    // get another instance which must be the same
-    Reference<XInterface> xint2=    serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME4)));
-
-    b_instances_identical= xint == xint2;
-
-    // get rid of the service manager
-    Reference<XPropertySet> xSet( serviceManager, UNO_QUERY);
-    Any any_prop=   xSet->getPropertyValue( OUString("DefaultContext"));
-    Reference<XComponentContext> xContext;
-    any_prop >>= xContext;
-    Reference<XComponent> xComponent( xContext, UNO_QUERY);
-    xComponent->dispose();
-    }
-
-    rtl_unloadUnusedModules( NULL);
-
-    // The library must be unloaded now
-    void* pSymbol= osl_getSymbol(  handleMod1, sSymbol.pData);
-    if( ! pSymbol )
-        b_unloaded= sal_True;
-
-    if( b_ifaceSupported && b_instances_identical && b_releaseBeforeLoading &&
-        b_releaseAfterLoading && b_unloaded)
-        return sal_True;
-    return sal_False;
-}
-
-void SAL_CALL listenerCallback( void* id)
-{
-    printf(" listener called with id= %i\n", *(sal_Int32*)id);
-}
-
-/*
-
-  */
-sal_Bool test9()
-{
-    printf("Test 9 ####################################################\n");
-    oslModule handleMod=0;
-    sal_Bool retval=sal_False;
-    OUString lib1Name( RTL_CONSTASCII_USTRINGPARAM(LIBRARY1));
-
-    Reference<XMultiServiceFactory> serviceManager= createRegistryServiceFactory(
-         OUString("applicat.rdb"));
-
-    Reference<XInterface> xint= serviceManager->createInstance( OUString(
-                RTL_CONSTASCII_USTRINGPARAM(SERVICENAME1)));
-    // Release the service. The library refcount should be 1
-    xint=0;
-
-    handleMod=  osl_loadModule( lib1Name.pData, 0);
-    osl_unloadModule( handleMod);
-    //-----------------------------------------------------------
-
-    // the service manager is still alive
-    rtl_unloadUnusedModules( NULL);
-    // Try to get a symbol, must fail
-    OUString sSymbol("component_getFactory");
-    void* pSymbol= osl_getSymbol(  handleMod, sSymbol.pData);
-
-    if( pSymbol)
-    {
-        retval= sal_False;
-    }
-    else
-        retval= sal_True;
-    return retval;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit e8ff469da51904a2ddafd59b2dcf45539370e08e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 19 16:50:50 2013 +0200

    Remove any remaining remnants of unused component_canUnload feature
    
    Change-Id: I635fd006b5ba9f5fb0091748ee2ff9bc3c1a2d2a

diff --git a/animations/source/animcore/factreg.cxx b/animations/source/animcore/factreg.cxx
index 418c819..4f5b078 100644
--- a/animations/source/animcore/factreg.cxx
+++ b/animations/source/animcore/factreg.cxx
@@ -31,18 +31,13 @@ using namespace ::com::sun::star::registry;
 
 #include "factreg.hxx"
 
-namespace animcore
-{
-    rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-}
-
 using namespace animcore;
 
 #define IMPLEMENTATION_ENTRY(N)\
 {\
     createInstance_##N, getImplementationName_##N ,\
     getSupportedServiceNames_##N, createSingleComponentFactory ,\
-    &g_moduleCount.modCnt , 0\
+    0, 0\
 }\
 
 static struct ImplementationEntry g_entries[] =
diff --git a/bridges/inc/bridges/cpp_uno/bridge.hxx b/bridges/inc/bridges/cpp_uno/bridge.hxx
index 3e8eca4..15d8eb8 100644
--- a/bridges/inc/bridges/cpp_uno/bridge.hxx
+++ b/bridges/inc/bridges/cpp_uno/bridge.hxx
@@ -281,8 +281,6 @@ inline cppu_Bridge::cppu_Bridge(
     , pUnoEnv( pUnoEnv_ )
     , bExportCpp2Uno( bExportCpp2Uno_ )
 {
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-
     aCpp2Uno.pBridge = this;
     aCpp2Uno.acquire = cppu_Mapping_acquire;
     aCpp2Uno.release = cppu_Mapping_release;
@@ -301,7 +299,6 @@ inline cppu_Bridge::~cppu_Bridge() SAL_THROW(())
 {
     (*((uno_Environment *)pUnoEnv)->release)( (uno_Environment *)pUnoEnv );
     (*((uno_Environment *)pCppEnv)->release)( (uno_Environment *)pCppEnv );
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
 }
 //__________________________________________________________________________________________________
 inline void SAL_CALL cppu_Bridge_free( uno_Mapping * pMapping ) SAL_THROW(())
@@ -472,16 +469,12 @@ inline void SAL_CALL cppu_cppenv_releaseInterface( uno_ExtEnvironment *, void *
     reinterpret_cast< ::com::sun::star::uno::XInterface * >( pCppI )->release();
 }
 //--------------------------------------------------------------------------------------------------
-inline void SAL_CALL cppu_cppenv_environmentDisposing( uno_Environment * ) SAL_THROW(())
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+inline void SAL_CALL cppu_cppenv_environmentDisposing( uno_Environment * ) SAL_THROW(()) {}
 //--------------------------------------------------------------------------------------------------
 inline void SAL_CALL cppu_cppenv_initEnvironment( uno_Environment * pCppEnv ) SAL_THROW(())
 {
     OSL_ENSURE( pCppEnv->pExtEnv, "### expected extended environment!" );
     OSL_ENSURE( ::rtl_ustr_ascii_compare( pCppEnv->pTypeName->buffer, CPPU_CURRENT_LANGUAGE_BINDING_NAME ) == 0, "### wrong environment type!" );
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
     ((uno_ExtEnvironment *)pCppEnv)->computeObjectIdentifier = cppu_cppenv_computeObjectIdentifier;
     ((uno_ExtEnvironment *)pCppEnv)->acquireInterface = cppu_cppenv_acquireInterface;
     ((uno_ExtEnvironment *)pCppEnv)->releaseInterface = cppu_cppenv_releaseInterface;
diff --git a/comphelper/inc/comphelper/componentmodule.hxx b/comphelper/inc/comphelper/componentmodule.hxx
index 7e57770..9ce8a13 100644
--- a/comphelper/inc/comphelper/componentmodule.hxx
+++ b/comphelper/inc/comphelper/componentmodule.hxx
@@ -43,7 +43,7 @@ namespace comphelper
         ::cppu::ComponentFactoryFunc _pFactoryFunc,
         OUString const& _rComponentName,
         ::com::sun::star::uno::Sequence< OUString > const & _rServiceNames,
-        rtl_ModuleCount* _pModuleCounter
+        rtl_ModuleCount*
     ) SAL_THROW(());
 
     //=========================================================================
diff --git a/connectivity/source/drivers/ado/Aservices.cxx b/connectivity/source/drivers/ado/Aservices.cxx
index 0e6c848..f1a9df4 100644
--- a/connectivity/source/drivers/ado/Aservices.cxx
+++ b/connectivity/source/drivers/ado/Aservices.cxx
@@ -32,7 +32,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames ,
-            rtl_ModuleCount* _pT
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/calc/Cservices.cxx b/connectivity/source/drivers/calc/Cservices.cxx
index 1bfbc36..7b95af6 100644
--- a/connectivity/source/drivers/calc/Cservices.cxx
+++ b/connectivity/source/drivers/calc/Cservices.cxx
@@ -32,7 +32,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pT
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/dbase/Dservices.cxx b/connectivity/source/drivers/dbase/Dservices.cxx
index f389220..5565df2 100644
--- a/connectivity/source/drivers/dbase/Dservices.cxx
+++ b/connectivity/source/drivers/dbase/Dservices.cxx
@@ -32,7 +32,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pT
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/evoab2/NServices.cxx b/connectivity/source/drivers/evoab2/NServices.cxx
index dc3a242..e543cb8 100644
--- a/connectivity/source/drivers/evoab2/NServices.cxx
+++ b/connectivity/source/drivers/evoab2/NServices.cxx
@@ -33,7 +33,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pT
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/flat/Eservices.cxx b/connectivity/source/drivers/flat/Eservices.cxx
index b6b1795..3ebf8f4 100644
--- a/connectivity/source/drivers/flat/Eservices.cxx
+++ b/connectivity/source/drivers/flat/Eservices.cxx
@@ -32,7 +32,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pT
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/hsqldb/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx
index a043185..c96e3da 100644
--- a/connectivity/source/drivers/hsqldb/Hservices.cxx
+++ b/connectivity/source/drivers/hsqldb/Hservices.cxx
@@ -33,7 +33,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pT
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx
index 53358a6..e485b61 100644
--- a/connectivity/source/drivers/jdbc/jservices.cxx
+++ b/connectivity/source/drivers/jdbc/jservices.cxx
@@ -32,7 +32,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pModCount
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/kab/KServices.cxx b/connectivity/source/drivers/kab/KServices.cxx
index e1174ef..61cd544 100644
--- a/connectivity/source/drivers/kab/KServices.cxx
+++ b/connectivity/source/drivers/kab/KServices.cxx
@@ -33,7 +33,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pTemp
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/macab/MacabServices.cxx b/connectivity/source/drivers/macab/MacabServices.cxx
index cff50dd..ac1f970 100644
--- a/connectivity/source/drivers/macab/MacabServices.cxx
+++ b/connectivity/source/drivers/macab/MacabServices.cxx
@@ -33,7 +33,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pTemp
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mozab/MServices.cxx b/connectivity/source/drivers/mozab/MServices.cxx
index 44b8b26..48e867b 100644
--- a/connectivity/source/drivers/mozab/MServices.cxx
+++ b/connectivity/source/drivers/mozab/MServices.cxx
@@ -38,7 +38,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pTemp
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mysql/Yservices.cxx b/connectivity/source/drivers/mysql/Yservices.cxx
index d9dc956..136a740 100644
--- a/connectivity/source/drivers/mysql/Yservices.cxx
+++ b/connectivity/source/drivers/mysql/Yservices.cxx
@@ -32,7 +32,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pT
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbc/oservices.cxx b/connectivity/source/drivers/odbc/oservices.cxx
index 7e20110..423a110 100644
--- a/connectivity/source/drivers/odbc/oservices.cxx
+++ b/connectivity/source/drivers/odbc/oservices.cxx
@@ -33,7 +33,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pTemp
+            rtl_ModuleCount*
         );
 
 //---------------------------------------------------------------------------------------
diff --git a/dbaccess/source/inc/registrationhelper.hxx b/dbaccess/source/inc/registrationhelper.hxx
index f556d9d..0f482b6 100644
--- a/dbaccess/source/inc/registrationhelper.hxx
+++ b/dbaccess/source/inc/registrationhelper.hxx
@@ -27,7 +27,7 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService
             const OUString & _rComponentName,
             ::cppu::ComponentInstantiation _pCreateFunction,
             const ::com::sun::star::uno::Sequence< OUString > & _rServiceNames,
-            rtl_ModuleCount* _p
+            rtl_ModuleCount*
         );
 
 //==========================================================================
diff --git a/dtrans/source/win32/dnd/dndentry.cxx b/dtrans/source/win32/dnd/dndentry.cxx
index c463dee..940b9bc 100644
--- a/dtrans/source/win32/dnd/dndentry.cxx
+++ b/dtrans/source/win32/dnd/dndentry.cxx
@@ -31,8 +31,6 @@ using namespace ::com::sun::star::registry  ;
 using namespace ::cppu                      ;
 using namespace ::com::sun::star::lang;
 
-rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
 Reference< XInterface > SAL_CALL createDragSource( const Reference< XMultiServiceFactory >& rServiceManager )
 {
     DragSource* pSource= new DragSource( comphelper::getComponentContext(rServiceManager) );
@@ -63,8 +61,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL dnd_component_getFactory( const sal_Char* pI
             reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
             OUString::createFromAscii( pImplName ),
             createDragSource,
-            aSNS,
-            &g_moduleCount.modCnt);
+            aSNS);
 
     }
     else if( pSrvManager && ( 0 == rtl_str_compare( pImplName, DNDTARGET_IMPL_NAME ) ) )
diff --git a/extensions/source/inc/componentmodule.hxx b/extensions/source/inc/componentmodule.hxx
index 68ae04c..b34a84f 100644
--- a/extensions/source/inc/componentmodule.hxx
+++ b/extensions/source/inc/componentmodule.hxx
@@ -50,7 +50,7 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService
             const OUString & _rComponentName,
             ::cppu::ComponentInstantiation _pCreateFunction,
             const ::com::sun::star::uno::Sequence< OUString > & _rServiceNames,
-            rtl_ModuleCount* _pModuleCounter
+            rtl_ModuleCount*
         );
 
     //=========================================================================
diff --git a/extensions/source/ole/servreg.cxx b/extensions/source/ole/servreg.cxx
index e9ce477..401b492 100644
--- a/extensions/source/ole/servreg.cxx
+++ b/extensions/source/ole/servreg.cxx
@@ -31,9 +31,6 @@ using namespace cppu;
 
 namespace ole_adapter
 {
-rtl_StandardModuleCount globalModuleCount= MODULE_COUNT_INIT;
-
-
 
 Reference<XInterface> SAL_CALL ConverterProvider_CreateInstance2(   const Reference<XMultiServiceFactory> & xSMgr)
                             throw(Exception)
@@ -76,29 +73,25 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL oleautobridge_component_getFacto
     {
         xFactory=  createSingleFactory( reinterpret_cast< XMultiServiceFactory*>(pServiceManager),
                                          OUString("com.sun.star.comp.ole.OleConverter2"),
-                                         ConverterProvider_CreateInstance2, seqServiceNames,
-                                         &globalModuleCount.modCnt );
+                                         ConverterProvider_CreateInstance2, seqServiceNames );
     }
     else if (pServiceManager && aImplName.equals(  reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleConverterVar1")  ))
     {
         xFactory= createSingleFactory( reinterpret_cast<XMultiServiceFactory*>(pServiceManager),
                                        OUString("com.sun.star.comp.ole.OleConverterVar1"),
-                                       ConverterProvider_CreateInstanceVar1, seqServiceNames,
-                                       &globalModuleCount.modCnt );
+                                       ConverterProvider_CreateInstanceVar1, seqServiceNames );
     }
     else if(pServiceManager && aImplName.equals(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleClient")))
     {
         xFactory= createSingleFactory( reinterpret_cast< XMultiServiceFactory*>(pServiceManager),
                                        OUString("com.sun.star.comp.ole.OleClient"),
-                                       OleClient_CreateInstance, seqServiceNames,
-                                       &globalModuleCount.modCnt);
+                                       OleClient_CreateInstance, seqServiceNames );
     }
     else if(pServiceManager && aImplName.equals(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleServer")))
     {
         xFactory= createOneInstanceFactory( reinterpret_cast< XMultiServiceFactory*>(pServiceManager),
                                             OUString("com.sun.star.comp.ole.OleServer"),
-                                            OleServer_CreateInstance, seqServiceNames,
-                                            &globalModuleCount.modCnt);
+                                            OleServer_CreateInstance, seqServiceNames );
     }
 
     if (xFactory.is())
diff --git a/forms/source/inc/forms_module.hxx b/forms/source/inc/forms_module.hxx
index e59f9736..db89c7e 100644
--- a/forms/source/inc/forms_module.hxx
+++ b/forms/source/inc/forms_module.hxx
@@ -45,7 +45,7 @@ namespace FORMS_MODULE_NAMESPACE
             const OUString & _rComponentName,
             ::cppu::ComponentInstantiation _pCreateFunction,
             const ::com::sun::star::uno::Sequence< OUString > & _rServiceNames,
-            rtl_ModuleCount* _pModuleCounter
+            rtl_ModuleCount*
         );
 
     //=========================================================================
diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx
index 7a1b720..ff734fa 100644
--- a/io/source/TextInputStream/TextInputStream.cxx
+++ b/io/source/TextInputStream/TextInputStream.cxx
@@ -46,8 +46,6 @@ using namespace ::com::sun::star::registry;
 
 namespace io_TextInputStream
 {
-    rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
 //===========================================================================
 // Implementation XTextInputStream
 
@@ -120,7 +118,6 @@ OTextInputStream::OTextInputStream()
     : mSeqSource( READ_BYTE_COUNT ), mpBuffer( NULL ), mnBufferSize( 0 )
     , mnCharsInBuffer( 0 ), mbReachedEOF( sal_False )
 {
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
     mbEncodingInitialized = false;
 }
 
@@ -131,7 +128,6 @@ OTextInputStream::~OTextInputStream()
         rtl_destroyUnicodeToTextContext( mConvText2Unicode, mContextText2Unicode );
         rtl_destroyUnicodeToTextConverter( mConvText2Unicode );
     }
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
 }
 
 void OTextInputStream::implResizeBuffer( void )
@@ -477,7 +473,7 @@ static struct ImplementationEntry g_entries[] =
     {
         TextInputStream_CreateInstance, TextInputStream_getImplementationName ,
         TextInputStream_getSupportedServiceNames, createSingleComponentFactory ,
-        &g_moduleCount.modCnt , 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 };
diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx
index 36f3327..48db4a9 100644
--- a/io/source/TextOutputStream/TextOutputStream.cxx
+++ b/io/source/TextOutputStream/TextOutputStream.cxx
@@ -46,7 +46,6 @@ using namespace ::com::sun::star::registry;
 
 namespace io_TextOutputStream
 {
-    rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
 //===========================================================================
 // Implementation XTextOutputStream
 
@@ -277,7 +276,7 @@ static struct ImplementationEntry g_entries[] =
     {
         TextOutputStream_CreateInstance, TextOutputStream_getImplementationName ,
         TextOutputStream_getSupportedServiceNames, createSingleComponentFactory ,
-        &g_moduleCount.modCnt , 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 };
diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx
index ca66e6e..bf28d7b 100644
--- a/io/source/acceptor/acceptor.cxx
+++ b/io/source/acceptor/acceptor.cxx
@@ -45,8 +45,6 @@ using namespace ::com::sun::star::connection;
 
 namespace io_acceptor
 {
-    rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
     class OAcceptor : public WeakImplHelper2< XAcceptor, XServiceInfo >
     {
     public:
@@ -85,9 +83,7 @@ namespace io_acceptor
         , m_bInAccept( sal_False )
         , _xSMgr( xCtx->getServiceManager() )
         , _xCtx( xCtx )
-    {
-        g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-    }
+    {}
 
     OAcceptor::~OAcceptor()
     {
@@ -99,7 +95,6 @@ namespace io_acceptor
         {
             delete m_pSocket;
         }
-        g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
     }
 
     struct BeingInAccept
@@ -321,7 +316,7 @@ static struct ImplementationEntry g_entries[] =
     {
         acceptor_CreateInstance, acceptor_getImplementationName ,
         acceptor_getSupportedServiceNames, createSingleComponentFactory ,
-        &g_moduleCount.modCnt , 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 };
diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx
index 0d65717..e6df227 100644
--- a/io/source/connector/connector.cxx
+++ b/io/source/connector/connector.cxx
@@ -46,8 +46,6 @@ using namespace ::com::sun::star::connection;
 
 namespace stoc_connector
 {
-    rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
     class OConnector : public WeakImplHelper2< XConnector, XServiceInfo >
     {
         Reference< XMultiComponentFactory > _xSMgr;
@@ -69,14 +67,9 @@ namespace stoc_connector
     OConnector::OConnector(const Reference< XComponentContext > &xCtx)
         : _xSMgr( xCtx->getServiceManager() )
         , _xCtx( xCtx )
-    {
-        g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-    }
+    {}
 
-    OConnector::~OConnector()
-    {
-        g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-    }
+    OConnector::~OConnector() {}
 
     Reference< XConnection > SAL_CALL OConnector::connect( const OUString& sConnectionDescription )
         throw( NoConnectException, ConnectionSetupException, RuntimeException)
@@ -228,7 +221,7 @@ static struct ImplementationEntry g_entries[] =
     {
         connector_CreateInstance, connector_getImplementationName ,
         connector_getSupportedServiceNames, createSingleComponentFactory ,
-        &g_moduleCount.modCnt , 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 };
diff --git a/io/source/stm/factreg.cxx b/io/source/stm/factreg.cxx
index 69f7e6d..935f2a5 100644
--- a/io/source/stm/factreg.cxx
+++ b/io/source/stm/factreg.cxx
@@ -32,11 +32,6 @@ using namespace ::com::sun::star::registry;
 
 #include "factreg.hxx"
 
-namespace io_stm
-{
-    rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-}
-
 using namespace io_stm;
 
 static struct ImplementationEntry g_entries[] =
@@ -44,42 +39,42 @@ static struct ImplementationEntry g_entries[] =
     {
         OPipeImpl_CreateInstance, OPipeImpl_getImplementationName ,
         OPipeImpl_getSupportedServiceNames, createSingleComponentFactory ,
-        &g_moduleCount.modCnt , 0
+        0, 0
     },
     {
         OPumpImpl_CreateInstance, OPumpImpl_getImplementationName ,
         OPumpImpl_getSupportedServiceNames, createSingleComponentFactory ,
-        &g_moduleCount.modCnt , 0
+        0, 0
     },
     {
         ODataInputStream_CreateInstance, ODataInputStream_getImplementationName,
         ODataInputStream_getSupportedServiceNames, createSingleComponentFactory,
-        &g_moduleCount.modCnt, 0
+        0, 0
     },
     {
         ODataOutputStream_CreateInstance, ODataOutputStream_getImplementationName,
         ODataOutputStream_getSupportedServiceNames, createSingleComponentFactory,
-        &g_moduleCount.modCnt, 0
+        0, 0
     },
     {
         OObjectInputStream_CreateInstance, OObjectInputStream_getImplementationName,
         OObjectInputStream_getSupportedServiceNames, createSingleComponentFactory,
-        &g_moduleCount.modCnt, 0
+        0, 0
     },
     {
         OObjectOutputStream_CreateInstance, OObjectOutputStream_getImplementationName,
         OObjectOutputStream_getSupportedServiceNames, createSingleComponentFactory,
-        &g_moduleCount.modCnt, 0
+        0, 0
     },
     {
         OMarkableInputStream_CreateInstance, OMarkableInputStream_getImplementationName,
         OMarkableInputStream_getSupportedServiceNames, createSingleComponentFactory,
-        &g_moduleCount.modCnt, 0
+        0, 0
     },
     {
         OMarkableOutputStream_CreateInstance, OMarkableOutputStream_getImplementationName,
         OMarkableOutputStream_getSupportedServiceNames, createSingleComponentFactory,
-        &g_moduleCount.modCnt, 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 
diff --git a/mysqlc/source/mysqlc_services.cxx b/mysqlc/source/mysqlc_services.cxx
index 1d6139d..cc7e8e0 100644
--- a/mysqlc/source/mysqlc_services.cxx
+++ b/mysqlc/source/mysqlc_services.cxx
@@ -36,7 +36,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pTemp
+            rtl_ModuleCount*
         );
 
 struct ProviderRequest
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
index 1dd29d8..9e8fa4c 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
@@ -52,7 +52,7 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
             const OUString & rComponentName,
             ::cppu::ComponentInstantiation pCreateFunction,
             const Sequence< OUString > & rServiceNames,
-            rtl_ModuleCount* _pTemp
+            rtl_ModuleCount*
         );
 
 //***************************************************************************************
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index 637534d..87421f0 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -47,7 +47,6 @@ using namespace com::sun::star::registry;
 
 namespace unourl_resolver
 {
-    rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
 //--------------------------------------------------------------------------------------------------
 Sequence< OUString > resolver_getSupportedServiceNames()
 {
@@ -87,14 +86,9 @@ public:
 ResolverImpl::ResolverImpl( const Reference< XComponentContext > & xCtx )
     : _xSMgr( xCtx->getServiceManager() )
     , _xCtx( xCtx )
-{
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-}
+{}
 //__________________________________________________________________________________________________
-ResolverImpl::~ResolverImpl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+ResolverImpl::~ResolverImpl() {}
 
 // XServiceInfo
 //__________________________________________________________________________________________________
@@ -183,7 +177,7 @@ static struct ImplementationEntry g_entries[] =
     {
         ResolverImpl_create, resolver_getImplementationName,
         resolver_getSupportedServiceNames, createSingleComponentFactory,
-        &g_moduleCount.modCnt , 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 };
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 3e41477..32c89b4 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -75,7 +75,6 @@ bool endsWith( const OUString& target,
     }
     return false;
 }
-//::rtl_StandardModuleCount s_moduleCount = MODULE_COUNT_INIT;
 
 /* should be available in some central location. */
 //*************************************************************************
@@ -95,7 +94,6 @@ MasterScriptProvider::MasterScriptProvider( const Reference< XComponentContext >
 //*************************************************************************
 MasterScriptProvider::~MasterScriptProvider()
 {
-    //s_moduleCount.modCnt.release( &s_moduleCount.modCnt );
     if ( m_pPCache )
     {
         delete m_pPCache;
diff --git a/sdext/source/presenter/PresenterComponent.cxx b/sdext/source/presenter/PresenterComponent.cxx
index c66037e..d7ab29d 100644
--- a/sdext/source/presenter/PresenterComponent.cxx
+++ b/sdext/source/presenter/PresenterComponent.cxx
@@ -30,15 +30,13 @@ using namespace osl;
 
 namespace sdext { namespace presenter {
 
-rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
 static struct ImplementationEntry gServiceEntries[] =
 {
     {
         PresenterProtocolHandler::Create,
         PresenterProtocolHandler::getImplementationName_static,
         PresenterProtocolHandler::getSupportedServiceNames_static,
-        createSingleComponentFactory, &g_moduleCount.modCnt, 0
+        createSingleComponentFactory, 0, 0
     },
     {
         PresenterScreenJob::Create,
diff --git a/stoc/source/bootstrap/services.cxx b/stoc/source/bootstrap/services.cxx
index c66aeea..3157d25 100644
--- a/stoc/source/bootstrap/services.cxx
+++ b/stoc/source/bootstrap/services.cxx
@@ -33,8 +33,6 @@ using namespace com::sun::star::uno;
 using namespace cppu;
 using namespace osl;
 
-extern rtl_StandardModuleCount g_moduleCount;
-
 using namespace stoc_bootstrap;
 
 static struct ImplementationEntry g_entries[] =
@@ -43,64 +41,64 @@ static struct ImplementationEntry g_entries[] =
     {
     OServiceManager_CreateInstance, smgr_getImplementationName,
     smgr_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt , 0
+    0, 0
     },
     {
     ORegistryServiceManager_CreateInstance, regsmgr_getImplementationName,
     regsmgr_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt , 0
+    0, 0
     },
     {
     OServiceManagerWrapper_CreateInstance, smgr_wrapper_getImplementationName,
     smgr_wrapper_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt , 0
+    0, 0
     },
     //security
     {
     ac_create, ac_getImplementationName,
     ac_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt, 0
+    0, 0
     },
     {
     filepolicy_create, filepolicy_getImplementationName,
     filepolicy_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt, 0
+    0, 0
     },
     //simpleregistry
     {
     SimpleRegistry_CreateInstance, simreg_getImplementationName,
     simreg_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt , 0
+    0, 0
     },
     //defaultregistry
     {
     NestedRegistry_CreateInstance, defreg_getImplementationName,
     defreg_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt , 0
+    0, 0
     },
     //implementationregistry
     {
     ImplementationRegistration_CreateInstance, impreg_getImplementationName,
     impreg_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt , 0
+    0, 0
     },
     //loader
     {
     DllComponentLoader_CreateInstance, loader_getImplementationName,
     loader_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt , 0
+    0, 0
     },
     //registry_tdprovider
     {
     ProviderImpl_create, rdbtdp_getImplementationName,
     rdbtdp_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt , 0
+    0, 0
     },
     //tdmanager
     {
     ManagerImpl_create, tdmgr_getImplementationName,
     tdmgr_getSupportedServiceNames, createSingleComponentFactory,
-    &g_moduleCount.modCnt , 0
+    0, 0
     },
     //end
     { 0, 0, 0, 0, 0, 0 }
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index 2386757..eec2d87 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -43,10 +43,6 @@ static const sal_Int32 CACHE_SIZE = 256;
 #define SERVICENAME "com.sun.star.reflection.CoreReflection"
 #define IMPLNAME    "com.sun.star.comp.stoc.CoreReflection"
 
-// can be static, as every client of the core reflection keeps a reference to the
-// core reflection, so refcounting can be done here.
-static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
 static Sequence< OUString > core_getSupportedServiceNames()
 {
     Sequence< OUString > seqNames(1);
@@ -65,16 +61,12 @@ IdlReflectionServiceImpl::IdlReflectionServiceImpl(
     , _xMgr( xContext->getServiceManager(), UNO_QUERY )
     , _aElements( CACHE_SIZE )
 {
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
     xContext->getValueByName( OUString(
         "/singletons/com.sun.star.reflection.theTypeDescriptionManager") ) >>= _xTDMgr;
     OSL_ENSURE( _xTDMgr.is(), "### cannot get singleton \"TypeDescriptionManager\" from context!" );
 }
 //__________________________________________________________________________________________________
-IdlReflectionServiceImpl::~IdlReflectionServiceImpl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+IdlReflectionServiceImpl::~IdlReflectionServiceImpl() {}
 
 // XInterface
 //__________________________________________________________________________________________________
@@ -458,7 +450,7 @@ static struct ImplementationEntry g_entries[] =
     {
         IdlReflectionServiceImpl_create, core_getImplementationName,
         core_getSupportedServiceNames, createSingleComponentFactory,
-        &g_moduleCount.modCnt , 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 };
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index 198b90b..0f39a05 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -48,8 +48,6 @@ using namespace osl;
 #define SERVICENAME "com.sun.star.registry.NestedRegistry"
 #define IMPLNAME       "com.sun.star.comp.stoc.NestedRegistry"
 
-extern rtl_StandardModuleCount g_moduleCount;
-
 namespace stoc_bootstrap
 {
 Sequence< OUString > defreg_getSupportedServiceNames()
@@ -1139,16 +1137,10 @@ OUString SAL_CALL NestedKeyImpl::getResolvedName( const OUString& aKeyName )
 //*************************************************************************
 NestedRegistryImpl::NestedRegistryImpl( )
     : m_state(0)
-{
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-}
+{}
 
 //*************************************************************************
-NestedRegistryImpl::~NestedRegistryImpl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
-
+NestedRegistryImpl::~NestedRegistryImpl() {}
 
 class RegistryEnumueration : public WeakImplHelper1< XEnumeration >
 {
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index ccdfd90..c2fdac4 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -119,8 +119,6 @@ const StringPool &spool()
 }
 }
 
-extern rtl_StandardModuleCount g_moduleCount;
-
 namespace stoc_bootstrap
 {
 Sequence< OUString > impreg_getSupportedServiceNames()
@@ -1319,18 +1317,12 @@ private: // members
 ImplementationRegistration::ImplementationRegistration( const Reference < XComponentContext > & xCtx )
     : m_xSMgr( xCtx->getServiceManager() )
     , m_xCtx( xCtx )
-{
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-}
+{}
 
 //*************************************************************************
 // ~ImplementationRegistration()
 //
-ImplementationRegistration::~ImplementationRegistration()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
-
+ImplementationRegistration::~ImplementationRegistration() {}
 
 // XServiceInfo
 OUString ImplementationRegistration::getImplementationName() throw(RuntimeException)
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 429b361..8ec0c9a 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -66,8 +66,6 @@ using namespace osl;
 
 namespace stoc_inv
 {
-static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
 static Sequence< OUString > inv_getSupportedServiceNames()
 {
     Sequence< OUString > seqNames(1);
@@ -249,14 +247,10 @@ Invocation_Impl::Invocation_Impl
     , xIntrospection( rI )
     , xCoreReflection( rCR )
 {
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
     setMaterial( rAdapted );
 }
 
-Invocation_Impl::~Invocation_Impl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+Invocation_Impl::~Invocation_Impl() {}
 
 //##################################################################################################
 //### INTERFACE IMPLEMENTATIONS ####################################################################
@@ -1099,7 +1093,6 @@ InvocationService::InvocationService( const Reference<XComponentContext> & xCtx
     : mxCtx( xCtx )
     , mxSMgr( xCtx->getServiceManager() )
 {
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
     xTypeConverter = Reference<XTypeConverter>(
         mxSMgr->createInstanceWithContext(
             OUString("com.sun.star.script.Converter"),
@@ -1123,10 +1116,7 @@ InvocationService::InvocationService( const Reference<XComponentContext> & xCtx
 //      UNO_QUERY);
 }
 
-InvocationService::~InvocationService()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+InvocationService::~InvocationService() {}
 
 // XServiceInfo
 OUString InvocationService::getImplementationName() throw( RuntimeException )
@@ -1192,7 +1182,7 @@ static struct ImplementationEntry g_entries[] =
     {
         InvocationService_CreateInstance, inv_getImplementationName,
         inv_getSupportedServiceNames, createSingleComponentFactory,
-        &g_moduleCount.modCnt , 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 };
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index b1b5904..f0f23d1 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -59,8 +59,6 @@ using namespace ::com::sun::star::uno;
 namespace stoc_invadp
 {
 
-static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
 static Sequence< OUString > invadp_getSupportedServiceNames()
 {
     Sequence< OUString > seqNames(1);
@@ -762,8 +760,6 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext )
         throw RuntimeException(
             "missing type descriptions!", Reference< XInterface >() );
     }
-
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
 }
 //______________________________________________________________________________
 FactoryImpl::~FactoryImpl() SAL_THROW(())
@@ -780,7 +776,6 @@ FactoryImpl::~FactoryImpl() SAL_THROW(())
 #if OSL_DEBUG_LEVEL > 1
     OSL_ENSURE( m_receiver2adapters.empty(), "### still adapters out there!?" );
 #endif
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
 }
 
 //------------------------------------------------------------------------------
@@ -949,7 +944,7 @@ static struct ::cppu::ImplementationEntry g_entries[] =
         ::stoc_invadp::invadp_getImplementationName,
         ::stoc_invadp::invadp_getSupportedServiceNames,
         ::cppu::createOneInstanceComponentFactory,
-        &::stoc_invadp::g_moduleCount.modCnt , 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 };
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx
index 45f9959..fb9ad06 100644
--- a/stoc/source/loader/dllcomponentloader.cxx
+++ b/stoc/source/loader/dllcomponentloader.cxx
@@ -53,7 +53,6 @@ using namespace com::sun::star::lang;
 using namespace com::sun::star::registry;
 using namespace cppu;
 using namespace osl;
-extern rtl_StandardModuleCount g_moduleCount;
 
 namespace stoc_bootstrap
 {
@@ -106,15 +105,11 @@ private:
 //*************************************************************************
 DllComponentLoader::DllComponentLoader( const Reference<XComponentContext> & xCtx )
 {
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
     m_xSMgr.set( xCtx->getServiceManager(), UNO_QUERY );
 }
 
 //*************************************************************************
-DllComponentLoader::~DllComponentLoader()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+DllComponentLoader::~DllComponentLoader() {}
 
 //*************************************************************************
 OUString SAL_CALL DllComponentLoader::getImplementationName(  )
diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx
index 3f666af..ed3ec31 100644
--- a/stoc/source/namingservice/namingservice.cxx
+++ b/stoc/source/namingservice/namingservice.cxx
@@ -47,7 +47,6 @@ using namespace com::sun::star::registry;
 
 namespace stoc_namingservice
 {
-static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
 
 static Sequence< OUString > ns_getSupportedServiceNames()
 {
@@ -117,16 +116,10 @@ static Reference<XInterface> SAL_CALL NamingService_Impl_create(
 }
 
 //==================================================================================================
-NamingService_Impl::NamingService_Impl()
-{
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-}
+NamingService_Impl::NamingService_Impl() {}
 
 //==================================================================================================
-NamingService_Impl::~NamingService_Impl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+NamingService_Impl::~NamingService_Impl() {}
 
 // XServiceInfo
 OUString NamingService_Impl::getImplementationName()
@@ -189,7 +182,7 @@ static struct ImplementationEntry g_entries[] =
     {
         NamingService_Impl_create, ns_getImplementationName,
         ns_getSupportedServiceNames, createSingleComponentFactory,
-        &g_moduleCount.modCnt , 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 };
diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx
index 590e855..2b52096 100644
--- a/stoc/source/proxy_factory/proxyfac.cxx
+++ b/stoc/source/proxy_factory/proxyfac.cxx
@@ -48,8 +48,6 @@ using namespace ::com::sun::star::uno;
 namespace
 {
 
-static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
-
 static OUString proxyfac_getImplementationName()
 {
     return OUString(IMPL_NAME);
@@ -420,15 +418,10 @@ FactoryImpl::FactoryImpl()
         reinterpret_cast< uno_Mapping ** >( &m_cpp2uno ),
         m_cpp_env.get(), m_uno_env.get(), 0 );
     OSL_ENSURE( m_cpp2uno.is(), "### cannot get bridge C++ <-> uno!" );
-
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
 }
 
 //______________________________________________________________________________
-FactoryImpl::~FactoryImpl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+FactoryImpl::~FactoryImpl() {}
 
 // XProxyFactory
 //______________________________________________________________________________
@@ -493,7 +486,7 @@ static ::cppu::ImplementationEntry g_entries [] =
     {
         proxyfac_create, proxyfac_getImplementationName,
         proxyfac_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
-        &g_moduleCount.modCnt, 0
+        0, 0
     },
     { 0, 0, 0, 0, 0, 0 }
 };
diff --git a/stoc/source/registry_tdprovider/base.hxx b/stoc/source/registry_tdprovider/base.hxx
index 8c68646..a4328b7 100644
--- a/stoc/source/registry_tdprovider/base.hxx
+++ b/stoc/source/registry_tdprovider/base.hxx
@@ -62,8 +62,6 @@ using namespace com::sun::star::reflection;
 
 //--------------------------------------------------------------------------------------------------
 
-extern rtl_StandardModuleCount g_moduleCount;
-
 namespace stoc_rdbtdp
 {
 
@@ -174,9 +172,7 @@ public:
     TypeDescriptionImpl( TypeClass eTypeClass, const OUString & rName )
         : _eTypeClass( eTypeClass )
         , _aName( rName )
-        {
-            g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-        }
+        {}
     virtual ~TypeDescriptionImpl();
 
     // XTypeDescription
@@ -276,9 +272,7 @@ public:
         , _pMembers( 0 )
         , _pMemberNames( 0 )
         , _published( published )
-        {
-            g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-        }
+        {}
     virtual ~CompoundTypeDescriptionImpl();
 
     // XTypeDescription
@@ -325,9 +319,7 @@ public:
         , _pEnumNames( 0 )
         , _pEnumValues( 0 )
         , _published( published )
-        {
-            g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-        }
+        {}
     virtual ~EnumTypeDescriptionImpl();
 
     // XTypeDescription
@@ -365,9 +357,7 @@ public:
         , _aName( rName )
         , _aRefName( rRefName )
         , _published( published )
-        {
-            g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-        }
+        {}
     virtual ~TypedefTypeDescriptionImpl();
 
     // XTypeDescription
@@ -419,9 +409,7 @@ public:
         bool published)
     : _aName( rName ), _aBytes( rBytes ), _xTDMgr( xTDMgr ),
       _bInitReferences( false ), _published( published )
-    {
-        g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-    }
+    {}
     virtual ~ServiceTypeDescriptionImpl();
 
     // XTypeDescription
@@ -493,9 +481,7 @@ public:
         XTypeDescriptionEnumerationAccess > & xTDMgr,
         const OUString & rName )
     : _aName( rName ), _xTDMgr( xTDMgr ), _pMembers( 0 )
-    {
-        g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-    }
+    {}
     virtual ~ModuleTypeDescriptionImpl();
 
     // XTypeDescription
@@ -524,9 +510,7 @@ public:
     ConstantTypeDescriptionImpl( const OUString & rName,
                                  const Any & rValue )
     : _aName( rName ), _aValue( rValue )
-    {
-        g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-    }
+    {}
     virtual ~ConstantTypeDescriptionImpl();
 
     // XTypeDescription
@@ -559,9 +543,7 @@ public:
                                   const Sequence< sal_Int8 > & rBytes,
                                   bool published )
     : _aName( rName ), _aBytes( rBytes), _pMembers( 0 ), _published( published )
-    {
-        g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-    }
+    {}
     virtual ~ConstantsTypeDescriptionImpl();
 
     // XTypeDescription
@@ -603,9 +585,7 @@ public:
         const OUString & rName, const OUString & rBaseName, bool published )
     : _aName( rName ), _aBaseName( rBaseName), _xTDMgr( xTDMgr ),
       _published( published )
-    {
-        g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-    }
+    {}
     virtual ~SingletonTypeDescriptionImpl();
 
     // XTypeDescription
diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
index 9af018d..8b68aee 100644
--- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
+++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx
@@ -177,9 +177,7 @@ TypeDescriptionEnumerationImpl::TypeDescriptionEnumerationImpl(
   m_aTypes( rTypes ),
   m_eDepth( eDepth ),
   m_xTDMgr( xTDMgr )
-{
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-}
+{}
 
 //=========================================================================
 // virtual
@@ -227,8 +225,6 @@ TypeDescriptionEnumerationImpl::~TypeDescriptionEnumerationImpl()
 
         ++it;
     }
-
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
 }
 
 //=========================================================================
diff --git a/stoc/source/registry_tdprovider/td.cxx b/stoc/source/registry_tdprovider/td.cxx
index f56a0f0..6ae85de 100644
--- a/stoc/source/registry_tdprovider/td.cxx
+++ b/stoc/source/registry_tdprovider/td.cxx
@@ -45,11 +45,7 @@ namespace stoc_rdbtdp
     return *s_pmutex;
 }
 
-
-TypeDescriptionImpl::~TypeDescriptionImpl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+TypeDescriptionImpl::~TypeDescriptionImpl() {}
 
 // XTypeDescription
 //__________________________________________________________________________________________________
diff --git a/stoc/source/registry_tdprovider/tdcomp.cxx b/stoc/source/registry_tdprovider/tdcomp.cxx
index e85791d..cb1284b 100644
--- a/stoc/source/registry_tdprovider/tdcomp.cxx
+++ b/stoc/source/registry_tdprovider/tdcomp.cxx
@@ -30,7 +30,6 @@ CompoundTypeDescriptionImpl::~CompoundTypeDescriptionImpl()
 {
     delete _pMembers;
     delete _pMemberNames;
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
 }
 
 // XTypeDescription
diff --git a/stoc/source/registry_tdprovider/tdconsts.cxx b/stoc/source/registry_tdprovider/tdconsts.cxx
index e0a91bf..7b6e0cb 100644
--- a/stoc/source/registry_tdprovider/tdconsts.cxx
+++ b/stoc/source/registry_tdprovider/tdconsts.cxx
@@ -31,8 +31,6 @@ namespace stoc_rdbtdp
 ConstantsTypeDescriptionImpl::~ConstantsTypeDescriptionImpl()
 {
     delete _pMembers;
-
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
 }
 
 // XTypeDescription
diff --git a/stoc/source/registry_tdprovider/tdef.cxx b/stoc/source/registry_tdprovider/tdef.cxx
index 7b902c6..34ac118 100644
--- a/stoc/source/registry_tdprovider/tdef.cxx
+++ b/stoc/source/registry_tdprovider/tdef.cxx
@@ -21,10 +21,7 @@
 
 namespace stoc_rdbtdp
 {
-TypedefTypeDescriptionImpl::~TypedefTypeDescriptionImpl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+TypedefTypeDescriptionImpl::~TypedefTypeDescriptionImpl() {}
 
 // XTypeDescription
 //__________________________________________________________________________________________________
diff --git a/stoc/source/registry_tdprovider/tdenum.cxx b/stoc/source/registry_tdprovider/tdenum.cxx
index be212e0..65c1ece 100644
--- a/stoc/source/registry_tdprovider/tdenum.cxx
+++ b/stoc/source/registry_tdprovider/tdenum.cxx
@@ -30,7 +30,6 @@ EnumTypeDescriptionImpl::~EnumTypeDescriptionImpl()
 {
     delete _pEnumNames;
     delete _pEnumValues;
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
 }
 
 // XTypeDescription
diff --git a/stoc/source/registry_tdprovider/tdiface.cxx b/stoc/source/registry_tdprovider/tdiface.cxx
index c558042..d9a46c4 100644
--- a/stoc/source/registry_tdprovider/tdiface.cxx
+++ b/stoc/source/registry_tdprovider/tdiface.cxx
@@ -68,9 +68,7 @@ public:
         , _aReturnType( rReturnType )
         , _bIsOneWay( bIsOneWay )
         , _nPosition( nPosition )
-        {
-            g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-        }
+        {}
     virtual ~InterfaceMethodImpl();
 
     // XTypeDescription
@@ -89,10 +87,7 @@ public:
     virtual Sequence< Reference< XTypeDescription > > SAL_CALL getExceptions() throw(::com::sun::star::uno::RuntimeException);
 };
 //__________________________________________________________________________________________________
-InterfaceMethodImpl::~InterfaceMethodImpl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+InterfaceMethodImpl::~InterfaceMethodImpl() {}
 
 // XTypeDescription
 //__________________________________________________________________________________________________
@@ -221,9 +216,7 @@ public:
         , _nPosition( nPosition )
         , _getter( getter )
         , _setter( setter )
-        {
-            g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-        }
+        {}
     SAL_WNODEPRECATED_DECLARATIONS_POP
     virtual ~InterfaceAttributeImpl();
 
@@ -263,10 +256,7 @@ public:
     }
 };
 
-InterfaceAttributeImpl::~InterfaceAttributeImpl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+InterfaceAttributeImpl::~InterfaceAttributeImpl() {}
 // XTypeDescription
 //__________________________________________________________________________________________________
 TypeClass InterfaceAttributeImpl::getTypeClass()
@@ -400,14 +390,9 @@ InterfaceTypeDescriptionImpl::InterfaceTypeDescriptionImpl(
     , _aOptionalBaseTypes( rOptionalBaseTypes )
     , _membersInit( false )
     , _published( published )
-{
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-}
+{}
 //__________________________________________________________________________________________________
-InterfaceTypeDescriptionImpl::~InterfaceTypeDescriptionImpl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+InterfaceTypeDescriptionImpl::~InterfaceTypeDescriptionImpl() {}
 
 // XTypeDescription
 //__________________________________________________________________________________________________
diff --git a/stoc/source/registry_tdprovider/tdmodule.cxx b/stoc/source/registry_tdprovider/tdmodule.cxx
index 0413715..0cd6d29 100644
--- a/stoc/source/registry_tdprovider/tdmodule.cxx
+++ b/stoc/source/registry_tdprovider/tdmodule.cxx
@@ -30,8 +30,6 @@ namespace stoc_rdbtdp
 ModuleTypeDescriptionImpl::~ModuleTypeDescriptionImpl()
 {
     delete _pMembers;
-
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
 }
 
 // XTypeDescription
diff --git a/stoc/source/registry_tdprovider/tdprop.cxx b/stoc/source/registry_tdprovider/tdprop.cxx
index 8d3b9b2..9f7ff2f 100644
--- a/stoc/source/registry_tdprovider/tdprop.cxx
+++ b/stoc/source/registry_tdprovider/tdprop.cxx
@@ -25,10 +25,7 @@ namespace stoc_rdbtdp
 
 //__________________________________________________________________________________________________
 // virtual
-ConstantTypeDescriptionImpl::~ConstantTypeDescriptionImpl()
-{
-    g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
-}
+ConstantTypeDescriptionImpl::~ConstantTypeDescriptionImpl() {}
 
 // XTypeDescription
 //__________________________________________________________________________________________________
diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx
index b99eefc..a0a6ba6 100644
--- a/stoc/source/registry_tdprovider/tdprovider.cxx
+++ b/stoc/source/registry_tdprovider/tdprovider.cxx
@@ -51,8 +51,6 @@ using namespace com::sun::star;
 using namespace com::sun::star::beans;
 using namespace com::sun::star::registry;
 
-extern rtl_StandardModuleCount g_moduleCount;
-
 namespace stoc_bootstrap
 {
 uno::Sequence< OUString > rdbtdp_getSupportedServiceNames()
@@ -166,14 +164,9 @@ ProviderImpl::ProviderImpl( const com::sun::star::uno::Reference< XComponentCont
         XServiceInfo, XHierarchicalNameAccess,
         XTypeDescriptionEnumerationAccess, XInitialization >( _aComponentMutex )
     , _xContext( xContext )
-{
-    g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
-}
+{}

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list