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 --- forms/source/xforms/submission/submission_get.cxx | 2 +- forms/source/xforms/submission/submission_post.cxx | 2 +- forms/source/xforms/submission/submission_put.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'forms') diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index ed515834bfab..e7934a1bb594 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -98,7 +98,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference< aUTF8QueryURL.append(aQueryString.makeStringAndClear()); } OUString aQueryURL = OStringToOUString(aUTF8QueryURL.makeStringAndClear(), RTL_TEXTENCODING_UTF8); - ucbhelper::Content aContent(aQueryURL, aEnvironment); + ucbhelper::Content aContent(aQueryURL, aEnvironment, comphelper::ComponentContext(m_aFactory).getUNOContext()); CSS::uno::Reference< XOutputStream > aPipe( CSS::io::Pipe::create(comphelper::ComponentContext(m_aFactory).getUNOContext()), UNO_QUERY_THROW ); aContent.openStream(aPipe); // get reply diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx index ca72e41272c1..da0d35c2f6ec 100644 --- a/forms/source/xforms/submission/submission_post.cxx +++ b/forms/source/xforms/submission/submission_post.cxx @@ -61,7 +61,7 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const CSS::uno::Reference< auto_ptr< CSerialization > apSerialization(createSerialization(aInteractionHandler,aEnvironment)); try { - ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE), aEnvironment); + ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE), aEnvironment, comphelper::getProcessComponentContext()); // use post command OUString aCommandName(RTL_CONSTASCII_USTRINGPARAM("post")); diff --git a/forms/source/xforms/submission/submission_put.cxx b/forms/source/xforms/submission/submission_put.cxx index 8536a43d6403..e1b8d024a9a2 100644 --- a/forms/source/xforms/submission/submission_put.cxx +++ b/forms/source/xforms/submission/submission_put.cxx @@ -57,7 +57,7 @@ CSubmission::SubmissionResult CSubmissionPut::submit(const CSS::uno::Reference< auto_ptr< CSerialization > apSerialization(createSerialization(aInteractionHandler,aEnvironment)); try { - ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE), aEnvironment); + ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE), aEnvironment, comphelper::getProcessComponentContext()); // insert serialized data to content -> PUT CSS::uno::Reference< XInputStream > aInStream = apSerialization->getInputStream(); -- cgit