diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-19 13:15:15 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-19 13:16:38 +0200 |
commit | 03a9f139bd9ea1a4f9096fc982e6b326def58532 (patch) | |
tree | bfb7a08bb4831a1a46b48c3bb49afa77ca436349 /ucb/source/ucp | |
parent | e8a169c93d7e2443a2e56afe7e99cd0721a2c27b (diff) |
ComponentContext::getUnoContext -> getComponentContext simplification
...and some further clean-up.
Change-Id: If5dce53e382b56390c502d0d0d93fc06cbfe33ea
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r-- | ucb/source/ucp/ext/ucpext_content.cxx | 7 | ||||
-rw-r--r-- | ucb/source/ucp/ext/ucpext_datasupplier.cxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/file/filrow.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpcontentprovider.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/gvfs/gvfs_content.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/odma/odma_content.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_docmgr.cxx | 6 |
7 files changed, 18 insertions, 16 deletions
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 290a49570c6d..dcfe4ed4de2c 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -55,8 +55,9 @@ #include <ucbhelper/cancelcommandexecution.hxx> #include <ucbhelper/content.hxx> #include <tools/diagnose_ex.h> -#include <comphelper/string.hxx> #include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/uri.hxx> #include <sal/macros.h> @@ -286,7 +287,7 @@ namespace ucb { namespace ucp { namespace ext if ( aOpenCommand.Sink.is() ) { const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() ); - ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment, comphelper::ComponentContext(m_xSMgr).getUNOContext() ); + ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment, comphelper::getComponentContext(m_xSMgr) ); aRet = aRequestedContent.executeCommand( ::rtl::OUString( "open" ), makeAny( aOpenCommand ) ); } } @@ -502,7 +503,7 @@ namespace ucb { namespace ucp { namespace ext case E_EXTENSION_CONTENT: { const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() ); - ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnv, comphelper::ComponentContext(m_xSMgr).getUNOContext() ); + ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnv, comphelper::getComponentContext(m_xSMgr) ); // translate the property request Sequence< ::rtl::OUString > aPropertyNames( i_rProperties.getLength() ); diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx index aec7058c1f24..28a7fa2aa6c2 100644 --- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx +++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx @@ -34,6 +34,7 @@ #include <ucbhelper/contentidentifier.hxx> #include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <ucbhelper/providerhelper.hxx> #include <ucbhelper/content.hxx> #include <ucbhelper/propertyvalueset.hxx> @@ -178,7 +179,7 @@ namespace ucb { namespace ucp { namespace ext case E_EXTENSION_CONTENT: { const ::rtl::OUString sPackageLocation( m_pImpl->m_xContent->getPhysicalURL() ); - ::ucbhelper::Content aWrappedContent( sPackageLocation, getResultSet()->getEnvironment(), comphelper::ComponentContext(m_pImpl->m_xSMgr).getUNOContext() ); + ::ucbhelper::Content aWrappedContent( sPackageLocation, getResultSet()->getEnvironment(), comphelper::getComponentContext(m_pImpl->m_xSMgr) ); // obtain the properties which our result set is set up for from the wrapped content Sequence< ::rtl::OUString > aPropertyNames(1); diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx index 90fe7c917ace..4ded9894b545 100644 --- a/ucb/source/ucp/file/filrow.cxx +++ b/ucb/source/ucp/file/filrow.cxx @@ -30,7 +30,7 @@ #include "shell.hxx" #include "prov.hxx" #include <com/sun/star/script/Converter.hpp> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> using namespace fileaccess; using namespace com::sun::star; @@ -53,7 +53,7 @@ sal_Bool convert( shell* pShell, if( ! xConverter.is() ) { xConverter = uno::Reference< script::XTypeConverter >( - script::Converter::create(comphelper::ComponentContext(pShell->m_xMultiServiceFactory).getUNOContext()) ); + script::Converter::create(comphelper::getComponentContext(pShell->m_xMultiServiceFactory)) ); } try diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx index 7d9db3d8b582..f05ce18bf107 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx @@ -34,7 +34,7 @@ *************************************************************************/ #include <com/sun/star/ucb/UniversalContentBroker.hpp> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <osl/socket.hxx> #include "ftpcontentprovider.hxx" #include "ftpcontent.hxx" @@ -261,7 +261,7 @@ FTPContentProvider::getHttpProvider() // used for access to ftp-proxy return UniversalContentBroker::create( - comphelper::ComponentContext(m_xSMgr).getUNOContext())-> + comphelper::getComponentContext(m_xSMgr))-> queryContentProvider("http:"); } diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx index 037a8379db09..4ebee9119df8 100644 --- a/ucb/source/ucp/gvfs/gvfs_content.cxx +++ b/ucb/source/ucp/gvfs/gvfs_content.cxx @@ -69,7 +69,7 @@ #include <com/sun/star/ucb/UnsupportedOpenModeException.hpp> #include <com/sun/star/ucb/UnsupportedOpenModeException.hpp> #include <com/sun/star/ucb/NameClashException.hpp> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <ucbhelper/contentidentifier.hxx> #include <ucbhelper/propertyvalueset.hxx> #include <ucbhelper/interactionrequest.hxx> @@ -1450,7 +1450,7 @@ Content::createTempStream( // Something badly wrong happened - can't seek => stream to a temporary file uno::Reference < io::XOutputStream > xTempOut = uno::Reference < io::XOutputStream > - ( io::TempFile::create(comphelper::ComponentContext(m_xSMgr).getUNOContext()), uno::UNO_QUERY ); + ( io::TempFile::create(comphelper::getComponentContext(m_xSMgr)), uno::UNO_QUERY ); if ( !xTempOut.is() ) cancelCommandExecution( GNOME_VFS_ERROR_IO, xEnv ); diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index db824294aa10..5ca37c71461f 100644 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_content.cxx @@ -40,7 +40,7 @@ #include <com/sun/star/ucb/OpenMode.hpp> #include <com/sun/star/ucb/XCommandInfo.hpp> #include <com/sun/star/ucb/XPersistentPropertySet.hpp> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <ucbhelper/contentidentifier.hxx> #include <ucbhelper/propertyvalueset.hxx> #include <ucbhelper/cancelcommandexecution.hxx> @@ -352,7 +352,7 @@ uno::Any SAL_CALL Content::execute( delete m_pContent; m_pContent = new ::ucbhelper::Content (sFileURL,NULL, - comphelper::ComponentContext(m_xSMgr).getUNOContext()); + comphelper::getComponentContext(m_xSMgr)); if(!m_pContent->isDocument()) { rtl::OUString sErrorMsg("File: "); @@ -511,7 +511,7 @@ uno::Any SAL_CALL Content::execute( // Create a new Content object for the "shadow" file // corresponding to the opened document from the DMS. ::ucbhelper::Content aContent(sFileURL.copy(0,nLastIndex),NULL, - comphelper::ComponentContext(m_xSMgr).getUNOContext()); + comphelper::getComponentContext(m_xSMgr)); // aTransferInfo.NameClash = ucb::NameClash::OVERWRITE; aTransferInfo.NewTitle = sFileURL.copy( 1 + nLastIndex ); // Copy our saved backup copy to the "shadow" file. diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx index c3a94836d76a..87532955d52a 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx @@ -37,9 +37,9 @@ #include "rtl/ref.hxx" #include "cppuhelper/weak.hxx" -#include "comphelper/componentcontext.hxx" -#include "comphelper/namedvaluecollection.hxx" #include "comphelper/documentinfo.hxx" +#include "comphelper/namedvaluecollection.hxx" +#include "comphelper/processfactory.hxx" #include "com/sun/star/awt/XTopWindow.hpp" #include "com/sun/star/beans/XPropertySet.hpp" @@ -703,7 +703,7 @@ bool OfficeDocumentsManager::isBasicIDE( try { m_xModuleMgr = frame::ModuleManager::create( - comphelper::ComponentContext(m_xSMgr).getUNOContext()); + comphelper::getComponentContext(m_xSMgr)); } catch ( uno::Exception const & ) { |