diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-14 18:08:57 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-14 18:24:49 +0200 |
commit | 9ac86f484b0c278aafbce685ed19d3ea005ee8f8 (patch) | |
tree | cf2fe16d76992bcbd1bd89a8693c5f4996cd55f2 /sfx2/source/bastyp | |
parent | 2e284203da7f9882842111265f5f68ea0a145065 (diff) |
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
Diffstat (limited to 'sfx2/source/bastyp')
-rw-r--r-- | sfx2/source/bastyp/helper.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx index 94b2e51be41c..2a01bf3f432b 100644 --- a/sfx2/source/bastyp/helper.cxx +++ b/sfx2/source/bastyp/helper.cxx @@ -82,7 +82,7 @@ uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL ) StringList_Impl* pList = NULL; try { - ::ucbhelper::Content aCnt( rURL, uno::Reference< ucb::XCommandEnvironment >() ); + ::ucbhelper::Content aCnt( rURL, uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); uno::Reference< sdbc::XResultSet > xResultSet; uno::Reference< ucb::XDynamicResultSet > xDynResultSet; uno::Sequence< OUString > aProps(3); @@ -173,7 +173,7 @@ uno::Sequence< OUString > SfxContentHelper::GetHelpTreeViewContents( const Strin uno::Reference< task::XInteractionHandler > xInteractionHandler = uno::Reference< task::XInteractionHandler > ( xFactory->createInstance( "com.sun.star.task.InteractionHandler" ), uno::UNO_QUERY ); - ::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ) ); + ::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ), comphelper::getProcessComponentContext() ); uno::Reference< sdbc::XResultSet > xResultSet; uno::Sequence< OUString > aProps(2); OUString* pProps = aProps.getArray(); @@ -256,7 +256,7 @@ String SfxContentHelper::GetActiveHelpString( const String& rURL ) uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); uno::Reference< task::XInteractionHandler > xInteractionHandler = uno::Reference< task::XInteractionHandler > ( xFactory->createInstance( "com.sun.star.task.InteractionHandler" ), uno::UNO_QUERY ); - ::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ) ); + ::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ), comphelper::getProcessComponentContext() ); // open the "active help" stream uno::Reference< io::XInputStream > xStream = aCnt.openStream(); // and convert it to a String @@ -288,7 +288,8 @@ sal_Bool SfxContentHelper::IsHelpErrorDocument( const String& rURL ) try { ::ucbhelper::Content aCnt( INetURLObject( rURL ).GetMainURL( INetURLObject::NO_DECODE ), - uno::Reference< ucb::XCommandEnvironment > () ); + uno::Reference< ucb::XCommandEnvironment >(), + comphelper::getProcessComponentContext() ); if ( !( aCnt.getPropertyValue( "IsErrorDocument" ) >>= bRet ) ) { SAL_WARN( "sfx2.bastyp", "Property 'IsErrorDocument' is missing" ); @@ -311,7 +312,7 @@ sal_uIntPtr SfxContentHelper::GetSize( const String& rContent ) DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); try { - ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () ); + ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); aCnt.getPropertyValue( "Size" ) >>= nTemp; } catch( const ucb::CommandAbortedException& ) |