summaryrefslogtreecommitdiffstats
path: root/comphelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-14 18:08:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-14 18:24:49 +0200
commit9ac86f484b0c278aafbce685ed19d3ea005ee8f8 (patch)
treecf2fe16d76992bcbd1bd89a8693c5f4996cd55f2 /comphelper
parentfdo#46808, Adapt ucb::UniversalContentBroker UNO service to new style (diff)
downloadcore-9ac86f484b0c278aafbce685ed19d3ea005ee8f8.tar.gz
core-9ac86f484b0c278aafbce685ed19d3ea005ee8f8.zip
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 'comphelper')
-rw-r--r--comphelper/source/misc/mediadescriptor.cxx6
-rw-r--r--comphelper/source/misc/storagehelper.cxx3
2 files changed, 5 insertions, 4 deletions
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index 311ff5e0dc76..dd91d9e716b5 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -353,7 +353,7 @@ sal_Bool MediaDescriptor::isStreamReadOnly() const
bReadOnly = sal_True;
else
{
- ::ucbhelper::Content aContent(xContent, css::uno::Reference< css::ucb::XCommandEnvironment >());
+ ::ucbhelper::Content aContent(xContent, css::uno::Reference< css::ucb::XCommandEnvironment >(), getProcessComponentContext());
aContent.getPropertyValue(CONTENTPROP_ISREADONLY) >>= bReadOnly;
}
}
@@ -526,7 +526,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference
xSeek->seek( 0 );
// a content for the URL
- ::ucbhelper::Content aContent( sURL, xCommandEnv );
+ ::ucbhelper::Content aContent( sURL, xCommandEnv, getProcessComponentContext() );
// use post command
css::ucb::PostCommandArgument2 aPostArgument;
@@ -579,7 +579,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const ::rtl::OUString& sURL, s
css::uno::Reference< css::ucb::XContent > xContent;
try
{
- aContent = ::ucbhelper::Content(sURL, xCommandEnv);
+ aContent = ::ucbhelper::Content(sURL, xCommandEnv, getProcessComponentContext());
xContent = aContent.get();
}
catch(const css::uno::RuntimeException&)
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index 785d4b26dea2..e4a1048622c7 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -141,7 +141,8 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageFromURL2(
uno::Reference< lang::XSingleServiceFactory > xFact;
try {
::ucbhelper::Content aCntnt( aURL,
- uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > (),
+ getProcessComponentContext() );
if (aCntnt.isDocument()) {
xFact = GetStorageFactory( xFactory );
} else {