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 /connectivity/workben | |
parent | fdo#46808, Adapt ucb::UniversalContentBroker UNO service to new style (diff) | |
download | core-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 'connectivity/workben')
-rw-r--r-- | connectivity/workben/testmoz/main.cxx | 15 | ||||
-rw-r--r-- | connectivity/workben/testmoz/mozthread.cxx | 1 |
2 files changed, 4 insertions, 12 deletions
diff --git a/connectivity/workben/testmoz/main.cxx b/connectivity/workben/testmoz/main.cxx index 2faf51609b2f..10e9bc8af060 100644 --- a/connectivity/workben/testmoz/main.cxx +++ b/connectivity/workben/testmoz/main.cxx @@ -41,7 +41,6 @@ #include <com/sun/star/uno/Any.hxx> #include "connectivity/sqlnode.hxx" -#include <ucbhelper/contentbroker.hxx> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> #include <osl/process.h> @@ -49,9 +48,8 @@ #include <cppuhelper/bootstrap.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/registry/XImplementationRegistration.hpp> -#include <com/sun/star/ucb/XContentProviderManager.hpp> +#include <com/sun/star/ucb/XUniversalContentBroker.hpp> -#include <ucbhelper/content.hxx> #include <osl/module.h> #include <stdio.h> @@ -76,7 +74,6 @@ using ::rtl::OUStringBuffer; using ::rtl::OUStringToOString; #define OUtoCStr( x ) (OUStringToOString ( (x), RTL_TEXTENCODING_ASCII_US ).getStr()) -Reference< XContentProviderManager > globalUcb; #define PRINTSTR(x) printf("%s",x); int autoTest(Reference<XResultSet> &xRes); @@ -258,17 +255,13 @@ Reference< XMultiServiceFactory > InitializeFac( void ) // Create unconfigured Ucb: - Sequence< Any > aArgs; - ::ucb::ContentBroker::initialize( xSMgr, aArgs ); - Reference< XContentProviderManager > xUcb = - ucb::ContentBroker::get()->getContentProviderManagerInterface(); + Reference< XUniversalContentBroker > xUcb + ( xSMgr->createInstance( OUString("com.sun.star.ucb.UniversalContentBroker") ), UNO_QUERY_THROW ); Reference< XContentProvider > xFileProvider - ( xSMgr->createInstance( OUString("com.sun.star.ucb.FileContentProvider") ), UNO_QUERY ); + ( xSMgr->createInstance( OUString("com.sun.star.ucb.FileContentProvider") ), UNO_QUERY_THROW ); xUcb->registerContentProvider( xFileProvider, OUString("file"), sal_True ); - - globalUcb = xUcb; return xSMgr; } diff --git a/connectivity/workben/testmoz/mozthread.cxx b/connectivity/workben/testmoz/mozthread.cxx index 00e369a79b45..738582a3bc32 100644 --- a/connectivity/workben/testmoz/mozthread.cxx +++ b/connectivity/workben/testmoz/mozthread.cxx @@ -41,7 +41,6 @@ #include <com/sun/star/uno/Any.hxx> #include "connectivity/sqlnode.hxx" -#include <ucbhelper/contentbroker.hxx> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> #include <osl/process.h> |