summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-11-08 08:16:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-11-30 13:59:47 +0100
commit2cf0f6ea36e1525193544258eef2828a54345510 (patch)
treeb1033cc7f7ef1061bc16baa8a52480ced38e8b55 /ucb
parent48f2b7a7af3d4e9bf1b3c27e9aa5e12e60878051 (diff)
fdo#46808, use service constructor for ucb::CachedDynamicResultSetStubFactory
Change-Id: Iea7b21621c5d341468976507684a9c01f0822034
Diffstat (limited to 'ucb')
-rw-r--r--ucb/Library_cached1.mk1
-rw-r--r--ucb/Library_srtrs1.mk1
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx14
-rw-r--r--ucb/source/cacher/cachedcontentresultset.hxx12
-rw-r--r--ucb/source/cacher/cacheddynamicresultset.cxx7
-rw-r--r--ucb/source/cacher/cacheddynamicresultsetstub.cxx18
-rw-r--r--ucb/source/cacher/cacheddynamicresultsetstub.hxx6
-rw-r--r--ucb/source/cacher/dynamicresultsetwrapper.cxx14
-rw-r--r--ucb/source/cacher/dynamicresultsetwrapper.hxx6
-rw-r--r--ucb/source/sorter/sortdynres.cxx21
-rw-r--r--ucb/source/sorter/sortdynres.hxx12
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx2
-rw-r--r--ucb/source/ucp/cmis/cmis_repo_content.cxx2
-rw-r--r--ucb/source/ucp/cmis/cmis_resultset.cxx7
-rw-r--r--ucb/source/ucp/cmis/cmis_resultset.hxx2
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx2
-rw-r--r--ucb/source/ucp/ext/ucpext_resultset.cxx9
-rw-r--r--ucb/source/ucp/ext/ucpext_resultset.hxx2
-rw-r--r--ucb/source/ucp/file/filrset.cxx13
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx3
-rw-r--r--ucb/source/ucp/ftp/ftpdynresultset.cxx4
-rw-r--r--ucb/source/ucp/ftp/ftpdynresultset.hxx2
-rw-r--r--ucb/source/ucp/gio/gio_content.cxx3
-rw-r--r--ucb/source/ucp/gio/gio_resultset.cxx8
-rw-r--r--ucb/source/ucp/gio/gio_resultset.hxx2
-rw-r--r--ucb/source/ucp/gvfs/gvfs_content.cxx2
-rw-r--r--ucb/source/ucp/gvfs/gvfs_directory.cxx6
-rw-r--r--ucb/source/ucp/gvfs/gvfs_directory.hxx2
-rw-r--r--ucb/source/ucp/hierarchy/dynamicresultset.cxx12
-rw-r--r--ucb/source/ucp/hierarchy/dynamicresultset.hxx2
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx3
-rw-r--r--ucb/source/ucp/odma/odma_content.cxx2
-rw-r--r--ucb/source/ucp/odma/odma_resultset.cxx8
-rw-r--r--ucb/source/ucp/odma/odma_resultset.hxx2
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx3
-rw-r--r--ucb/source/ucp/package/pkgresultset.cxx12
-rw-r--r--ucb/source/ucp/package/pkgresultset.hxx2
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx3
-rw-r--r--ucb/source/ucp/tdoc/tdoc_resultset.cxx12
-rw-r--r--ucb/source/ucp/tdoc/tdoc_resultset.hxx2
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/webdavresultset.cxx12
-rw-r--r--ucb/source/ucp/webdav-neon/webdavresultset.hxx2
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx3
-rw-r--r--ucb/source/ucp/webdav/webdavresultset.cxx4
-rw-r--r--ucb/source/ucp/webdav/webdavresultset.hxx2
46 files changed, 134 insertions, 137 deletions
diff --git a/ucb/Library_cached1.mk b/ucb/Library_cached1.mk
index 1d9ca407cfc4..fbf9e42ae7f1 100644
--- a/ucb/Library_cached1.mk
+++ b/ucb/Library_cached1.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_Library_use_libraries,cached1,\
cppu \
cppuhelper \
sal \
+ ucbhelper \
$(gb_UWINAPI) \
))
diff --git a/ucb/Library_srtrs1.mk b/ucb/Library_srtrs1.mk
index af713aa008dd..5dfb160ba03b 100644
--- a/ucb/Library_srtrs1.mk
+++ b/ucb/Library_srtrs1.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_Library_use_libraries,srtrs1,\
cppu \
cppuhelper \
sal \
+ ucbhelper \
$(gb_UWINAPI) \
))
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 5f04be9eae1e..e8adb8b2b98c 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -647,13 +647,13 @@ sal_Int32 SAL_CALL CCRS_PropertySetInfo
//--------------------------------------------------------------------------
CachedContentResultSet::CachedContentResultSet(
- const Reference< XMultiServiceFactory > & xSMgr
+ const Reference< XComponentContext > & rxContext
, const Reference< XResultSet > & xOrigin
, const Reference< XContentIdentifierMapping > &
xContentIdentifierMapping )
: ContentResultSetWrapper( xOrigin )
- , m_xSMgr( xSMgr )
+ , m_xContext( rxContext )
, m_xFetchProvider( NULL )
, m_xFetchProviderForContentAccess( NULL )
@@ -2140,7 +2140,7 @@ const Reference< XTypeConverter >& CachedContentResultSet::getTypeConverter()
if ( !m_bTriedToGetTypeConverter && !m_xTypeConverter.is() )
{
m_bTriedToGetTypeConverter = sal_True;
- m_xTypeConverter = Reference< XTypeConverter >( Converter::create(comphelper::getComponentContext(m_xSMgr)) );
+ m_xTypeConverter = Reference< XTypeConverter >( Converter::create(m_xContext) );
OSL_ENSURE( m_xTypeConverter.is(),
"PropertyValueSet::getTypeConverter() - "
@@ -2156,9 +2156,9 @@ const Reference< XTypeConverter >& CachedContentResultSet::getTypeConverter()
//--------------------------------------------------------------------------
CachedContentResultSetFactory::CachedContentResultSetFactory(
- const Reference< XMultiServiceFactory > & rSMgr )
+ const Reference< XComponentContext > & rxContext )
{
- m_xSMgr = rSMgr;
+ m_xContext = rxContext;
}
CachedContentResultSetFactory::~CachedContentResultSetFactory()
@@ -2187,7 +2187,7 @@ XTYPEPROVIDER_IMPL_3( CachedContentResultSetFactory,
// CachedContentResultSetFactory XServiceInfo methods.
//--------------------------------------------------------------------------
-XSERVICEINFO_IMPL_1( CachedContentResultSetFactory,
+XSERVICEINFO_IMPL_1_CTX( CachedContentResultSetFactory,
OUString( "com.sun.star.comp.ucb.CachedContentResultSetFactory" ),
OUString( CACHED_CONTENT_RESULTSET_FACTORY_NAME ) );
@@ -2209,7 +2209,7 @@ Reference< XResultSet > SAL_CALL CachedContentResultSetFactory
throw( com::sun::star::uno::RuntimeException )
{
Reference< XResultSet > xRet;
- xRet = new CachedContentResultSet( m_xSMgr, xSource, xMapping );
+ xRet = new CachedContentResultSet( m_xContext, xSource, xMapping );
return xRet;
}
diff --git a/ucb/source/cacher/cachedcontentresultset.hxx b/ucb/source/cacher/cachedcontentresultset.hxx
index 01925d6df0f6..1f15bc5017a7 100644
--- a/ucb/source/cacher/cachedcontentresultset.hxx
+++ b/ucb/source/cacher/cachedcontentresultset.hxx
@@ -113,8 +113,8 @@ class CachedContentResultSet
//-----------------------------------------------------------------
//members
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
- m_xSMgr;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+ m_xContext;
//different Interfaces from Origin:
com::sun::star::uno::Reference< com::sun::star::ucb::XFetchProvider >
@@ -188,8 +188,8 @@ private:
public:
CachedContentResultSet(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > &
- xSMgr,
+ com::sun::star::uno::XComponentContext > &
+ rxContext,
const com::sun::star::uno::Reference<
com::sun::star::sdbc::XResultSet > & xOrigin,
const com::sun::star::uno::Reference<
@@ -474,13 +474,13 @@ class CachedContentResultSetFactory
{
protected:
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ com::sun::star::uno::XComponentContext > m_xContext;
public:
CachedContentResultSetFactory(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > & rSMgr);
+ com::sun::star::uno::XComponentContext > & rxContext);
virtual ~CachedContentResultSetFactory();
diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx
index f6594f817755..fef33a44e682 100644
--- a/ucb/source/cacher/cacheddynamicresultset.cxx
+++ b/ucb/source/cacher/cacheddynamicresultset.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/sdbc/XResultSet.hpp>
#include <cachedcontentresultset.hxx>
#include <osl/diagnose.h>
+#include <comphelper/processfactory.hxx>
using namespace com::sun::star::lang;
using namespace com::sun::star::sdbc;
@@ -34,7 +35,7 @@ CachedDynamicResultSet::CachedDynamicResultSet(
Reference< XDynamicResultSet > xOrigin
, const Reference< XContentIdentifierMapping > & xContentMapping
, const Reference< XMultiServiceFactory > & xSMgr )
- : DynamicResultSetWrapper( xOrigin, xSMgr )
+ : DynamicResultSetWrapper( xOrigin, comphelper::getComponentContext(xSMgr) )
, m_xContentIdentifierMapping( xContentMapping )
{
impl_init();
@@ -53,7 +54,7 @@ void SAL_CALL CachedDynamicResultSet
OSL_ENSURE( m_xSourceResultOne.is(), "need source resultset" );
Reference< XResultSet > xCache(
- new CachedContentResultSet( m_xSMgr, m_xSourceResultOne, m_xContentIdentifierMapping ) );
+ new CachedContentResultSet( m_xContext, m_xSourceResultOne, m_xContentIdentifierMapping ) );
osl::Guard< osl::Mutex > aGuard( m_aMutex );
m_xMyResultOne = xCache;
@@ -67,7 +68,7 @@ void SAL_CALL CachedDynamicResultSet
OSL_ENSURE( m_xSourceResultTwo.is(), "need source resultset" );
Reference< XResultSet > xCache(
- new CachedContentResultSet( m_xSMgr, m_xSourceResultTwo, m_xContentIdentifierMapping ) );
+ new CachedContentResultSet( m_xContext, m_xSourceResultTwo, m_xContentIdentifierMapping ) );
osl::Guard< osl::Mutex > aGuard( m_aMutex );
m_xMyResultTwo = xCache;
diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx
index 9f83f3b144a5..4581c6838a98 100644
--- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx
+++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx
@@ -35,10 +35,10 @@ using ::rtl::OUString;
CachedDynamicResultSetStub::CachedDynamicResultSetStub(
Reference< XDynamicResultSet > xOrigin
- , const Reference< XMultiServiceFactory > & xSMgr )
- : DynamicResultSetWrapper( xOrigin, xSMgr )
+ , const Reference< XComponentContext > & rxContext )
+ : DynamicResultSetWrapper( xOrigin, rxContext )
{
- OSL_ENSURE( m_xSMgr.is(), "need Multiservicefactory to create stub" );
+ OSL_ENSURE( m_xContext.is(), "need Multiservicefactory to create stub" );
impl_init();
}
@@ -124,9 +124,9 @@ XSERVICEINFO_NOFACTORY_IMPL_1( CachedDynamicResultSetStub,
//--------------------------------------------------------------------------
CachedDynamicResultSetStubFactory::CachedDynamicResultSetStubFactory(
- const Reference< XMultiServiceFactory > & rSMgr )
+ const Reference< XComponentContext > & rxContext )
{
- m_xSMgr = rSMgr;
+ m_xContext = rxContext;
}
CachedDynamicResultSetStubFactory::~CachedDynamicResultSetStubFactory()
@@ -155,7 +155,7 @@ XTYPEPROVIDER_IMPL_3( CachedDynamicResultSetStubFactory,
// CachedDynamicResultSetStubFactory XServiceInfo methods.
//--------------------------------------------------------------------------
-XSERVICEINFO_IMPL_1( CachedDynamicResultSetStubFactory,
+XSERVICEINFO_IMPL_1_CTX( CachedDynamicResultSetStubFactory,
OUString( "com.sun.star.comp.ucb.CachedDynamicResultSetStubFactory" ),
OUString( CACHED_DRS_STUB_FACTORY_NAME ) );
@@ -176,7 +176,7 @@ Reference< XDynamicResultSet > SAL_CALL CachedDynamicResultSetStubFactory
throw( RuntimeException )
{
Reference< XDynamicResultSet > xRet;
- xRet = new CachedDynamicResultSetStub( Source, m_xSMgr );
+ xRet = new CachedDynamicResultSetStub( Source, m_xContext );
return xRet;
}
@@ -203,7 +203,7 @@ void SAL_CALL CachedDynamicResultSetStubFactory
Reference< XSortedDynamicResultSetFactory > xSortFactory;
try
{
- xSortFactory = SortedDynamicResultSetFactory::create( comphelper::getComponentContext(m_xSMgr) );
+ xSortFactory = SortedDynamicResultSetFactory::create( m_xContext );
}
catch ( Exception const & )
{
@@ -220,7 +220,7 @@ void SAL_CALL CachedDynamicResultSetStubFactory
}
Reference< XDynamicResultSet > xStub(
- new CachedDynamicResultSetStub( xSource, m_xSMgr ) );
+ new CachedDynamicResultSetStub( xSource, m_xContext ) );
Reference< XSourceInitialization > xTarget( TargetCache, UNO_QUERY );
OSL_ENSURE( xTarget.is(), "Target must have interface XSourceInitialization" );
diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.hxx b/ucb/source/cacher/cacheddynamicresultsetstub.hxx
index f46d734db183..a65d836662bf 100644
--- a/ucb/source/cacher/cacheddynamicresultsetstub.hxx
+++ b/ucb/source/cacher/cacheddynamicresultsetstub.hxx
@@ -45,7 +45,7 @@ public:
CachedDynamicResultSetStub( com::sun::star::uno::Reference<
com::sun::star::ucb::XDynamicResultSet > xOrigin
, const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > & xSMgr );
+ com::sun::star::uno::XComponentContext > & rxContext );
virtual ~CachedDynamicResultSetStub();
@@ -74,13 +74,13 @@ class CachedDynamicResultSetStubFactory
{
protected:
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ com::sun::star::uno::XComponentContext > m_xContext;
public:
CachedDynamicResultSetStubFactory(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > & rSMgr);
+ com::sun::star::uno::XComponentContext > & rxContext);
virtual ~CachedDynamicResultSetStubFactory();
diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx
index 5c098b3417a5..30a2b1f8ff79 100644
--- a/ucb/source/cacher/dynamicresultsetwrapper.cxx
+++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx
@@ -24,7 +24,7 @@
#include <rtl/ustring.hxx>
#include <com/sun/star/ucb/ListActionType.hpp>
#include <com/sun/star/ucb/WelcomeDynamicResultSetStruct.hpp>
-#include <com/sun/star/ucb/XCachedDynamicResultSetStubFactory.hpp>
+#include <com/sun/star/ucb/CachedDynamicResultSetStubFactory.hpp>
using namespace com::sun::star::lang;
using namespace com::sun::star::sdbc;
@@ -42,12 +42,12 @@ using ::rtl::OUString;
DynamicResultSetWrapper::DynamicResultSetWrapper(
Reference< XDynamicResultSet > xOrigin
- , const Reference< XMultiServiceFactory > & xSMgr )
+ , const Reference< XComponentContext > & rxContext )
: m_bDisposed( sal_False )
, m_bInDispose( sal_False )
, m_pDisposeEventListeners( NULL )
- , m_xSMgr( xSMgr )
+ , m_xContext( rxContext )
, m_bStatic( sal_False )
, m_bGotWelcome( sal_False )
, m_xSource( xOrigin )
@@ -409,18 +409,14 @@ void SAL_CALL DynamicResultSetWrapper
Reference< XSourceInitialization > xTarget( xCache, UNO_QUERY );
OSL_ENSURE( xTarget.is(), "The given Target dosn't have the required interface 'XSourceInitialization'" );
- if( xTarget.is() && m_xSMgr.is() )
+ if( xTarget.is() && m_xContext.is() )
{
//@todo m_aSourceSet.wait();?
Reference< XCachedDynamicResultSetStubFactory > xStubFactory;
try
{
- xStubFactory = Reference< XCachedDynamicResultSetStubFactory >(
- m_xSMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.ucb.CachedDynamicResultSetStubFactory" )) ),
- UNO_QUERY );
+ xStubFactory = CachedDynamicResultSetStubFactory::create( m_xContext );
}
catch ( Exception const & )
{
diff --git a/ucb/source/cacher/dynamicresultsetwrapper.hxx b/ucb/source/cacher/dynamicresultsetwrapper.hxx
index ae12dfe241e4..8c7c6e616954 100644
--- a/ucb/source/cacher/dynamicresultsetwrapper.hxx
+++ b/ucb/source/cacher/dynamicresultsetwrapper.hxx
@@ -57,8 +57,8 @@ protected:
DynamicResultSetWrapperListener*
m_pMyListenerImpl;
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
- m_xSMgr;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+ m_xContext;
osl::Mutex m_aMutex;
sal_Bool m_bStatic;
@@ -107,7 +107,7 @@ public:
com::sun::star::uno::Reference<
com::sun::star::ucb::XDynamicResultSet > xOrigin
, const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > & xSMgr );
+ com::sun::star::uno::XComponentContext > & rxContext );
virtual ~DynamicResultSetWrapper();
diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index e66e323b3d40..4f98f045728e 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -24,7 +24,7 @@
#include <com/sun/star/ucb/ContentResultSetCapability.hpp>
#include <com/sun/star/ucb/ListActionType.hpp>
#include <com/sun/star/ucb/WelcomeDynamicResultSetStruct.hpp>
-#include <com/sun/star/ucb/XCachedDynamicResultSetStubFactory.hpp>
+#include <com/sun/star/ucb/CachedDynamicResultSetStubFactory.hpp>
#include <com/sun/star/ucb/XSourceInitialization.hpp>
//-----------------------------------------------------------------------------
@@ -66,7 +66,7 @@ SortedDynamicResultSet::SortedDynamicResultSet(
const Reference < XDynamicResultSet > &xOriginal,
const Sequence < NumberedSortingInfo > &aOptions,
const Reference < XAnyCompareFactory > &xCompFac,
- const Reference < XMultiServiceFactory > &xSMgr )
+ const Reference < XComponentContext > &rxContext )
{
mpDisposeEventListeners = NULL;
mpOwnListener = new SortedDynamicResultSetListener( this );
@@ -76,7 +76,7 @@ SortedDynamicResultSet::SortedDynamicResultSet(
mxOriginal = xOriginal;
maOptions = aOptions;
mxCompFac = xCompFac;
- mxSMgr = xSMgr;
+ m_xContext = rxContext;
mpOne = NULL;
mpTwo = NULL;
@@ -236,15 +236,12 @@ SortedDynamicResultSet::connectToCache(
throw ListenerAlreadySetException();
Reference< XSourceInitialization > xTarget( xCache, UNO_QUERY );
- if( xTarget.is() && mxSMgr.is() )
+ if( xTarget.is() && m_xContext.is() )
{
Reference< XCachedDynamicResultSetStubFactory > xStubFactory;
try
{
- xStubFactory = Reference< XCachedDynamicResultSetStubFactory >(
- mxSMgr->createInstance(
- OUString( "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ),
- UNO_QUERY );
+ xStubFactory = CachedDynamicResultSetStubFactory::create( m_xContext );
}
catch ( Exception const & )
{
@@ -466,9 +463,9 @@ void SortedDynamicResultSet::SendNotify()
//
//=========================================================================
SortedDynamicResultSetFactory::SortedDynamicResultSetFactory(
- const Reference< XMultiServiceFactory > & rSMgr )
+ const Reference< XComponentContext > & rxContext )
{
- mxSMgr = rSMgr;
+ m_xContext = rxContext;
}
//--------------------------------------------------------------------------
@@ -498,7 +495,7 @@ XTYPEPROVIDER_IMPL_3( SortedDynamicResultSetFactory,
// XServiceInfo methods.
//--------------------------------------------------------------------------
-XSERVICEINFO_IMPL_1( SortedDynamicResultSetFactory,
+XSERVICEINFO_IMPL_1_CTX( SortedDynamicResultSetFactory,
OUString( "com.sun.star.comp.ucb.SortedDynamicResultSetFactory" ),
OUString( DYNAMIC_RESULTSET_FACTORY_NAME ) );
@@ -519,7 +516,7 @@ SortedDynamicResultSetFactory::createSortedDynamicResultSet(
throw( RuntimeException )
{
Reference< XDynamicResultSet > xRet;
- xRet = new SortedDynamicResultSet( Source, Info, CompareFactory, mxSMgr );
+ xRet = new SortedDynamicResultSet( Source, Info, CompareFactory, m_xContext );
return xRet;
}
diff --git a/ucb/source/sorter/sortdynres.hxx b/ucb/source/sorter/sortdynres.hxx
index 75d9ae976cc3..6ba2a77c14a7 100644
--- a/ucb/source/sorter/sortdynres.hxx
+++ b/ucb/source/sorter/sortdynres.hxx
@@ -20,7 +20,7 @@
#ifndef _SORTDYNRES_HXX
#define _SORTDYNRES_HXX
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XComponent.hpp>
@@ -47,7 +47,7 @@ namespace cppu {
#define SEQUENCE com::sun::star::uno::Sequence
#define EVENTOBJECT com::sun::star::lang::EventObject
#define XEVENTLISTENER com::sun::star::lang::XEventListener
-#define XMULTISERVICEFACTORY com::sun::star::lang::XMultiServiceFactory
+#define XCOMPONENTCONTEXT com::sun::star::uno::XComponentContext
#define XRESULTSET com::sun::star::sdbc::XResultSet
#define SQLEXCEPTION com::sun::star::sdbc::SQLException
#define XANYCOMPAREFACTORY com::sun::star::ucb::XAnyCompareFactory
@@ -77,7 +77,7 @@ class SortedDynamicResultSet:
REFERENCE < XDYNAMICRESULTSET > mxOriginal;
SEQUENCE < NUMBERED_SORTINGINFO > maOptions;
REFERENCE < XANYCOMPAREFACTORY > mxCompFac;
- REFERENCE < XMULTISERVICEFACTORY > mxSMgr;
+ REFERENCE < XCOMPONENTCONTEXT > m_xContext;
SortedResultSet* mpOne;
SortedResultSet* mpTwo;
@@ -97,7 +97,7 @@ public:
SortedDynamicResultSet( const REFERENCE < XDYNAMICRESULTSET > &xOriginal,
const SEQUENCE < NUMBERED_SORTINGINFO > &aOptions,
const REFERENCE < XANYCOMPAREFACTORY > &xCompFac,
- const REFERENCE < XMULTISERVICEFACTORY > &xSMgr );
+ const REFERENCE < XCOMPONENTCONTEXT > &rxContext );
~SortedDynamicResultSet();
@@ -211,12 +211,12 @@ class SortedDynamicResultSetFactory:
public com::sun::star::ucb::XSortedDynamicResultSetFactory
{
- REFERENCE< XMULTISERVICEFACTORY > mxSMgr;
+ REFERENCE< XCOMPONENTCONTEXT > m_xContext;
public:
SortedDynamicResultSetFactory(
- const REFERENCE< XMULTISERVICEFACTORY > & rSMgr);
+ const REFERENCE< XCOMPONENTCONTEXT > & rxContext);
~SortedDynamicResultSetFactory();
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 376466ba73b5..f29125704ca4 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -682,7 +682,7 @@ namespace cmis
if ( bOpenFolder && bIsFolder )
{
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet(m_xSMgr, this, rOpenCommand, xEnv );
+ = new DynamicResultSet(comphelper::getComponentContext(m_xSMgr), this, rOpenCommand, xEnv );
aRet <<= xSet;
}
else if ( rOpenCommand.Sink.is() )
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index fdac399ee61b..40d7a960cb75 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -315,7 +315,7 @@ namespace cmis
getRepositories( xEnv );
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet(m_xSMgr, this, rOpenCommand, xEnv );
+ = new DynamicResultSet(comphelper::getComponentContext(m_xSMgr), this, rOpenCommand, xEnv );
aRet <<= xSet;
}
else
diff --git a/ucb/source/ucp/cmis/cmis_resultset.cxx b/ucb/source/ucp/cmis/cmis_resultset.cxx
index a9d4f8311971..0437db13eac1 100644
--- a/ucb/source/ucp/cmis/cmis_resultset.cxx
+++ b/ucb/source/ucp/cmis/cmis_resultset.cxx
@@ -9,7 +9,6 @@
#include "cmis_datasupplier.hxx"
#include "cmis_resultset.hxx"
-#include <comphelper/processfactory.hxx>
using namespace com::sun::star::lang;
using namespace com::sun::star::ucb;
@@ -18,11 +17,11 @@ using namespace com::sun::star::uno;
namespace cmis
{
DynamicResultSet::DynamicResultSet(
- const Reference< XMultiServiceFactory >& rxSMgr,
+ const Reference< XComponentContext >& rxContext,
ChildrenProvider* pChildrenProvider,
const OpenCommandArgument2& rCommand,
const Reference< XCommandEnvironment >& rxEnv ) :
- ResultSetImplHelper( rxSMgr, rCommand ),
+ ResultSetImplHelper( rxContext, rCommand ),
m_pChildrenProvider( pChildrenProvider ),
m_xEnv( rxEnv )
{
@@ -31,7 +30,7 @@ namespace cmis
void DynamicResultSet::initStatic()
{
m_xResultSet1 = new ::ucbhelper::ResultSet(
- comphelper::getComponentContext(m_xSMgr), m_aCommand.Properties,
+ m_xContext, m_aCommand.Properties,
new DataSupplier( m_pChildrenProvider, m_aCommand.Mode ), m_xEnv );
}
diff --git a/ucb/source/ucp/cmis/cmis_resultset.hxx b/ucb/source/ucp/cmis/cmis_resultset.hxx
index 7d7c3753deba..5a39c962f68d 100644
--- a/ucb/source/ucp/cmis/cmis_resultset.hxx
+++ b/ucb/source/ucp/cmis/cmis_resultset.hxx
@@ -29,7 +29,7 @@ namespace cmis
public:
DynamicResultSet(
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
ChildrenProvider* pChildrenProvider,
const com::sun::star::ucb::OpenCommandArgument2& rCommand,
const com::sun::star::uno::Reference<
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index c94be779f099..f58895bf4070 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -272,7 +272,7 @@ namespace ucb { namespace ucp { namespace ext
if ( bOpenFolder && impl_isFolder() )
{
Reference< XDynamicResultSet > xSet = new ResultSet(
- m_xSMgr, this, aOpenCommand, i_rEvironment );
+ comphelper::getComponentContext(m_xSMgr), this, aOpenCommand, i_rEvironment );
aRet <<= xSet;
}
diff --git a/ucb/source/ucp/ext/ucpext_resultset.cxx b/ucb/source/ucp/ext/ucpext_resultset.cxx
index 3097a65f7693..09759d77df3c 100644
--- a/ucb/source/ucp/ext/ucpext_resultset.cxx
+++ b/ucb/source/ucp/ext/ucpext_resultset.cxx
@@ -41,6 +41,7 @@ namespace ucb { namespace ucp { namespace ext
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
+ using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::ucb::XContentIdentifier;
using ::com::sun::star::ucb::OpenCommandArgument2;
@@ -51,9 +52,9 @@ namespace ucb { namespace ucp { namespace ext
//= ResultSet
//==================================================================================================================
//------------------------------------------------------------------------------------------------------------------
- ResultSet::ResultSet( const Reference< XMultiServiceFactory >& i_rORB, const ::rtl::Reference< Content >& i_rContent,
+ ResultSet::ResultSet( const Reference< XComponentContext >& rxContext, const ::rtl::Reference< Content >& i_rContent,
const OpenCommandArgument2& i_rCommand, const Reference< XCommandEnvironment >& i_rEnv )
- :ResultSetImplHelper( i_rORB, i_rCommand )
+ :ResultSetImplHelper( rxContext, i_rCommand )
,m_xEnvironment( i_rEnv )
,m_xContent( i_rContent )
{
@@ -63,12 +64,12 @@ namespace ucb { namespace ucp { namespace ext
void ResultSet::initStatic()
{
::rtl::Reference< DataSupplier > pDataSupplier( new DataSupplier(
- m_xSMgr,
+ Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW),
m_xContent,
m_aCommand.Mode
) );
m_xResultSet1 = new ::ucbhelper::ResultSet(
- comphelper::getComponentContext(m_xSMgr),
+ m_xContext,
m_aCommand.Properties,
pDataSupplier.get(),
m_xEnvironment
diff --git a/ucb/source/ucp/ext/ucpext_resultset.hxx b/ucb/source/ucp/ext/ucpext_resultset.hxx
index 5c05ba4c54a9..3b097355326c 100644
--- a/ucb/source/ucp/ext/ucpext_resultset.hxx
+++ b/ucb/source/ucp/ext/ucpext_resultset.hxx
@@ -37,7 +37,7 @@ namespace ucb { namespace ucp { namespace ext
{
public:
ResultSet(
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& i_rORB,
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& i_rContent,
const com::sun::star::ucb::OpenCommandArgument2& i_rCommand,
const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& i_rEnv
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index 86860da2a524..124e58b85b27 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -29,7 +29,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/ucb/ListActionType.hpp>
#include <com/sun/star/ucb/XSourceInitialization.hpp>
-#include <com/sun/star/ucb/XCachedDynamicResultSetStubFactory.hpp>
+#include <com/sun/star/ucb/CachedDynamicResultSetStubFactory.hpp>
#include <ucbhelper/resultsetmetadata.hxx>
using namespace fileaccess;
@@ -705,8 +705,6 @@ XResultSet_impl::connectToCache(
ucb::ServiceNotFoundException,
uno::RuntimeException )
{
- uno::Reference< lang::XMultiServiceFactory > mxSMgr(m_pMyShell->m_xContext->getServiceManager(), uno::UNO_QUERY_THROW);
-
if( m_xListener.is() )
throw ucb::ListenerAlreadySetException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() );
if( m_bStatic )
@@ -714,17 +712,14 @@ XResultSet_impl::connectToCache(
uno::Reference< ucb::XSourceInitialization > xTarget(
xCache, uno::UNO_QUERY );
- if( xTarget.is() && mxSMgr.is() )
+ if( xTarget.is() && m_pMyShell->m_xContext.is() )
{
uno::Reference< ucb::XCachedDynamicResultSetStubFactory > xStubFactory;
try
{
xStubFactory
- = uno::Reference< ucb::XCachedDynamicResultSetStubFactory >(
- mxSMgr->createInstance(
- rtl::OUString(
- "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ),
- uno::UNO_QUERY );
+ = ucb::CachedDynamicResultSetStubFactory::create(
+ m_pMyShell->m_xContext );
}
catch ( uno::Exception const & )
{
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index eb4979c3307e..a881b6e69644 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -41,6 +41,7 @@
#include <string.h>
#include "curl.hxx"
#include <curl/easy.h>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/fd_inputstream.hxx>
@@ -541,7 +542,7 @@ Any SAL_CALL FTPContent::execute(
m_aFTPURL.list(sal_Int16(aOpenCommand.Mode));
Reference< XDynamicResultSet > xSet
= new DynamicResultSet(
- m_xSMgr,
+ comphelper::getComponentContext(m_xSMgr),
this,
aOpenCommand,
Environment,
diff --git a/ucb/source/ucp/ftp/ftpdynresultset.cxx b/ucb/source/ucp/ftp/ftpdynresultset.cxx
index 3db3a1fb3e64..512178c2c4bf 100644
--- a/ucb/source/ucp/ftp/ftpdynresultset.cxx
+++ b/ucb/source/ucp/ftp/ftpdynresultset.cxx
@@ -38,12 +38,12 @@ using namespace ftp;
//=========================================================================
DynamicResultSet::DynamicResultSet(
- const Reference< XMultiServiceFactory >& rxSMgr,
+ const Reference< XComponentContext >& rxContext,
const rtl::Reference< FTPContent >& rxContent,
const OpenCommandArgument2& rCommand,
const Reference< XCommandEnvironment >& rxEnv,
ResultSetFactory* pFactory )
- : ResultSetImplHelper( rxSMgr, rCommand ),
+ : ResultSetImplHelper( rxContext, rCommand ),
m_xContent( rxContent ),
m_xEnv( rxEnv ),
m_pFactory( pFactory )
diff --git a/ucb/source/ucp/ftp/ftpdynresultset.hxx b/ucb/source/ucp/ftp/ftpdynresultset.hxx
index d6c992a80d08..988c0ef22b59 100644
--- a/ucb/source/ucp/ftp/ftpdynresultset.hxx
+++ b/ucb/source/ucp/ftp/ftpdynresultset.hxx
@@ -43,7 +43,7 @@ namespace ftp {
public:
DynamicResultSet(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ com::sun::star::uno::XComponentContext >& rxContext,
const rtl::Reference< FTPContent >& rxContent,
const com::sun::star::ucb::OpenCommandArgument2& rCommand,
const com::sun::star::uno::Reference<
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index 32fecc2277ab..d2c1a4af84b2 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -60,6 +60,7 @@
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
#include <com/sun/star/ucb/XContentCreator.hpp>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/interactionrequest.hxx>
@@ -854,7 +855,7 @@ uno::Any Content::open(const ucb::OpenCommandArgument2 & rOpenCommand,
if ( bOpenFolder && bIsFolder )
{
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet(m_xSMgr, this, rOpenCommand, xEnv );
+ = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, rOpenCommand, xEnv );
aRet <<= xSet;
}
else if ( rOpenCommand.Sink.is() )
diff --git a/ucb/source/ucp/gio/gio_resultset.cxx b/ucb/source/ucp/gio/gio_resultset.cxx
index 862baf896f01..cfc114866f01 100644
--- a/ucb/source/ucp/gio/gio_resultset.cxx
+++ b/ucb/source/ucp/gio/gio_resultset.cxx
@@ -28,11 +28,11 @@ using namespace com::sun::star::uno;
using namespace gio;
DynamicResultSet::DynamicResultSet(
- const Reference< XMultiServiceFactory >& rxSMgr,
+ const Reference< XComponentContext >& rxContext,
const Reference< Content >& rxContent,
const OpenCommandArgument2& rCommand,
const Reference< XCommandEnvironment >& rxEnv )
- : ResultSetImplHelper( rxSMgr, rCommand ),
+ : ResultSetImplHelper( rxContext, rCommand ),
m_xContent( rxContent ),
m_xEnv( rxEnv )
{
@@ -41,8 +41,8 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic()
{
m_xResultSet1 = new ::ucbhelper::ResultSet(
- comphelper::getComponentContext(m_xSMgr), m_aCommand.Properties,
- new DataSupplier( m_xSMgr, m_xContent, m_aCommand.Mode ), m_xEnv );
+ m_xContext, m_aCommand.Properties,
+ new DataSupplier( Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW), m_xContent, m_aCommand.Mode ), m_xEnv );
}
void DynamicResultSet::initDynamic()
diff --git a/ucb/source/ucp/gio/gio_resultset.hxx b/ucb/source/ucp/gio/gio_resultset.hxx
index e4be3f9b2499..a53978a24c00 100644
--- a/ucb/source/ucp/gio/gio_resultset.hxx
+++ b/ucb/source/ucp/gio/gio_resultset.hxx
@@ -37,7 +37,7 @@ namespace gio
public:
DynamicResultSet(
- const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
const com::sun::star::uno::Reference< Content >& rxContent,
const com::sun::star::ucb::OpenCommandArgument2& rCommand,
const com::sun::star::uno::Reference<
diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index d53b752f1792..c3ed8fd197c8 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -343,7 +343,7 @@ uno::Any SAL_CALL Content::execute(
if ( bOpenFolder && isFolder( xEnv ) ) {
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet(m_xSMgr, this, aOpenCommand, xEnv );
+ = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, aOpenCommand, xEnv );
aRet <<= xSet;
} else if ( aOpenCommand.Sink.is() ) {
diff --git a/ucb/source/ucp/gvfs/gvfs_directory.cxx b/ucb/source/ucp/gvfs/gvfs_directory.cxx
index 52c8fc11b65a..9ca0c2382e44 100644
--- a/ucb/source/ucp/gvfs/gvfs_directory.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_directory.cxx
@@ -39,11 +39,11 @@ using namespace gvfs;
// DynamicResultSet Implementation.
DynamicResultSet::DynamicResultSet(
- const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+ const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const ucb::OpenCommandArgument2& rCommand,
const uno::Reference< ucb::XCommandEnvironment >& rxEnv )
- : ResultSetImplHelper( rxSMgr, rCommand ),
+ : ResultSetImplHelper( rxContext, rCommand ),
m_xContent( rxContent ),
m_xEnv( rxEnv )
{
@@ -51,7 +51,7 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic()
{
m_xResultSet1
- = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
+ = new ::ucbhelper::ResultSet( m_xContext,
m_aCommand.Properties,
new DataSupplier( m_xContent,
m_aCommand.Mode ),
diff --git a/ucb/source/ucp/gvfs/gvfs_directory.hxx b/ucb/source/ucp/gvfs/gvfs_directory.hxx
index 709b71fdef04..e1847b3a470b 100644
--- a/ucb/source/ucp/gvfs/gvfs_directory.hxx
+++ b/ucb/source/ucp/gvfs/gvfs_directory.hxx
@@ -38,7 +38,7 @@ private:
public:
DynamicResultSet( const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ com::sun::star::uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const com::sun::star::ucb::OpenCommandArgument2& rCommand,
const com::sun::star::uno::Reference<
diff --git a/ucb/source/ucp/hierarchy/dynamicresultset.cxx b/ucb/source/ucp/hierarchy/dynamicresultset.cxx
index bb7d735b84db..a36d5dff70b5 100644
--- a/ucb/source/ucp/hierarchy/dynamicresultset.cxx
+++ b/ucb/source/ucp/hierarchy/dynamicresultset.cxx
@@ -42,10 +42,10 @@ using namespace hierarchy_ucp;
//=========================================================================
DynamicResultSet::DynamicResultSet(
- const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+ const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< HierarchyContent >& rxContent,
const ucb::OpenCommandArgument2& rCommand )
-: ResultSetImplHelper( rxSMgr, rCommand ),
+: ResultSetImplHelper( rxContext, rCommand ),
m_xContent( rxContent )
{
}
@@ -60,9 +60,9 @@ void DynamicResultSet::initStatic()
{
m_xResultSet1
= new ::ucbhelper::ResultSet(
- comphelper::getComponentContext(m_xSMgr),
+ m_xContext,
m_aCommand.Properties,
- new HierarchyResultSetDataSupplier( m_xSMgr,
+ new HierarchyResultSetDataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
m_xContent,
m_aCommand.Mode ) );
}
@@ -72,9 +72,9 @@ void DynamicResultSet::initDynamic()
{
m_xResultSet1
= new ::ucbhelper::ResultSet(
- comphelper::getComponentContext(m_xSMgr),
+ m_xContext,
m_aCommand.Properties,
- new HierarchyResultSetDataSupplier( m_xSMgr,
+ new HierarchyResultSetDataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
m_xContent,
m_aCommand.Mode ) );
m_xResultSet2 = m_xResultSet1;
diff --git a/ucb/source/ucp/hierarchy/dynamicresultset.hxx b/ucb/source/ucp/hierarchy/dynamicresultset.hxx
index dd88cd5ecad8..79e29cf8ac89 100644
--- a/ucb/source/ucp/hierarchy/dynamicresultset.hxx
+++ b/ucb/source/ucp/hierarchy/dynamicresultset.hxx
@@ -37,7 +37,7 @@ private:
public:
DynamicResultSet(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ com::sun::star::uno::XComponentContext >& rxContext,
const rtl::Reference< HierarchyContent >& rxContent,
const com::sun::star::ucb::OpenCommandArgument2& rCommand );
};
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index efa433c2be35..81dd0dc00f04 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -59,6 +59,7 @@
#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
@@ -440,7 +441,7 @@ uno::Any SAL_CALL HierarchyContent::execute(
}
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet( m_xSMgr, this, aOpenCommand );
+ = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, aOpenCommand );
aRet <<= xSet;
}
else if ( aCommand.Name == "insert" && ( m_eKind != ROOT ) && !isReadOnly() )
diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx
index 4c1269e36344..64494e312563 100644
--- a/ucb/source/ucp/odma/odma_content.cxx
+++ b/ucb/source/ucp/odma/odma_content.cxx
@@ -310,7 +310,7 @@ uno::Any SAL_CALL Content::execute(
// open as folder - return result set
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet( m_xSMgr,
+ = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr),
this,
aOpenCommand,
Environment );
diff --git a/ucb/source/ucp/odma/odma_resultset.cxx b/ucb/source/ucp/odma/odma_resultset.cxx
index c94f340ed7fa..6d83a189cd95 100644
--- a/ucb/source/ucp/odma/odma_resultset.cxx
+++ b/ucb/source/ucp/odma/odma_resultset.cxx
@@ -49,11 +49,11 @@ using namespace odma;
//=========================================================================
DynamicResultSet::DynamicResultSet(
- const Reference< XMultiServiceFactory >& rxSMgr,
+ const Reference< XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const OpenCommandArgument2& rCommand,
const Reference< XCommandEnvironment >& rxEnv )
-: ResultSetImplHelper( rxSMgr, rCommand ),
+: ResultSetImplHelper( rxContext, rCommand ),
m_xContent( rxContent ),
m_xEnv( rxEnv )
{
@@ -68,9 +68,9 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic()
{
m_xResultSet1
- = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
+ = new ::ucbhelper::ResultSet( m_xContext,
m_aCommand.Properties,
- new DataSupplier( m_xSMgr,
+ new DataSupplier( Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW),
m_xContent,
m_aCommand.Mode ),
m_xEnv );
diff --git a/ucb/source/ucp/odma/odma_resultset.hxx b/ucb/source/ucp/odma/odma_resultset.hxx
index 0a0853255977..9fcabf6aca3d 100644
--- a/ucb/source/ucp/odma/odma_resultset.hxx
+++ b/ucb/source/ucp/odma/odma_resultset.hxx
@@ -40,7 +40,7 @@ private:
public:
DynamicResultSet(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ com::sun::star::uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const com::sun::star::ucb::OpenCommandArgument2& rCommand,
const com::sun::star::uno::Reference<
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 43146545402f..5d920e0cfb32 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -57,6 +57,7 @@
#include <com/sun/star/util/XChangesBatch.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
@@ -1461,7 +1462,7 @@ uno::Any Content::open(
//////////////////////////////////////////////////////////////////
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet( m_xSMgr, this, rArg, xEnv );
+ = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, rArg, xEnv );
return uno::makeAny( xSet );
}
else
diff --git a/ucb/source/ucp/package/pkgresultset.cxx b/ucb/source/ucp/package/pkgresultset.cxx
index d4f353761766..fb7357328f4e 100644
--- a/ucb/source/ucp/package/pkgresultset.cxx
+++ b/ucb/source/ucp/package/pkgresultset.cxx
@@ -43,11 +43,11 @@ using namespace package_ucp;
//=========================================================================
DynamicResultSet::DynamicResultSet(
- const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+ const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const ucb::OpenCommandArgument2& rCommand,
const uno::Reference< ucb::XCommandEnvironment >& rxEnv )
-: ResultSetImplHelper( rxSMgr, rCommand ),
+: ResultSetImplHelper(rxContext, rCommand ),
m_xContent( rxContent ),
m_xEnv( rxEnv )
{
@@ -62,9 +62,9 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic()
{
m_xResultSet1
- = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
+ = new ::ucbhelper::ResultSet( m_xContext,
m_aCommand.Properties,
- new DataSupplier( m_xSMgr,
+ new DataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
m_xContent,
m_aCommand.Mode ),
m_xEnv );
@@ -74,9 +74,9 @@ void DynamicResultSet::initStatic()
void DynamicResultSet::initDynamic()
{
m_xResultSet1
- = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
+ = new ::ucbhelper::ResultSet( m_xContext,
m_aCommand.Properties,
- new DataSupplier( m_xSMgr,
+ new DataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
m_xContent,
m_aCommand.Mode ),
m_xEnv );
diff --git a/ucb/source/ucp/package/pkgresultset.hxx b/ucb/source/ucp/package/pkgresultset.hxx
index 342639c11de6..4e16e0213e12 100644
--- a/ucb/source/ucp/package/pkgresultset.hxx
+++ b/ucb/source/ucp/package/pkgresultset.hxx
@@ -39,7 +39,7 @@ private:
public:
DynamicResultSet(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ com::sun::star::uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const com::sun::star::ucb::OpenCommandArgument2& rCommand,
const com::sun::star::uno::Reference<
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 6b8e17b15fc5..9946fea42067 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -56,6 +56,7 @@
#include "com/sun/star/ucb/XCommandInfo.hpp"
#include "com/sun/star/ucb/XPersistentPropertySet.hpp"
+#include "comphelper/processfactory.hxx"
#include "ucbhelper/cancelcommandexecution.hxx"
#include "ucbhelper/contentidentifier.hxx"
#include "ucbhelper/propertyvalueset.hxx"
@@ -1417,7 +1418,7 @@ uno::Any Content::open(
//////////////////////////////////////////////////////////////////
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet( m_xSMgr, this, rArg );
+ = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, rArg );
return uno::makeAny( xSet );
}
else
diff --git a/ucb/source/ucp/tdoc/tdoc_resultset.cxx b/ucb/source/ucp/tdoc/tdoc_resultset.cxx
index 7fc027ce899e..7ec9c2326266 100644
--- a/ucb/source/ucp/tdoc/tdoc_resultset.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_resultset.cxx
@@ -46,10 +46,10 @@ using namespace tdoc_ucp;
//=========================================================================
DynamicResultSet::DynamicResultSet(
- const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+ const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const ucb::OpenCommandArgument2& rCommand )
-: ResultSetImplHelper( rxSMgr, rCommand ),
+: ResultSetImplHelper( rxContext, rCommand ),
m_xContent( rxContent )
{
}
@@ -64,9 +64,9 @@ void DynamicResultSet::initStatic()
{
m_xResultSet1
= new ::ucbhelper::ResultSet(
- comphelper::getComponentContext(m_xSMgr),
+ m_xContext,
m_aCommand.Properties,
- new ResultSetDataSupplier( m_xSMgr,
+ new ResultSetDataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
m_xContent,
m_aCommand.Mode ) );
}
@@ -76,9 +76,9 @@ void DynamicResultSet::initDynamic()
{
m_xResultSet1
= new ::ucbhelper::ResultSet(
- comphelper::getComponentContext(m_xSMgr),
+ m_xContext,
m_aCommand.Properties,
- new ResultSetDataSupplier( m_xSMgr,
+ new ResultSetDataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
m_xContent,
m_aCommand.Mode ) );
m_xResultSet2 = m_xResultSet1;
diff --git a/ucb/source/ucp/tdoc/tdoc_resultset.hxx b/ucb/source/ucp/tdoc/tdoc_resultset.hxx
index e1bf16af554e..9e385ee14e3a 100644
--- a/ucb/source/ucp/tdoc/tdoc_resultset.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_resultset.hxx
@@ -38,7 +38,7 @@ private:
public:
DynamicResultSet(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ com::sun::star::uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const com::sun::star::ucb::OpenCommandArgument2& rCommand );
};
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index e2fd4c2d3a1b..c0d7ace4bf71 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -1854,7 +1854,7 @@ uno::Any Content::open(
// Open collection.
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet( m_xSMgr, this, rArg, xEnv );
+ = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, rArg, xEnv );
aRet <<= xSet;
}
else
diff --git a/ucb/source/ucp/webdav-neon/webdavresultset.cxx b/ucb/source/ucp/webdav-neon/webdavresultset.cxx
index dbd51a51ebbc..f069854e5c8c 100644
--- a/ucb/source/ucp/webdav-neon/webdavresultset.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavresultset.cxx
@@ -51,11 +51,11 @@ using namespace webdav_ucp;
//=========================================================================
DynamicResultSet::DynamicResultSet(
- const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+ const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const ucb::OpenCommandArgument2& rCommand,
const uno::Reference< ucb::XCommandEnvironment >& rxEnv )
-: ResultSetImplHelper( rxSMgr, rCommand ),
+: ResultSetImplHelper( rxContext, rCommand ),
m_xContent( rxContent ),
m_xEnv( rxEnv )
{
@@ -70,9 +70,9 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic()
{
m_xResultSet1
- = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
+ = new ::ucbhelper::ResultSet( m_xContext,
m_aCommand.Properties,
- new DataSupplier( m_xSMgr,
+ new DataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
m_xContent,
m_aCommand.Mode ),
m_xEnv );
@@ -82,9 +82,9 @@ void DynamicResultSet::initStatic()
void DynamicResultSet::initDynamic()
{
m_xResultSet1
- = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
+ = new ::ucbhelper::ResultSet( m_xContext,
m_aCommand.Properties,
- new DataSupplier( m_xSMgr,
+ new DataSupplier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
m_xContent,
m_aCommand.Mode ),
m_xEnv );
diff --git a/ucb/source/ucp/webdav-neon/webdavresultset.hxx b/ucb/source/ucp/webdav-neon/webdavresultset.hxx
index 06749bcd9867..c27cc5e61d14 100644
--- a/ucb/source/ucp/webdav-neon/webdavresultset.hxx
+++ b/ucb/source/ucp/webdav-neon/webdavresultset.hxx
@@ -48,7 +48,7 @@ private:
public:
DynamicResultSet( const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ com::sun::star::uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const com::sun::star::ucb::OpenCommandArgument2& rCommand,
const com::sun::star::uno::Reference<
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 248cdcea2568..d649c239c2b0 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -21,6 +21,7 @@
#include "osl/doublecheckedlocking.h"
#include <rtl/uri.hxx>
#include <rtl/ustrbuf.hxx>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/simpleinteractionrequest.hxx>
@@ -1915,7 +1916,7 @@ uno::Any Content::open(
// Open collection.
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet( m_xSMgr, this, rArg, xEnv );
+ = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, rArg, xEnv );
aRet <<= xSet;
}
else
diff --git a/ucb/source/ucp/webdav/webdavresultset.cxx b/ucb/source/ucp/webdav/webdavresultset.cxx
index 1587d9ba1e41..bfa66f371c0b 100644
--- a/ucb/source/ucp/webdav/webdavresultset.cxx
+++ b/ucb/source/ucp/webdav/webdavresultset.cxx
@@ -44,11 +44,11 @@ using namespace http_dav_ucp;
//=========================================================================
DynamicResultSet::DynamicResultSet(
- const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+ const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const ucb::OpenCommandArgument2& rCommand,
const uno::Reference< ucb::XCommandEnvironment >& rxEnv )
-: ResultSetImplHelper( rxSMgr, rCommand ),
+: ResultSetImplHelper( rxContext, rCommand ),
m_xContent( rxContent ),
m_xEnv( rxEnv )
{
diff --git a/ucb/source/ucp/webdav/webdavresultset.hxx b/ucb/source/ucp/webdav/webdavresultset.hxx
index 998867277308..87043caade8c 100644
--- a/ucb/source/ucp/webdav/webdavresultset.hxx
+++ b/ucb/source/ucp/webdav/webdavresultset.hxx
@@ -41,7 +41,7 @@ private:
public:
DynamicResultSet( const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ com::sun::star::uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rxContent,
const com::sun::star::ucb::OpenCommandArgument2& rCommand,
const com::sun::star::uno::Reference<