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 /extensions | |
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 'extensions')
-rw-r--r-- | extensions/source/bibliography/datman.cxx | 7 | ||||
-rw-r--r-- | extensions/source/plugin/base/xplugin.cxx | 4 | ||||
-rw-r--r-- | extensions/source/update/check/updateprotocoltest.cxx | 6 | ||||
-rw-r--r-- | extensions/source/update/feed/test/updatefeedtest.cxx | 6 | ||||
-rw-r--r-- | extensions/source/update/feed/updatefeed.cxx | 2 |
5 files changed, 10 insertions, 15 deletions
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 58dd7e40fabe..2b04564d3538 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -50,11 +50,6 @@ #include <com/sun/star/form/XGridColumnFactory.hpp> #include <com/sun/star/io/XDataInputStream.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/ucb/XContentProvider.hpp> -#include <com/sun/star/ucb/XContentAccess.hpp> -#include <ucbhelper/contentbroker.hxx> -#include <ucbhelper/content.hxx> -#include <ucbhelper/contentidentifier.hxx> #include <comphelper/container.hxx> #include <svl/urihelper.hxx> #include <svtools/svtabbx.hxx> @@ -91,9 +86,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::form; using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::lang; -using namespace ::ucb; #define C2U(cChar) ::rtl::OUString::createFromAscii(cChar) diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index f799acae6ca1..9192f2f67252 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -44,6 +44,7 @@ #include <com/sun/star/plugin/PluginManager.hpp> #include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <plugin/impl.hxx> #include <tools/fsys.hxx> #include <ucbhelper/content.hxx> @@ -1039,7 +1040,8 @@ void PluginInputStream::load() m_pContent = new ::ucbhelper::Content( aUrl.GetMainURL(INetURLObject::DECODE_TO_IURI), - uno::Reference< com::sun::star::ucb::XCommandEnvironment >() + uno::Reference< com::sun::star::ucb::XCommandEnvironment >(), + comphelper::getProcessComponentContext() ); m_pContent->openStream( static_cast< XOutputStream* >( this ) ); } diff --git a/extensions/source/update/check/updateprotocoltest.cxx b/extensions/source/update/check/updateprotocoltest.cxx index a1556769567f..69113b9a98c3 100644 --- a/extensions/source/update/check/updateprotocoltest.cxx +++ b/extensions/source/update/check/updateprotocoltest.cxx @@ -48,9 +48,9 @@ SAL_IMPLEMENT_MAIN() // create the initial component context uno::Reference< uno::XComponentContext > rComponentContext = cppu::defaultBootstrap_InitialComponentContext(); - // initialize UCB - uno::Reference< uno::XUniversalContentBroker > xUCB = - UniversalContentBroker::createWithKeys(rComponentContext, theArguments, "Local", "Office"); + // initialize UCB (for backwards compatibility, in case some code still uses + // plain createInstance w/o args directly to obtain an instance): + com::sun::star::ucb::UniversalContentBroker::create(rComponentContext); rtl::OUString aURL; diff --git a/extensions/source/update/feed/test/updatefeedtest.cxx b/extensions/source/update/feed/test/updatefeedtest.cxx index 71c0508b70aa..c2bedb087a2b 100644 --- a/extensions/source/update/feed/test/updatefeedtest.cxx +++ b/extensions/source/update/feed/test/updatefeedtest.cxx @@ -55,9 +55,9 @@ SAL_IMPLEMENT_MAIN() // create the initial component context uno::Reference< uno::XComponentContext > rComponentContext = cppu::defaultBootstrap_InitialComponentContext(); - // initialize UCB - uno::Reference< uno::XUniversalContentBroker > xUCB = - ucb::UniversalContentBroker::createWithKeys(rComponentContext, "Local", "Office"); + // initialize UCB (for backwards compatibility, in case some code still uses + // plain createInstance w/o args directly to obtain an instance): + ucb::UniversalContentBroker::create(rComponentContext); // retrieve the update information provider uno::Reference< deployment::XUpdateInformationProvider > rUpdateInformationProvider = diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index 646e2f07236d..65016a64af66 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -408,7 +408,7 @@ UpdateInformationProvider::createInstance(const uno::Reference<uno::XComponentCo uno::Reference< uno::XInterface > ()); uno::Reference< ucb::XUniversalContentBroker > xUniversalContentBroker = - ucb::UniversalContentBroker::createDefault(xContext); + ucb::UniversalContentBroker::create(xContext); uno::Reference< xml::dom::XDocumentBuilder > xDocumentBuilder( xml::dom::DocumentBuilder::create(xContext)); |