diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-06 16:02:47 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-26 16:17:58 +0100 |
commit | 317b5bdadebc5560d38da4c9dd6d68c64a93b9a8 (patch) | |
tree | c36532feb63e89936fc3b42edbdff7ac7faedfc4 /ucb | |
parent | dbe081749d9c64c54fd19340a3696237a4ebdf20 (diff) |
webdav: lang::XMultiServiceFactory -> uno::XComponentContext
Change-Id: I71984066a512a023c67d1690bd984d66f75f894b
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.cxx | 16 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVSessionFactory.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVSessionFactory.hxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfSession.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfSession.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.cxx | 46 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.hxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavdatasupplier.cxx | 12 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavdatasupplier.hxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavprovider.cxx | 16 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavprovider.hxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavresultset.cxx | 8 |
13 files changed, 66 insertions, 74 deletions
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index 088b868b2fd2..c997a4a03c9d 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -131,12 +131,12 @@ int DAVAuthListener_Impl::authenticate( //========================================================================= DAVResourceAccess::DAVResourceAccess( - const uno::Reference< lang::XMultiServiceFactory > & rSMgr, + const uno::Reference< uno::XComponentContext > & rContext, rtl::Reference< DAVSessionFactory > const & rSessionFactory, const OUString & rURL ) : m_aURL( rURL ), m_xSessionFactory( rSessionFactory ), - m_xSMgr( rSMgr ) + m_xContext( rContext ) { } @@ -146,7 +146,7 @@ DAVResourceAccess::DAVResourceAccess( const DAVResourceAccess & rOther ) m_aPath( rOther.m_aPath ), m_xSession( rOther.m_xSession ), m_xSessionFactory( rOther.m_xSessionFactory ), - m_xSMgr( rOther.m_xSMgr ), + m_xContext( rOther.m_xContext ), m_aRedirectURIs( rOther.m_aRedirectURIs ) { } @@ -159,7 +159,7 @@ DAVResourceAccess & DAVResourceAccess::operator=( m_aPath = rOther.m_aPath; m_xSession = rOther.m_xSession; m_xSessionFactory = rOther.m_xSessionFactory; - m_xSMgr = rOther.m_xSMgr; + m_xContext = rOther.m_xContext; m_aRedirectURIs = rOther.m_aRedirectURIs; return *this; @@ -592,7 +592,7 @@ void DAVResourceAccess::PUT( // Make stream seekable, if it not. Needed, if request must be retried. uno::Reference< io::XInputStream > xSeekableStream = comphelper::OSeekableInputWrapper::CheckSeekableCanWrap( - rStream, m_xSMgr ); + rStream, m_xContext ); int errorCount = 0; bool bRetry = false; @@ -641,7 +641,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::POST( // Make stream seekable, if it not. Needed, if request must be retried. uno::Reference< io::XInputStream > xSeekableStream = comphelper::OSeekableInputWrapper::CheckSeekableCanWrap( - rInputStream, m_xSMgr ); + rInputStream, m_xContext ); uno::Reference< io::XInputStream > xStream; int errorCount = 0; @@ -705,7 +705,7 @@ void DAVResourceAccess::POST( // Make stream seekable, if it not. Needed, if request must be retried. uno::Reference< io::XInputStream > xSeekableStream = comphelper::OSeekableInputWrapper::CheckSeekableCanWrap( - rInputStream, m_xSMgr ); + rInputStream, m_xContext ); int errorCount = 0; bool bRetry = false; @@ -1068,7 +1068,7 @@ void DAVResourceAccess::initialize() // create new webdav session m_xSession - = m_xSessionFactory->createDAVSession( m_aURL, m_xSMgr ); + = m_xSessionFactory->createDAVSession( m_aURL, m_xContext ); if ( !m_xSession.is() ) return; diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx index 222b37eeb014..4c142705c008 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.hxx @@ -51,13 +51,13 @@ class DAVResourceAccess rtl::Reference< DAVSession > m_xSession; rtl::Reference< DAVSessionFactory > m_xSessionFactory; com::sun::star::uno::Reference< - com::sun::star::lang::XMultiServiceFactory > m_xSMgr; + com::sun::star::uno::XComponentContext > m_xContext; std::vector< SerfUri > m_aRedirectURIs; public: DAVResourceAccess() : m_xSessionFactory( 0 ) {} DAVResourceAccess( const com::sun::star::uno::Reference< - com::sun::star::lang::XMultiServiceFactory > & rSMgr, + com::sun::star::uno::XComponentContext > & rContext, rtl::Reference< DAVSessionFactory > const & rSessionFactory, const OUString & rURL ); diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.cxx b/ucb/source/ucp/webdav/DAVSessionFactory.cxx index 77bb317fdb01..409d2e9c55ee 100644 --- a/ucb/source/ucp/webdav/DAVSessionFactory.cxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.cxx @@ -20,7 +20,7 @@ #include "DAVSessionFactory.hxx" #include "SerfSession.hxx" #include "SerfUri.hxx" -#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> using namespace http_dav_ucp; using namespace com::sun::star; @@ -31,15 +31,15 @@ DAVSessionFactory::~DAVSessionFactory() rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession( const OUString & inUri, - const uno::Reference< lang::XMultiServiceFactory > & rxSMgr ) + const uno::Reference< uno::XComponentContext > & rxContext ) throw( DAVException ) { - m_xMSF = rxSMgr; + m_xMSF = rxContext; osl::MutexGuard aGuard( m_aMutex ); if ( !m_xProxyDecider.get() ) - m_xProxyDecider.reset( new ucbhelper::InternetProxyDecider( rxSMgr ) ); + m_xProxyDecider.reset( new ucbhelper::InternetProxyDecider( rxContext ) ); Map::iterator aIt( m_aMap.begin() ); Map::iterator aEnd( m_aMap.end() ); diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.hxx b/ucb/source/ucp/webdav/DAVSessionFactory.hxx index 27f58ef72731..6617e8cee19e 100644 --- a/ucb/source/ucp/webdav/DAVSessionFactory.hxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.hxx @@ -52,11 +52,11 @@ public: rtl::Reference< DAVSession > createDAVSession( const OUString & inUri, const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >& - rxSMgr ) + ::com::sun::star::uno::XComponentContext >& + rxContext ) throw( DAVException ); - ::uno::Reference< ::lang::XMultiServiceFactory > getServiceFactory() { return m_xMSF; } + ::uno::Reference< ::uno::XComponentContext > getServiceFactory() { return m_xMSF; } private: typedef std::map< OUString, DAVSession * > Map; @@ -64,7 +64,7 @@ private: osl::Mutex m_aMutex; std::auto_ptr< ucbhelper::InternetProxyDecider > m_xProxyDecider; - ::uno::Reference< ::lang::XMultiServiceFactory > m_xMSF; + ::uno::Reference< ::uno::XComponentContext > m_xMSF; void releaseElement( DAVSession * pElement ) SAL_THROW(()); diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx index b83689070d84..4364a692c12c 100644 --- a/ucb/source/ucp/webdav/SerfSession.cxx +++ b/ucb/source/ucp/webdav/SerfSession.cxx @@ -385,12 +385,14 @@ apr_status_t SerfSession::verifySerfCertificateChain ( uno::Reference< xml::crypto::XSecurityEnvironment > xSecurityEnv; try { + css::uno::Reference< css::uno::XComponentContext > xContext = + ::comphelper::getProcessComponentContext(); // Create a certificate container. - xCertificateContainer = security::CertificateContainer::create( comphelper::getComponentContext(getMSF()) ); + xCertificateContainer = security::CertificateContainer::create( xContext ); xSEInitializer = uno::Reference< xml::crypto::XSEInitializer >( - getMSF()->createInstance( - OUString( "com.sun.star.xml.crypto.SEInitializer" ) ), + xContext->getServiceManager()->createInstanceWithContext( + OUString( "com.sun.star.xml.crypto.SEInitializer" ), xContext ), uno::UNO_QUERY_THROW); xSecurityContext = xSEInitializer->createSecurityContext( OUString() ); diff --git a/ucb/source/ucp/webdav/SerfSession.hxx b/ucb/source/ucp/webdav/SerfSession.hxx index aa75d4507b4d..a84fcc1abeba 100644 --- a/ucb/source/ucp/webdav/SerfSession.hxx +++ b/ucb/source/ucp/webdav/SerfSession.hxx @@ -29,7 +29,6 @@ #include "SerfTypes.hxx" //#include "SerfLockStore.hxx" #include "SerfUri.hxx" -#include <com/sun/star/lang/XMultiServiceFactory.hpp> namespace ucbhelper { class ProxyDecider; } @@ -251,9 +250,6 @@ public: const OUString & getHostName() const { return m_aUri.GetHost(); } int getPort() const { return m_aUri.GetPort(); } - const ::uno::Reference< ::lang::XMultiServiceFactory > getMSF() - { return m_xFactory->getServiceFactory(); } - sal_Bool isDomainMatch( OUString certHostName ); private: diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 1fce24bb5942..3d5d2aa9f99e 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -21,7 +21,6 @@ #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> @@ -199,12 +198,12 @@ static void lcl_sendPartialGETRequest( bool &bError, //========================================================================= // ctr for content on an existing webdav resource Content::Content( - const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, + const uno::Reference< uno::XComponentContext >& rxContext, ContentProvider* pProvider, const uno::Reference< ucb::XContentIdentifier >& Identifier, rtl::Reference< DAVSessionFactory > const & rSessionFactory ) throw ( ucb::ContentCreationException ) -: ContentImplHelper( rxSMgr, pProvider, Identifier ), +: ContentImplHelper( rxContext, pProvider, Identifier ), m_eResourceType( UNKNOWN ), m_pProvider( pProvider ), m_bTransient( false ), @@ -214,7 +213,7 @@ Content::Content( try { m_xResAccess.reset( new DAVResourceAccess( - rxSMgr, + rxContext, rSessionFactory, Identifier->getContentIdentifier() ) ); @@ -230,13 +229,13 @@ Content::Content( //========================================================================= // ctr for content on an non-existing webdav resource Content::Content( - const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, + const uno::Reference< uno::XComponentContext >& rxContext, ContentProvider* pProvider, const uno::Reference< ucb::XContentIdentifier >& Identifier, rtl::Reference< DAVSessionFactory > const & rSessionFactory, sal_Bool isCollection ) throw ( ucb::ContentCreationException ) -: ContentImplHelper( rxSMgr, pProvider, Identifier ), +: ContentImplHelper( rxContext, pProvider, Identifier ), m_eResourceType( UNKNOWN ), m_pProvider( pProvider ), m_bTransient( true ), @@ -246,7 +245,7 @@ Content::Content( try { m_xResAccess.reset( new DAVResourceAccess( - rxSMgr, rSessionFactory, Identifier->getContentIdentifier() ) ); + rxContext, rSessionFactory, Identifier->getContentIdentifier() ) ); } catch ( DAVException const & ) { @@ -298,7 +297,7 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) try { uno::Reference< beans::XPropertySet > const xProps( - m_xSMgr, uno::UNO_QUERY_THROW ); + m_xContext, uno::UNO_QUERY_THROW ); uno::Reference< uno::XComponentContext > xCtx; xCtx.set( xProps->getPropertyValue( OUString( "DefaultContext" ) ), @@ -1195,12 +1194,12 @@ Content::createNewContent( const ucb::ContentInfo& Info ) } uno::Reference< ucb::XContentIdentifier > xId( - new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ) ); + new ::ucbhelper::ContentIdentifier( aURL ) ); // create the local content try { - return new ::http_dav_ucp::Content( m_xSMgr, + return new ::http_dav_ucp::Content( m_xContext, m_pProvider, xId, m_xResAccess->getSessionFactory(), @@ -1343,7 +1342,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( std::auto_ptr< DAVResourceAccess > xResAccess; OUString aUnescapedTitle; bool bHasAll = false; - uno::Reference< lang::XMultiServiceFactory > xSMgr; + uno::Reference< uno::XComponentContext > xContext; uno::Reference< ucb::XContentIdentifier > xIdentifier; rtl::Reference< ::ucbhelper::ContentProviderImplHelper > xProvider; @@ -1351,7 +1350,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( osl::Guard< osl::Mutex > aGuard( m_aMutex ); aUnescapedTitle = SerfUri::unescape( m_aEscapedTitle ); - xSMgr.set( m_xSMgr ); + xContext.set( m_xContext ); xIdentifier.set( m_xIdentifier ); xProvider.set( m_xProvider.get() ); xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) ); @@ -1655,7 +1654,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( } uno::Reference< sdbc::XRow > xResultRow - = getPropertyValues( comphelper::getComponentContext(xSMgr), + = getPropertyValues( xContext, rProperties, *xProps, xProvider, @@ -1682,7 +1681,6 @@ uno::Sequence< uno::Any > Content::setPropertyValues( const uno::Reference< ucb::XCommandEnvironment >& xEnv ) throw ( uno::Exception ) { - uno::Reference< lang::XMultiServiceFactory > xSMgr; uno::Reference< ucb::XContentIdentifier > xIdentifier; rtl::Reference< ContentProvider > xProvider; sal_Bool bTransient; @@ -1695,7 +1693,6 @@ uno::Sequence< uno::Any > Content::setPropertyValues( xIdentifier.set( m_xIdentifier ); bTransient = m_bTransient; xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) ); - xSMgr.set( m_xSMgr ); } uno::Sequence< uno::Any > aRet( rValues.getLength() ); @@ -2008,7 +2005,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( aNewURL += SerfUri::escapeSegment( aNewTitle ); uno::Reference< ucb::XContentIdentifier > xNewId - = new ::ucbhelper::ContentIdentifier( xSMgr, aNewURL ); + = new ::ucbhelper::ContentIdentifier( aNewURL ); uno::Reference< ucb::XContentIdentifier > xOldId = xIdentifier; try @@ -2106,7 +2103,7 @@ uno::Any Content::open( // Open collection. uno::Reference< ucb::XDynamicResultSet > xSet - = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr), this, rArg, xEnv ); + = new DynamicResultSet( m_xContext, this, rArg, xEnv ); aRet <<= xSet; } else @@ -2598,7 +2595,7 @@ void Content::insert( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); m_xIdentifier - = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ); + = new ::ucbhelper::ContentIdentifier( aURL ); } inserted(); @@ -2644,7 +2641,7 @@ void Content::transfer( const uno::Reference< ucb::XCommandEnvironment >& Environment ) throw( uno::Exception ) { - uno::Reference< lang::XMultiServiceFactory > xSMgr; + uno::Reference< uno::XComponentContext > xContext; uno::Reference< ucb::XContentIdentifier > xIdentifier; uno::Reference< ucb::XContentProvider > xProvider; std::auto_ptr< DAVResourceAccess > xResAccess; @@ -2652,7 +2649,7 @@ void Content::transfer( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - xSMgr.set( m_xSMgr ); + xContext.set( m_xContext ); xIdentifier.set( m_xIdentifier ); xProvider.set( m_xProvider.get() ); xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) ); @@ -2742,16 +2739,16 @@ void Content::transfer( aTargetURL += aTitle; uno::Reference< ucb::XContentIdentifier > xTargetId - = new ::ucbhelper::ContentIdentifier( xSMgr, aTargetURL ); + = new ::ucbhelper::ContentIdentifier( aTargetURL ); - DAVResourceAccess aSourceAccess( xSMgr, + DAVResourceAccess aSourceAccess( xContext, xResAccess->getSessionFactory(), sourceURI.GetURI() ); if ( rArgs.MoveData == sal_True ) { uno::Reference< ucb::XContentIdentifier > xId - = new ::ucbhelper::ContentIdentifier( xSMgr, rArgs.SourceURL ); + = new ::ucbhelper::ContentIdentifier( rArgs.SourceURL ); // Note: The static cast is okay here, because its sure that // xProvider is always the WebDAVContentProvider. @@ -3045,8 +3042,7 @@ sal_Bool Content::exchangeIdentity( aOldURL.getLength(), xNewId->getContentIdentifier() ); uno::Reference< ucb::XContentIdentifier > xNewChildId - = new ::ucbhelper::ContentIdentifier( - m_xSMgr, aNewChildURL ); + = new ::ucbhelper::ContentIdentifier( aNewChildURL ); if ( !xChild->exchangeIdentity( xNewChildId ) ) return sal_False; diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx index 10c3022dba8e..52f14c840c30 100644 --- a/ucb/source/ucp/webdav/webdavcontent.hxx +++ b/ucb/source/ucp/webdav/webdavcontent.hxx @@ -208,14 +208,14 @@ private: com::sun::star::uno::RuntimeException ); public: Content( const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr, + ::com::sun::star::uno::XComponentContext >& rxContext, ContentProvider* pProvider, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentIdentifier >& Identifier, rtl::Reference< DAVSessionFactory > const & rSessionFactory ) throw ( ::com::sun::star::ucb::ContentCreationException ); Content( const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr, + ::com::sun::star::uno::XComponentContext >& rxContext, ContentProvider* pProvider, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentIdentifier >& Identifier, @@ -296,7 +296,7 @@ public: // Called from resultset data supplier. static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow > getPropertyValues( const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >& rSMgr, + ::com::sun::star::uno::XComponentContext >& rContext, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProperties, const ContentProperties& rData, diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx index 794b41b136f2..065c5bd38a6b 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx @@ -72,16 +72,16 @@ struct DataSupplier_Impl osl::Mutex m_aMutex; ResultList m_aResults; rtl::Reference< Content > m_xContent; - uno::Reference< lang::XMultiServiceFactory > m_xSMgr; + uno::Reference< uno::XComponentContext > m_xContext; sal_Int32 m_nOpenMode; sal_Bool m_bCountFinal; sal_Bool m_bThrowException; DataSupplier_Impl( - const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, + const uno::Reference< uno::XComponentContext >& rxContext, const rtl::Reference< Content >& rContent, sal_Int32 nOpenMode ) - : m_xContent( rContent ), m_xSMgr( rxSMgr ), m_nOpenMode( nOpenMode ), + : m_xContent( rContent ), m_xContext( rxContext ), m_nOpenMode( nOpenMode ), m_bCountFinal( sal_False ), m_bThrowException( sal_False ) {} ~DataSupplier_Impl(); }; @@ -110,10 +110,10 @@ DataSupplier_Impl::~DataSupplier_Impl() //========================================================================= DataSupplier::DataSupplier( - const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, + const uno::Reference< uno::XComponentContext >& rxContext, const rtl::Reference< Content >& rContent, sal_Int32 nOpenMode ) -: m_pImpl( new DataSupplier_Impl( rxSMgr, rContent, nOpenMode ) ) +: m_pImpl( new DataSupplier_Impl( rxContext, rContent, nOpenMode ) ) { } @@ -297,7 +297,7 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues( { uno::Reference< sdbc::XRow > xRow = Content::getPropertyValues( - m_pImpl->m_xSMgr, + m_pImpl->m_xContext, getResultSet()->getProperties(), *(m_pImpl->m_aResults[ nIndex ]->pData), rtl::Reference< ::ucbhelper::ContentProviderImplHelper >( diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.hxx b/ucb/source/ucp/webdav/webdavdatasupplier.hxx index c645c47cae00..dbeffb2dd6a1 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.hxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.hxx @@ -42,7 +42,7 @@ private: public: DataSupplier( const com::sun::star::uno::Reference< - com::sun::star::lang::XMultiServiceFactory >& rxSMgr, + com::sun::star::uno::XComponentContext >& rxContext, const rtl::Reference< Content >& rContent, sal_Int32 nOpenMode); diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index f07239d56725..b30069d644f3 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx @@ -62,8 +62,8 @@ OUString &WebDAVUserAgent::operator()() const //========================================================================= ContentProvider::ContentProvider( - const uno::Reference< lang::XMultiServiceFactory >& rSMgr ) -: ::ucbhelper::ContentProviderImplHelper( rSMgr ), + const uno::Reference< uno::XComponentContext >& rContext ) +: ::ucbhelper::ContentProviderImplHelper( rContext ), m_xDAVSessionFactory( new DAVSessionFactory() ), m_pProps( 0 ) { @@ -73,11 +73,9 @@ ContentProvider::ContentProvider( bInit = true; try { - uno::Reference< uno::XComponentContext > xContext( - ::comphelper::getProcessComponentContext() ); uno::Reference< lang::XMultiServiceFactory > xConfigProvider( - xContext->getServiceManager()->createInstanceWithContext( - OUString("com.sun.star.configuration.ConfigurationProvider"), xContext), + rContext->getServiceManager()->createInstanceWithContext( + OUString("com.sun.star.configuration.ConfigurationProvider"), rContext), uno::UNO_QUERY_THROW ); beans::NamedValue aNodePath; @@ -151,7 +149,7 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, // //========================================================================= -XSERVICEINFO_IMPL_1( ContentProvider, +XSERVICEINFO_IMPL_1_CTX( ContentProvider, OUString( "com.sun.star.comp.WebDAVContentProvider" ), OUString( WEBDAV_CONTENT_PROVIDER_SERVICE_NAME ) ); @@ -238,7 +236,7 @@ ContentProvider::queryContent( } if ( bNewId ) - xCanonicId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ); + xCanonicId = new ::ucbhelper::ContentIdentifier( aURL ); else xCanonicId = Identifier; @@ -255,7 +253,7 @@ ContentProvider::queryContent( try { xContent = new ::http_dav_ucp::Content( - m_xSMgr, this, xCanonicId, m_xDAVSessionFactory ); + m_xContext, this, xCanonicId, m_xDAVSessionFactory ); registerNewContent( xContent ); } catch ( ucb::ContentCreationException const & ) diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx b/ucb/source/ucp/webdav/webdavprovider.hxx index ee5169ca0de4..142c88e9759e 100644 --- a/ucb/source/ucp/webdav/webdavprovider.hxx +++ b/ucb/source/ucp/webdav/webdavprovider.hxx @@ -73,7 +73,7 @@ class ContentProvider : public ::ucbhelper::ContentProviderImplHelper public: ContentProvider( const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory >& rSMgr ); + ::com::sun::star::uno::XComponentContext >& rContext ); virtual ~ContentProvider(); // XInterface diff --git a/ucb/source/ucp/webdav/webdavresultset.cxx b/ucb/source/ucp/webdav/webdavresultset.cxx index bfa66f371c0b..ca6b56b1f9ff 100644 --- a/ucb/source/ucp/webdav/webdavresultset.cxx +++ b/ucb/source/ucp/webdav/webdavresultset.cxx @@ -63,9 +63,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( m_xContext, m_xContent, m_aCommand.Mode ), m_xEnv ); @@ -75,9 +75,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( m_xContext, m_xContent, m_aCommand.Mode ), m_xEnv ); |