From 9ac86f484b0c278aafbce685ed19d3ea005ee8f8 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 14 Sep 2012 18:08:57 +0200 Subject: Improvement on previous commit, UCB clean up * As UCB is only ever initialized with "Local"/"Office", remove this configuration vector completely. The "create" ctor creates an instance internally initialized with those "Local"/"Office" keys. Special (test) code can still instantiate an uninitialized one via plain createInstance. And for backwards compatilibity process startup still ensures to create an initialized instance early, in case there is still code out there (in extensions) that later calls plain createInstance and expects to get the already-initialized (single) instance. * XInitialization is an "implementation detail" of the UniversalContentBroker service, do not expose in XUniversalContentBroker. * ucbhelper/configurationkeys.hxx is no longer needed and is removed. * ucbhelper/contentbroker.hxx is an empty wrapper and is removed; however, that requires ucbhelper::Content constructors to take explicit XComponentContext arguments now. * The only remaining code in ucbhelper/source/client/contentbroker.cxx is Android-only InitUCBHelper. Is that relevant still? Change-Id: I3f7bddd0456bffbcd13590c66d9011915c760f28 --- ucb/source/ucp/ext/ucpext_content.cxx | 4 ++-- ucb/source/ucp/ext/ucpext_datasupplier.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ucb/source/ucp/ext') diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 6e47cad61aa9..290a49570c6d 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -286,7 +286,7 @@ namespace ucb { namespace ucp { namespace ext if ( aOpenCommand.Sink.is() ) { const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() ); - ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment ); + ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment, comphelper::ComponentContext(m_xSMgr).getUNOContext() ); aRet = aRequestedContent.executeCommand( ::rtl::OUString( "open" ), makeAny( aOpenCommand ) ); } } @@ -502,7 +502,7 @@ namespace ucb { namespace ucp { namespace ext case E_EXTENSION_CONTENT: { const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() ); - ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnv ); + ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnv, comphelper::ComponentContext(m_xSMgr).getUNOContext() ); // 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 29356a7e68e5..aec7058c1f24 100644 --- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx +++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx @@ -178,7 +178,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() ); + ::ucbhelper::Content aWrappedContent( sPackageLocation, getResultSet()->getEnvironment(), comphelper::ComponentContext(m_pImpl->m_xSMgr).getUNOContext() ); // obtain the properties which our result set is set up for from the wrapped content Sequence< ::rtl::OUString > aPropertyNames(1); -- cgit