summaryrefslogtreecommitdiff
path: root/svx/source/gengal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-14 18:08:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-14 18:24:49 +0200
commit9ac86f484b0c278aafbce685ed19d3ea005ee8f8 (patch)
treecf2fe16d76992bcbd1bd89a8693c5f4996cd55f2 /svx/source/gengal
parent2e284203da7f9882842111265f5f68ea0a145065 (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 'svx/source/gengal')
-rw-r--r--svx/source/gengal/gengal.cxx21
1 files changed, 4 insertions, 17 deletions
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 1ec70287e9da..21b86b874c51 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -42,9 +42,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
-
-#include <ucbhelper/contentbroker.hxx>
-#include <ucbhelper/configurationkeys.hxx>
+#include <com/sun/star/ucb/UniversalContentBroker.hpp>
#include <tools/urlobj.hxx>
#include <tools/fsys.hxx>
@@ -80,7 +78,6 @@ public:
protected:
Reference<XMultiServiceFactory> xMSF;
void Init();
- void InitUCB();
};
Gallery* createGallery( const rtl::OUString& aGalleryURL )
@@ -217,19 +214,9 @@ void GalApp::Init()
fprintf( stderr, "Failed to bootstrap\n" );
::comphelper::setProcessServiceFactory( xMSF );
- InitUCB();
-}
-
-void GalApp::InitUCB()
-{
- Sequence< Any > aArgs(2);
- aArgs[0]
- <<= rtl::OUString(UCB_CONFIGURATION_KEY1_LOCAL);
- aArgs[1]
- <<= rtl::OUString(UCB_CONFIGURATION_KEY2_OFFICE);
-
- if (! ::ucbhelper::ContentBroker::initialize( xMSF, aArgs ) )
- fprintf( stderr, "Failed to init content broker\n" );
+ // 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(xComponentContext);
}
int GalApp::Main()