summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-09-27 12:03:17 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-09-27 12:03:17 +0000
commit5115c854b25a750f3e3bb2e461615b94b37c2681 (patch)
tree603c12ff9337adc99d2b08d6472c02cfb000f6a1 /stoc
parent1312180f1375a164b814750e2439ec672b3ffdae (diff)
INTEGRATION: CWS sb76 (1.14.46); FILE MERGED
2007/08/31 11:01:55 sb 1.14.46.1: #i77885# Consolidate stoc libraries; patch by jnavrati.
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/simpleregistry/simpleregistry.cxx66
1 files changed, 15 insertions, 51 deletions
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx
index 755d6b87a..6a6e62275 100644
--- a/stoc/source/simpleregistry/simpleregistry.cxx
+++ b/stoc/source/simpleregistry/simpleregistry.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: simpleregistry.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: obo $ $Date: 2006-09-16 17:36:54 $
+ * last change: $Author: hr $ $Date: 2007-09-27 13:03:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -87,11 +87,11 @@ using namespace rtl;
#define SERVICENAME "com.sun.star.registry.SimpleRegistry"
#define IMPLNAME "com.sun.star.comp.stoc.SimpleRegistry"
-namespace stoc_simreg {
-
-rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
+extern rtl_StandardModuleCount g_moduleCount;
-static Sequence< OUString > simreg_getSupportedServiceNames()
+namespace stoc_bootstrap
+{
+Sequence< OUString > simreg_getSupportedServiceNames()
{
static Sequence < OUString > *pNames = 0;
if( ! pNames )
@@ -121,7 +121,10 @@ OUString simreg_getImplementationName()
}
return *pImplName;
}
+}
+namespace stoc_simreg {
+
//*************************************************************************
// class RegistryKeyImpl the implenetation of interface XRegistryKey
//*************************************************************************
@@ -1111,7 +1114,7 @@ SimpleRegistryImpl::~SimpleRegistryImpl()
OUString SAL_CALL SimpleRegistryImpl::getImplementationName( )
throw(RuntimeException)
{
- return simreg_getImplementationName();
+ return stoc_bootstrap::simreg_getImplementationName();
}
//*************************************************************************
@@ -1131,7 +1134,7 @@ sal_Bool SAL_CALL SimpleRegistryImpl::supportsService( const OUString& ServiceNa
Sequence<OUString> SAL_CALL SimpleRegistryImpl::getSupportedServiceNames( )
throw(RuntimeException)
{
- return simreg_getSupportedServiceNames();
+ return stoc_bootstrap::simreg_getSupportedServiceNames();
}
//*************************************************************************
@@ -1308,7 +1311,10 @@ void SAL_CALL SimpleRegistryImpl::mergeKey( const OUString& aKeyName, const OUSt
OUString( RTL_CONSTASCII_USTRINGPARAM("InvalidRegistryException") ),
(OWeakObject *)this );
}
+}
+namespace stoc_bootstrap
+{
//*************************************************************************
Reference<XInterface> SAL_CALL SimpleRegistry_CreateInstance( const Reference<XComponentContext>& )
{
@@ -1319,7 +1325,7 @@ Reference<XInterface> SAL_CALL SimpleRegistry_CreateInstance( const Reference<XC
{
Registry reg(aLoader);
- XSimpleRegistry *pRegistry = (XSimpleRegistry*) new SimpleRegistryImpl(reg);
+ XSimpleRegistry *pRegistry = (XSimpleRegistry*) new stoc_simreg::SimpleRegistryImpl(reg);
if (pRegistry)
{
@@ -1329,47 +1335,5 @@ Reference<XInterface> SAL_CALL SimpleRegistry_CreateInstance( const Reference<XC
return xRet;
}
-
-}
-
-using namespace stoc_simreg;
-static struct ImplementationEntry g_entries[] =
-{
- {
- SimpleRegistry_CreateInstance, simreg_getImplementationName,
- simreg_getSupportedServiceNames, createSingleComponentFactory,
- &g_moduleCount.modCnt , 0
- },
- { 0, 0, 0, 0, 0, 0 }
-};
-
-extern "C"
-{
-
-sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-//==================================================================================================
-void SAL_CALL component_getImplementationEnvironment(
- const sal_Char ** ppEnvTypeName, uno_Environment ** )
-{
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
-}
-//==================================================================================================
-void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
-{
- return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
}
-}
-
-