From 8ec2fed7c88674258ce716e69ae31d8f9be7223c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 31 Oct 2012 16:08:53 +0200 Subject: fdo#46808, use service constructor for ucb::Store Change-Id: I62719ef9d58215e287af3e1be52404993722ec67 --- ucb/source/ucp/ftp/ftpcontentprovider.cxx | 15 ++++++--------- ucb/source/ucp/ftp/ftpcontentprovider.hxx | 3 +-- 2 files changed, 7 insertions(+), 11 deletions(-) (limited to 'ucb/source/ucp/ftp') diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx index ee57e6d263c9..0f961ecaac8e 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx @@ -50,8 +50,8 @@ using namespace com::sun::star::beans; //========================================================================= FTPContentProvider::FTPContentProvider( - const Reference< XMultiServiceFactory >& rSMgr) -: ::ucbhelper::ContentProviderImplHelper(rSMgr), + const Reference< XComponentContext >& rxContext) +: ::ucbhelper::ContentProviderImplHelper(rxContext), m_ftpLoaderThread(0), m_pProxyDecider(0) { @@ -93,7 +93,7 @@ XTYPEPROVIDER_IMPL_3(FTPContentProvider, // //========================================================================= -XSERVICEINFO_IMPL_1( +XSERVICEINFO_IMPL_1_CTX( FTPContentProvider, rtl::OUString("com.sun.star.comp.FTPContentProvider"), rtl::OUString(FTP_CONTENT_PROVIDER_SERVICE_NAME)); @@ -154,7 +154,7 @@ FTPContentProvider::queryContent( aURL.host(), aURL.port().toInt32())) { - xContent = new FTPContent(m_xSMgr,this,xCanonicId,aURL); + xContent = new FTPContent( Reference(m_xContext->getServiceManager(), UNO_QUERY_THROW), this,xCanonicId,aURL); registerNewContent(xContent); } else { @@ -178,7 +178,7 @@ FTPContentProvider::queryContent( void FTPContentProvider::init() { m_ftpLoaderThread = new FTPLoaderThread(); - m_pProxyDecider = new ucbhelper::InternetProxyDecider(comphelper::getComponentContext(m_xSMgr)); + m_pProxyDecider = new ucbhelper::InternetProxyDecider( m_xContext ); } @@ -250,10 +250,7 @@ FTPContentProvider::getHttpProvider() throw(RuntimeException) { // used for access to ftp-proxy - return - UniversalContentBroker::create( - comphelper::getComponentContext(m_xSMgr))-> - queryContentProvider("http:"); + return UniversalContentBroker::create( m_xContext )->queryContentProvider("http:"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.hxx b/ucb/source/ucp/ftp/ftpcontentprovider.hxx index ce8abdb95e38..5f47640a146b 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.hxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.hxx @@ -55,8 +55,7 @@ namespace ftp { public: FTPContentProvider( - const com::sun::star::uno::Reference< - com::sun::star::lang::XMultiServiceFactory>& xMSF ); + const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext ); ~FTPContentProvider(); -- cgit