summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ios/qa/sc/Makefile2
-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
-rw-r--r--ucbhelper/inc/ucbhelper/macros.hxx39
-rw-r--r--ucbhelper/source/client/contentbroker.cxx34
19 files changed, 93 insertions, 79 deletions
diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index e8f1901a3bec..dacdf0c0f1e2 100644
--- a/ios/qa/sc/Makefile
+++ b/ios/qa/sc/Makefile
@@ -30,7 +30,7 @@ SRCS = filters-test.m
CFLAGS = $(SOLARINC)
-LIBS = -Wl,$(OUTDIR)/bin/cppunit/cppunittester.a -Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a -Wl,$(OUTDIR)/lib/bootstrap.uno.a -Wl,$(OUTDIR)/lib/unoexceptionprotector.a $(SOLARLIB) -lavmedialo -lbasegfxlo -lcanvastoolslo -lcomphelpgcc3 -lcppcanvaslo -lcppunit -ldrawinglayerlo -leditenglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucbhelper4gcc3 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
+LIBS = -Wl,$(OUTDIR)/bin/cppunit/cppunittester.a -Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a -Wl,$(OUTDIR)/lib/bootstrap.uno.a -Wl,$(OUTDIR)/lib/unoexceptionprotector.a $(SOLARLIB) -lavmedialo -lbasegfxlo -lcanvastoolslo -lcomphelpgcc3 -lcppcanvaslo -lcppunit -ldrawinglayerlo -leditenglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucb1 -lucbhelper4gcc3 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
all: $(APPDIR)/$(APP) stuff
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 );
//=========================================================================
//
diff --git a/ucbhelper/inc/ucbhelper/macros.hxx b/ucbhelper/inc/ucbhelper/macros.hxx
index 302be2132f05..445de8a05e26 100644
--- a/ucbhelper/inc/ucbhelper/macros.hxx
+++ b/ucbhelper/inc/ucbhelper/macros.hxx
@@ -732,19 +732,40 @@ XSERVICEINFO_CREATE_INSTANCE_IMPL( Class ) \
com::sun::star::uno::Sequence< rtl::OUString > \
Class::getSupportedServiceNames_Static()
-// 1 service name
-#define XSERVICEINFO_IMPL_1( Class, ImplName, Service1 ) \
-XSERVICEINFO_COMMOM_IMPL( Class, ImplName ) \
-XSERVICEINFO_CREATE_INSTANCE_IMPL( Class ) \
+#ifdef DISABLE_DYNLOADING
+
+#define STATICALLY_LINKED_SERVICE( Class, ImplName, Service, Num ) \
+extern com::sun::star::uno::Reference< com::sun::star::lang::XSingleServiceFactory > service##Num( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > &rSMgr ) \
+ __asm("SSF:" Service); \
\
-com::sun::star::uno::Sequence< rtl::OUString > \
-Class::getSupportedServiceNames_Static() \
+com::sun::star::uno::Reference< com::sun::star::lang::XSingleServiceFactory > service##Num( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > &rSMgr ) \
{ \
- com::sun::star::uno::Sequence< rtl::OUString > aSNS( 1 ); \
- aSNS.getArray()[ 0 ] = Service1; \
- return aSNS; \
+ com::sun::star::uno::Reference< com::sun::star::lang::XSingleServiceFactory > xFactory( Class::createServiceFactory( rSMgr ) ); \
+ xFactory->acquire(); \
+ return xFactory; \
}
+#else
+
+#define STATICALLY_LINKED_SERVICE( Class, ImplName, Service, Num ) // empty
+
+#endif
+
+// 1 service name
+#define XSERVICEINFO_IMPL_1( Class, ImplName, Service1 ) \
+XSERVICEINFO_COMMOM_IMPL( Class, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ImplName )) ) \
+XSERVICEINFO_CREATE_INSTANCE_IMPL( Class ) \
+ \
+com::sun::star::uno::Sequence< rtl::OUString > \
+Class::getSupportedServiceNames_Static() \
+{ \
+ com::sun::star::uno::Sequence< rtl::OUString > aSNS( 1 ); \
+ aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( Service1 )); \
+ return aSNS; \
+} \
+ \
+STATICALLY_LINKED_SERVICE( Class, ImplName, Service1, 1 )
+
#endif /* !_UCBHELPER_MACROS_HXX */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/source/client/contentbroker.cxx b/ucbhelper/source/client/contentbroker.cxx
index eb18dc75edb6..0d865478bd8a 100644
--- a/ucbhelper/source/client/contentbroker.cxx
+++ b/ucbhelper/source/client/contentbroker.cxx
@@ -34,6 +34,7 @@
*************************************************************************/
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/ucb/XContentIdentifierFactory.hpp>
@@ -42,6 +43,30 @@
#include <com/sun/star/ucb/XCommandProcessor.hpp>
#include <ucbhelper/contentbroker.hxx>
+#ifdef DISABLE_DYNLOADING
+
+#define MSF_CREATEINSTANCE(Msf, Service) \
+({ \
+ extern com::sun::star::uno::Reference< com::sun::star::lang::XSingleServiceFactory > service( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > &rSMgr ) __asm("SSF:" Service); \
+ com::sun::star::uno::Reference< com::sun::star::lang::XSingleServiceFactory > xFactory( service( Msf ) ); \
+ xFactory->createInstance(); \
+})
+
+#define MSF_CREATEINSTANCE_WITHARGUMENTS(Msf, Service, Args) \
+({ \
+ extern com::sun::star::uno::Reference< com::sun::star::lang::XSingleServiceFactory > service( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > &rSMgr ) __asm("SSF:" Service); \
+ com::sun::star::uno::Reference< com::sun::star::lang::XSingleServiceFactory > xFactory( service( Msf ) ); \
+ xFactory->createInstanceWithArguments( Args ); \
+})
+
+#else
+
+#define MSF_CREATEINSTANCE(Msf, Service) Msf->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( Service )) )
+
+#define MSF_CREATEINSTANCE_WITHARGUMENTS(Msf, Service, Args) Msf->createInstanceWithArguments( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( Service )), Args )
+
+#endif
+
using namespace com::sun::star::lang;
using namespace com::sun::star::ucb;
using namespace com::sun::star::uno;
@@ -248,9 +273,7 @@ bool ContentBroker_Impl::initialize()
{
try
{
- xIfc = m_xSMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.ucb.UniversalContentBroker" )) );
+ xIfc = MSF_CREATEINSTANCE( m_xSMgr, "com.sun.star.ucb.UniversalContentBroker" );
}
catch ( Exception const & )
{
@@ -282,10 +305,7 @@ bool ContentBroker_Impl::initialize()
{
try
{
- xIfc = m_xSMgr->createInstanceWithArguments(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.ucb.UniversalContentBroker" )),
- m_aArguments );
+ xIfc = MSF_CREATEINSTANCE_WITHARGUMENTS( m_xSMgr, "com.sun.star.ucb.UniversalContentBroker", m_aArguments );
}
catch ( Exception const & )
{