[PATCH] remove unneeded component_canUnload functions
Matúš Kukan (via_Code_Review)
gerrit at gerrit.libreoffice.org
Wed Apr 10 12:36:38 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3313
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/13/3313/1
remove unneeded component_canUnload functions
Change-Id: Id3f41e2a620c47bb848718d0fc994739be2d64fc
---
M bridges/source/cpp_uno/shared/component.cxx
M bridges/source/jni_uno/jni_bridge.cxx
M cli_ure/source/uno_bridge/cli_bridge.cxx
M extensions/source/ole/servreg.cxx
M io/source/TextInputStream/TextInputStream.cxx
M io/source/TextOutputStream/TextOutputStream.cxx
M io/source/acceptor/acceptor.cxx
M io/source/connector/connector.cxx
M io/source/stm/factreg.cxx
M remotebridges/source/unourl_resolver/unourl_resolver.cxx
M sdext/source/presenter/PresenterComponent.cxx
M stoc/source/bootstrap/services.cxx
M stoc/source/corereflection/crefl.cxx
M stoc/source/invocation/invocation.cxx
M stoc/source/invocation_adapterfactory/iafactory.cxx
M stoc/source/javavm/javavm.cxx
M stoc/source/namingservice/namingservice.cxx
M stoc/source/proxy_factory/proxyfac.cxx
M stoc/source/stocservices/stocservices.cxx
19 files changed, 16 insertions(+), 211 deletions(-)
diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx
index 89422eb..7816470 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -187,15 +187,6 @@
&bridges::cpp_uno::shared::g_moduleCount.modCnt );
}
-#ifndef DISABLE_DYNLOADING
-
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload(TimeValue * pTime) SAL_THROW_EXTERN_C() {
- return bridges::cpp_uno::shared::g_moduleCount.canUnload(
- &bridges::cpp_uno::shared::g_moduleCount, pTime);
-}
-
-#endif
-
#ifdef DISABLE_DYNLOADING
#define uno_initEnvironment CPPU_ENV_uno_initEnvironment
#endif
diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx
index a8bef0c..3a77af5 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -553,17 +553,6 @@
}
}
-#ifndef DISABLE_DYNLOADING
-
-//------------------------------------------------------------------------------
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue * pTime )
- SAL_THROW_EXTERN_C()
-{
- return (*g_moduleCount.canUnload)( &g_moduleCount, pTime );
-}
-
-#endif
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cli_ure/source/uno_bridge/cli_bridge.cxx b/cli_ure/source/uno_bridge/cli_bridge.cxx
index 6195e2f..ea2d709 100644
--- a/cli_ure/source/uno_bridge/cli_bridge.cxx
+++ b/cli_ure/source/uno_bridge/cli_bridge.cxx
@@ -335,14 +335,6 @@
*ppMapping = mapping;
}
-
-//##################################################################################################
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue * )
- SAL_THROW_EXTERN_C()
-{
- return true;
-}
-
}
}
diff --git a/extensions/source/ole/servreg.cxx b/extensions/source/ole/servreg.cxx
index a9bc8c3..64b4dcf 100644
--- a/extensions/source/ole/servreg.cxx
+++ b/extensions/source/ole/servreg.cxx
@@ -112,10 +112,4 @@
return pRet;
}
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL
-oleautobridge_component_canUnload( TimeValue* libUnused)
-{
- return globalModuleCount.canUnload( &globalModuleCount, libUnused);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx
index 148896b..32b091f 100644
--- a/io/source/TextInputStream/TextInputStream.cxx
+++ b/io/source/TextInputStream/TextInputStream.cxx
@@ -484,20 +484,10 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-//==================================================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL textinstream_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL textinstream_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
}
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx
index 6716eb6..21f3596 100644
--- a/io/source/TextOutputStream/TextOutputStream.cxx
+++ b/io/source/TextOutputStream/TextOutputStream.cxx
@@ -283,20 +283,10 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-//==================================================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL textoutstream_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL textoutstream_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
}
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx
index a8bd18c..ca66e6e 100644
--- a/io/source/acceptor/acceptor.cxx
+++ b/io/source/acceptor/acceptor.cxx
@@ -326,22 +326,10 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-//==================================================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL acceptor_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL acceptor_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
}
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx
index 38c2aee..0d65717 100644
--- a/io/source/connector/connector.cxx
+++ b/io/source/connector/connector.cxx
@@ -233,22 +233,10 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-//==================================================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL connector_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL connector_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
}
-
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/io/source/stm/factreg.cxx b/io/source/stm/factreg.cxx
index ccd4eac..69f7e6d 100644
--- a/io/source/stm/factreg.cxx
+++ b/io/source/stm/factreg.cxx
@@ -85,21 +85,10 @@
};
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-//==================================================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL streams_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL streams_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index 7a6e453..637534d 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -188,19 +188,10 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL uuresolver_component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-//==================================================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL uuresolver_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL uuresolver_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
-}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sdext/source/presenter/PresenterComponent.cxx b/sdext/source/presenter/PresenterComponent.cxx
index f285d13..c66037e 100644
--- a/sdext/source/presenter/PresenterComponent.cxx
+++ b/sdext/source/presenter/PresenterComponent.cxx
@@ -49,19 +49,10 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL presenter_component_canUnload( TimeValue *pTime )
- {
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
- }
-
- SAL_DLLPUBLIC_EXPORT void * SAL_CALL presenter_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL presenter_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
- {
- return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , gServiceEntries);
- }
-
+{
+ return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , gServiceEntries);
}
} } // end of namespace sdext::presenter
diff --git a/stoc/source/bootstrap/services.cxx b/stoc/source/bootstrap/services.cxx
index 56bcd1c..1d234e4 100644
--- a/stoc/source/bootstrap/services.cxx
+++ b/stoc/source/bootstrap/services.cxx
@@ -106,27 +106,14 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-
-#ifndef DISABLE_DYNLOADING
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-#endif
-
#ifdef DISABLE_DYNLOADING
#define component_getFactory bootstrap_component_getFactory
#endif
-//==================================================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index edec388..2386757 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -451,10 +451,6 @@
}
-//##################################################################################################
-//##################################################################################################
-//##################################################################################################
-
using namespace stoc_corefl;
static struct ImplementationEntry g_entries[] =
@@ -467,24 +463,10 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-
-#ifndef DISABLE_DYNLOADING
-
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-#endif
-
-//==================================================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL reflection_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL reflection_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
-}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index dd34050..429b361 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -1197,21 +1197,10 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-//==================================================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL invocation_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL invocation_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
}
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index 92b04fb..b1b5904 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -954,22 +954,11 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload(
- TimeValue *pTime )
-{
- return ::stoc_invadp::g_moduleCount.canUnload(
- &::stoc_invadp::g_moduleCount, pTime );
-}
-
-//==============================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL invocadapt_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL invocadapt_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return ::cppu::component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey , g_entries );
-}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 584a8ae..78e67e9 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -577,8 +577,6 @@
aServiceImplementation);
}
-// There is no component_canUnload, as the library cannot be unloaded.
-
JavaVirtualMachine::JavaVirtualMachine(
css::uno::Reference< css::uno::XComponentContext > const & rContext):
JavaVirtualMachine_Impl(*static_cast< osl::Mutex * >(this)),
diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx
index cfbab25..3f666af 100644
--- a/stoc/source/namingservice/namingservice.cxx
+++ b/stoc/source/namingservice/namingservice.cxx
@@ -194,19 +194,10 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-//==================================================================================================
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL namingservice_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL namingservice_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
-}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx
index a788aa1..590e855 100644
--- a/stoc/source/proxy_factory/proxyfac.cxx
+++ b/stoc/source/proxy_factory/proxyfac.cxx
@@ -500,21 +500,11 @@
}
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue * pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount, pTime );
-}
-
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL proxyfac_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL proxyfac_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return ::cppu::component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, g_entries );
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/stoc/source/stocservices/stocservices.cxx b/stoc/source/stocservices/stocservices.cxx
index 0ec496e..81810a9 100644
--- a/stoc/source/stocservices/stocservices.cxx
+++ b/stoc/source/stocservices/stocservices.cxx
@@ -87,24 +87,10 @@
{ 0, 0, 0, 0, 0, 0 }
};
-extern "C"
-{
-
-#ifndef DISABLE_DYNLOADING
-
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
-{
- return g_moduleCount.canUnload( &g_moduleCount , pTime );
-}
-
-#endif
-
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL stocservices_component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL stocservices_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
--
To view, visit https://gerrit.libreoffice.org/3313
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3f41e2a620c47bb848718d0fc994739be2d64fc
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Matúš Kukan <matus.kukan at gmail.com>
More information about the LibreOffice
mailing list