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 /xmlsecurity | |
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 'xmlsecurity')
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/helper.cxx | 21 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/helper.hxx | 2 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/helper.cxx | 22 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/helper.hxx | 2 | ||||
-rw-r--r-- | xmlsecurity/workben/signaturetest.cxx | 15 |
5 files changed, 0 insertions, 62 deletions
diff --git a/xmlsecurity/tools/standalone/csfit/helper.cxx b/xmlsecurity/tools/standalone/csfit/helper.cxx index 6062c1d79e12..a4dd05aeef74 100644 --- a/xmlsecurity/tools/standalone/csfit/helper.cxx +++ b/xmlsecurity/tools/standalone/csfit/helper.cxx @@ -111,27 +111,6 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "Cannot create intial service manager" ) ; - /*- - * Because of the exception rasied from - * ucbhelper/source/provider/provconf.cxx, lin 323 - * I do not use the content broker at present - ******************************************************************** - //init ucb - if( ::ucb::ContentBroker::get() == NULL ) { - Reference< lang::XMultiServiceFactory > xSvmg( xLocalServiceManager , UNO_QUERY ) ; - OSL_ENSURE( xLocalServiceManager.is() , - "serviceManager - " - "Cannot get multi-service factory" ) ; - - Sequence< Any > args( 2 ) ; - args[ 0 ] <<= OUString( UCB_CONFIGURATION_KEY1_LOCAL ) ; - args[ 1 ] <<= OUString( UCB_CONFIGURATION_KEY2_OFFICE ) ; - if( ! ::ucb::ContentBroker::initialize( xSvmg , args ) ) { - throw RuntimeException( OUString("Cannot inlitialize ContentBroker") , Reference< XInterface >() , Any() ) ; - } - } - ********************************************************************/ - xUsedComponentContext = xLocalComponentContext ; xUsedServiceManager = xLocalServiceManager ; } else { diff --git a/xmlsecurity/tools/standalone/csfit/helper.hxx b/xmlsecurity/tools/standalone/csfit/helper.hxx index 9ff67e54aab5..be52ab950698 100644 --- a/xmlsecurity/tools/standalone/csfit/helper.hxx +++ b/xmlsecurity/tools/standalone/csfit/helper.hxx @@ -24,8 +24,6 @@ #include <cppuhelper/bootstrap.hxx> #include <cppuhelper/implbase1.hxx> #include <cppuhelper/servicefactory.hxx> -#include <ucbhelper/contentbroker.hxx> -#include <ucbhelper/configurationkeys.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/bridge/XUnoUrlResolver.hpp> diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.cxx b/xmlsecurity/tools/standalone/mscsfit/helper.cxx index 61886c6afc0d..6cd492a7be5c 100644 --- a/xmlsecurity/tools/standalone/mscsfit/helper.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/helper.cxx @@ -110,28 +110,6 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "Cannot create intial service manager" ) ; - /*- - * Because of the exception rasied from - * ucbhelper/source/provider/provconf.cxx, lin 323 - * I do not use the content broker at present - ******************************************************************** - //init ucb - if( ::ucb::ContentBroker::get() == NULL ) { - Reference< lang::XMultiServiceFactory > xSvmg( xLocalServiceManager , UNO_QUERY ) ; - OSL_ENSURE( xLocalServiceManager.is() , - "serviceManager - " - "Cannot get multi-service factory" ) ; - - Sequence< Any > args( 2 ) ; - args[ 0 ] <<= OUString( UCB_CONFIGURATION_KEY1_LOCAL ) ; - args[ 1 ] <<= OUString( UCB_CONFIGURATION_KEY2_OFFICE ) ; - if( ! ::ucb::ContentBroker::initialize( xSvmg , args ) ) { - throw RuntimeException( OUString("Cannot inlitialize ContentBroker") , Reference< XInterface >() , Any() ) ; - } - } - ********************************************************************/ - - xUsedComponentContext = xLocalComponentContext ; xUsedServiceManager = xLocalServiceManager ; } else { diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.hxx b/xmlsecurity/tools/standalone/mscsfit/helper.hxx index fa185219307e..e345c92ea887 100644 --- a/xmlsecurity/tools/standalone/mscsfit/helper.hxx +++ b/xmlsecurity/tools/standalone/mscsfit/helper.hxx @@ -23,8 +23,6 @@ #include <cppuhelper/bootstrap.hxx> #include <cppuhelper/implbase1.hxx> #include <cppuhelper/servicefactory.hxx> -#include <ucbhelper/contentbroker.hxx> -#include <ucbhelper/configurationkeys.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/bridge/XUnoUrlResolver.hpp> diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx index f0c45fd95b1d..4adb6cb11b08 100644 --- a/xmlsecurity/workben/signaturetest.cxx +++ b/xmlsecurity/workben/signaturetest.cxx @@ -38,9 +38,6 @@ #include <cppuhelper/bootstrap.hxx> #include <unotools/streamhelper.hxx> -#include <ucbhelper/contentbroker.hxx> -#include <ucbhelper/configurationkeys.hxx> - // Will be in comphelper if CWS MAV09 is integrated #include <comphelper/storagehelper.hxx> @@ -91,18 +88,6 @@ void Main(); OSL_FAIL( "No service manager!" ); return -1; } - - // Init USB - uno::Sequence< uno::Any > aArgs( 2 ); - aArgs[ 0 ] <<= rtl::OUString( UCB_CONFIGURATION_KEY1_LOCAL ); - aArgs[ 1 ] <<= rtl::OUString( UCB_CONFIGURATION_KEY2_OFFICE ); - sal_Bool bSuccess = ::ucb::ContentBroker::initialize( xMSF, aArgs ); - if ( !bSuccess ) - { - OSL_FAIL( "Error creating UCB!" ); - return -1; - } - } catch ( uno::Exception const & ) { |