summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-03-20 23:18:55 +0200
committerTor Lillqvist <tml@iki.fi>2012-03-21 00:00:11 +0200
commit25d114eec4d451acdda1ddff4c8ed9d47ba6275f (patch)
treeca69e10288f4d1752ba91bc2b5dc457c8d5633ee /ucb
parent9423429a70ecadb09108a0c90db90db68e49c6f6 (diff)
Initial experiments with static linking of (some) components / services
Start with the first service needed when running sc's filters_test: the UniversalContentBroker. It might not be typical as ucb uses the deprecated XSingleServiceFactory. This commit is not at all a complete solution, far from it, just an initial hack. Naturally once I come up with some generic enough way to do the static linking the necessary macros etc will be added to some general header. The macro XSERVICEINFO_IMPL_1 (local to ucbhelper and ucb) is amended so that it in the disable-dynamic-linking case also emits a function whose assembler name equal contains the service name. This function returns the XSingleServiceFactory for the service. Where the service is instantiated we link directly to that function. But probably this will be reworked a couple of times... Maybe it would be better to simply have the service name specific entry point be a pointer to the component's component_getFactory() function? Those all have the same prototype.
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx6
-rw-r--r--ucb/source/cacher/cachedcontentresultsetstub.cxx6
-rw-r--r--ucb/source/cacher/cacheddynamicresultset.cxx6
-rw-r--r--ucb/source/cacher/cacheddynamicresultsetstub.cxx6
-rw-r--r--ucb/source/core/provprox.cxx6
-rw-r--r--ucb/source/core/ucb.cxx6
-rw-r--r--ucb/source/core/ucbprops.cxx6
-rw-r--r--ucb/source/core/ucbstore.cxx6
-rw-r--r--ucb/source/sorter/sortdynres.cxx6
-rw-r--r--ucb/source/ucp/cmis/cmis_provider.cxx6
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx9
-rw-r--r--ucb/source/ucp/ftp/ftpcontentprovider.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchyprovider.cxx6
-rw-r--r--ucb/source/ucp/package/pkgprovider.cxx6
-rw-r--r--ucb/source/ucp/tdoc/tdoc_provider.cxx6
-rw-r--r--ucb/source/ucp/webdav/webdavprovider.cxx6
16 files changed, 35 insertions, 62 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 4c66b382dbe0..8c8654aa0c59 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -2200,10 +2200,8 @@ XTYPEPROVIDER_IMPL_3( CachedContentResultSetFactory,
//--------------------------------------------------------------------------
XSERVICEINFO_IMPL_1( CachedContentResultSetFactory,
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.CachedContentResultSetFactory" )),
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- CACHED_CONTENT_RESULTSET_FACTORY_NAME )) );
+ "com.sun.star.comp.ucb.CachedContentResultSetFactory",
+ CACHED_CONTENT_RESULTSET_FACTORY_NAME );
//--------------------------------------------------------------------------
// Service factory implementation.
diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx
index b32a8b6b11ef..0ccca050baf6 100644
--- a/ucb/source/cacher/cachedcontentresultsetstub.cxx
+++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx
@@ -531,10 +531,8 @@ XTYPEPROVIDER_IMPL_3( CachedContentResultSetStubFactory,
//--------------------------------------------------------------------------
XSERVICEINFO_IMPL_1( CachedContentResultSetStubFactory,
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.CachedContentResultSetStubFactory" )),
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- CACHED_CRS_STUB_FACTORY_NAME )) );
+ "com.sun.star.comp.ucb.CachedContentResultSetStubFactory",
+ CACHED_CRS_STUB_FACTORY_NAME );
//--------------------------------------------------------------------------
// Service factory implementation.
diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx
index 506c96f2e6dc..7bc23a76fbe2 100644
--- a/ucb/source/cacher/cacheddynamicresultset.cxx
+++ b/ucb/source/cacher/cacheddynamicresultset.cxx
@@ -176,10 +176,8 @@ XTYPEPROVIDER_IMPL_3( CachedDynamicResultSetFactory,
//--------------------------------------------------------------------------
XSERVICEINFO_IMPL_1( CachedDynamicResultSetFactory,
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.CachedDynamicResultSetFactory" )),
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- CACHED_DRS_FACTORY_NAME )) );
+ "com.sun.star.comp.ucb.CachedDynamicResultSetFactory",
+ CACHED_DRS_FACTORY_NAME );
//--------------------------------------------------------------------------
// Service factory implementation.
diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx
index 4bc18400f98c..4dc9469c5199 100644
--- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx
+++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx
@@ -166,10 +166,8 @@ XTYPEPROVIDER_IMPL_3( CachedDynamicResultSetStubFactory,
//--------------------------------------------------------------------------
XSERVICEINFO_IMPL_1( CachedDynamicResultSetStubFactory,
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.CachedDynamicResultSetStubFactory" )),
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- CACHED_DRS_STUB_FACTORY_NAME )) );
+ "com.sun.star.comp.ucb.CachedDynamicResultSetStubFactory",
+ CACHED_DRS_STUB_FACTORY_NAME );
//--------------------------------------------------------------------------
// Service factory implementation.
diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx
index c73fe311e54b..1ba4384354fe 100644
--- a/ucb/source/core/provprox.cxx
+++ b/ucb/source/core/provprox.cxx
@@ -87,10 +87,8 @@ XTYPEPROVIDER_IMPL_3( UcbContentProviderProxyFactory,
//=========================================================================
XSERVICEINFO_IMPL_1( UcbContentProviderProxyFactory,
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.UcbContentProviderProxyFactory" )),
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- PROVIDER_FACTORY_SERVICE_NAME )) );
+ "com.sun.star.comp.ucb.UcbContentProviderProxyFactory",
+ PROVIDER_FACTORY_SERVICE_NAME );
//=========================================================================
//
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index cbe7b2ba7669..e65322c660b7 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -347,10 +347,8 @@ void SAL_CALL UniversalContentBroker::removeEventListener(
//=========================================================================
XSERVICEINFO_IMPL_1( UniversalContentBroker,
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.UniversalContentBroker" )),
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- UCB_SERVICE_NAME )) );
+ "com.sun.star.comp.ucb.UniversalContentBroker",
+ UCB_SERVICE_NAME );
//=========================================================================
//
diff --git a/ucb/source/core/ucbprops.cxx b/ucb/source/core/ucbprops.cxx
index c778bf91b88a..0f4125974001 100644
--- a/ucb/source/core/ucbprops.cxx
+++ b/ucb/source/core/ucbprops.cxx
@@ -357,10 +357,8 @@ XTYPEPROVIDER_IMPL_3( UcbPropertiesManager,
//=========================================================================
XSERVICEINFO_IMPL_1( UcbPropertiesManager,
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.UcbPropertiesManager" )),
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- PROPERTIES_MANAGER_SERVICE_NAME )) );
+ "com.sun.star.comp.ucb.UcbPropertiesManager",
+ PROPERTIES_MANAGER_SERVICE_NAME );
//=========================================================================
//
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 38b498095507..5b7e26095822 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -244,10 +244,8 @@ XTYPEPROVIDER_IMPL_4( UcbStore,
//=========================================================================
XSERVICEINFO_IMPL_1( UcbStore,
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.UcbStore" )),
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- STORE_SERVICE_NAME )) );
+ "com.sun.star.comp.ucb.UcbStore",
+ STORE_SERVICE_NAME );
//=========================================================================
//
diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index 1b6c57dea78e..3620688ae16f 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -511,10 +511,8 @@ XTYPEPROVIDER_IMPL_3( SortedDynamicResultSetFactory,
//--------------------------------------------------------------------------
XSERVICEINFO_IMPL_1( SortedDynamicResultSetFactory,
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.SortedDynamicResultSetFactory" )),
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- DYNAMIC_RESULTSET_FACTORY_NAME )) );
+ "com.sun.star.comp.ucb.SortedDynamicResultSetFactory",
+ DYNAMIC_RESULTSET_FACTORY_NAME );
//--------------------------------------------------------------------------
// Service factory implementation.
diff --git a/ucb/source/ucp/cmis/cmis_provider.cxx b/ucb/source/ucp/cmis/cmis_provider.cxx
index f733cf0ea22a..0e68e0473a79 100644
--- a/ucb/source/ucp/cmis/cmis_provider.cxx
+++ b/ucb/source/ucp/cmis/cmis_provider.cxx
@@ -94,10 +94,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider,
com::sun::star::ucb::XContentProvider );
XSERVICEINFO_IMPL_1( ContentProvider,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.CmisContentProvider" )),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.ucb.CmisContentProvider" )) );
+ "com.sun.star.comp.CmisContentProvider",
+ "com.sun.star.ucb.CmisContentProvider" );
ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider );
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 02da7ac7b859..67f118facc83 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -174,11 +174,12 @@ XTYPEPROVIDER_IMPL_6( FTPContent,
#undef XSERVICEINFO_CREATE_INSTANCE_IMPL
#define XSERVICEINFO_CREATE_INSTANCE_IMPL( Class )
+#undef STATICALLY_LINKED_SERVICE
+#define STATICALLY_LINKED_SERVICE( Class, ImplName, Service, Num )
+
XSERVICEINFO_IMPL_1( FTPContent,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.FTPContent")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.ucb.FTPContent")));
+ "com.sun.star.comp.FTPContent",
+ "com.sun.star.ucb.FTPContent" );
diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
index 427527937a52..5b50a41bfd7a 100644
--- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx
+++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
@@ -103,8 +103,8 @@ XTYPEPROVIDER_IMPL_3(FTPContentProvider,
XSERVICEINFO_IMPL_1(
FTPContentProvider,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.FTPContentProvider")),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(FTP_CONTENT_PROVIDER_SERVICE_NAME)));
+ "com.sun.star.comp.FTPContentProvider",
+ FTP_CONTENT_PROVIDER_SERVICE_NAME);
//=========================================================================
//
diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
index c5bf7c585968..f3a339e1e6f3 100644
--- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
@@ -100,10 +100,8 @@ XTYPEPROVIDER_IMPL_4( HierarchyContentProvider,
//=========================================================================
XSERVICEINFO_IMPL_1( HierarchyContentProvider,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.HierarchyContentProvider" )),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- HIERARCHY_CONTENT_PROVIDER_SERVICE_NAME )) );
+ "com.sun.star.comp.ucb.HierarchyContentProvider",
+ HIERARCHY_CONTENT_PROVIDER_SERVICE_NAME );
//=========================================================================
//
diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx
index fbaa9fdddb52..d9b6efde5523 100644
--- a/ucb/source/ucp/package/pkgprovider.cxx
+++ b/ucb/source/ucp/package/pkgprovider.cxx
@@ -181,10 +181,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider,
//=========================================================================
XSERVICEINFO_IMPL_1( ContentProvider,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.PackageContentProvider" )),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- PACKAGE_CONTENT_PROVIDER_SERVICE_NAME )) );
+ "com.sun.star.comp.ucb.PackageContentProvider",
+ PACKAGE_CONTENT_PROVIDER_SERVICE_NAME );
//=========================================================================
//
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx
index be5a4f1920fb..fafea334e33b 100644
--- a/ucb/source/ucp/tdoc/tdoc_provider.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx
@@ -105,10 +105,8 @@ XTYPEPROVIDER_IMPL_4( ContentProvider,
XSERVICEINFO_IMPL_1(
ContentProvider,
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.ucb.TransientDocumentsContentProvider" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- TDOC_CONTENT_PROVIDER_SERVICE_NAME ) ) );
+ "com.sun.star.comp.ucb.TransientDocumentsContentProvider",
+ TDOC_CONTENT_PROVIDER_SERVICE_NAME );
//=========================================================================
//
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index ba24d632c276..8dbca76ebb87 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -93,10 +93,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider,
//=========================================================================
XSERVICEINFO_IMPL_1( ContentProvider,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.WebDAVContentProvider" )),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- WEBDAV_CONTENT_PROVIDER_SERVICE_NAME )) );
+ "com.sun.star.comp.WebDAVContentProvider",
+ WEBDAV_CONTENT_PROVIDER_SERVICE_NAME );
//=========================================================================
//