diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-08 08:16:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-30 13:59:47 +0100 |
commit | 2cf0f6ea36e1525193544258eef2828a54345510 (patch) | |
tree | b1033cc7f7ef1061bc16baa8a52480ced38e8b55 /ucb/source/ucp | |
parent | 48f2b7a7af3d4e9bf1b3c27e9aa5e12e60878051 (diff) |
fdo#46808, use service constructor for ucb::CachedDynamicResultSetStubFactory
Change-Id: Iea7b21621c5d341468976507684a9c01f0822034
Diffstat (limited to 'ucb/source/ucp')
35 files changed, 80 insertions, 79 deletions
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< |