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 /padmin/source/pamain.cxx | |
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 'padmin/source/pamain.cxx')
-rw-r--r-- | padmin/source/pamain.cxx | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/padmin/source/pamain.cxx b/padmin/source/pamain.cxx index bbfd616ed4c4..4eb997a0697e 100644 --- a/padmin/source/pamain.cxx +++ b/padmin/source/pamain.cxx @@ -30,12 +30,11 @@ #include "cppuhelper/bootstrap.hxx" #include "comphelper/processfactory.hxx" -#include "ucbhelper/contentbroker.hxx" -#include "ucbhelper/configurationkeys.hxx" #include "unotools/configmgr.hxx" #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/lang/XComponent.hpp" +#include "com/sun/star/ucb/UniversalContentBroker.hpp" using namespace padmin; using namespace cppu; @@ -108,24 +107,9 @@ int MyApp::Main() com::sun::star::uno::setCurrentContext( new DesktopContext( com::sun::star::uno::getCurrentContext() ) ); - /* - * Create UCB. - */ - Sequence< Any > aArgs( 2 ); - aArgs[ 0 ] <<= OUString( UCB_CONFIGURATION_KEY1_LOCAL ); - aArgs[ 1 ] <<= OUString( UCB_CONFIGURATION_KEY2_OFFICE ); -#if OSL_DEBUG_LEVEL > 1 - sal_Bool bSuccess = -#endif - ::ucbhelper::ContentBroker::initialize( xFactory, aArgs ); - -#if OSL_DEBUG_LEVEL > 1 - if ( !bSuccess ) - { - fprintf( stderr, "Error creating UCB, installation must be in disorder. Exiting.\n" ); - exit( 1 ); - } -#endif + // Create 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(xCtx); /* * Initialize the Java UNO AccessBridge if accessibility is turned on @@ -148,11 +132,6 @@ int MyApp::Main() delete pPADialog; /* - * clean up UCB - */ - ::ucbhelper::ContentBroker::deinitialize(); - - /* * clean up UNO */ try |