diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-13 11:01:15 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-14 18:24:48 +0200 |
commit | 2e284203da7f9882842111265f5f68ea0a145065 (patch) | |
tree | 40eb08bffa732c6371bb15eff73a8d2ff18859a3 /basic/source/runtime | |
parent | 82e94dcaab4534f657458a2461033d686f10cb10 (diff) |
fdo#46808, Adapt ucb::UniversalContentBroker UNO service to new style
Create a merged XUniversalContentBroker interface for this service to implement.
Which is backwards-compatible, but does not require creating a new service.
Change-Id: Id264387bf8af8bf211050e15b8801a1fde368167
Diffstat (limited to 'basic/source/runtime')
-rw-r--r-- | basic/source/runtime/iosys.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 893ba364d75b..4ac4fa400c15 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -44,6 +44,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> +#include <com/sun/star/ucb/UniversalContentBroker.hpp> #include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/ucb/XContentProvider.hpp> #include <com/sun/star/ucb/XContentProviderManager.hpp> @@ -276,18 +277,17 @@ bool hasUno( void ) if( bNeedInit ) { bNeedInit = false; - Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); - if( !xSMgr.is() ) + Reference< XComponentContext > xContext = getProcessComponentContext(); + if( !xContext.is() ) { // No service manager at all bRetVal = false; } else { - Reference< XContentProviderManager > xManager( xSMgr->createInstance( - ::rtl::OUString( "com.sun.star.ucb.UniversalContentBroker" ) ), UNO_QUERY ); + Reference< XUniversalContentBroker > xManager = UniversalContentBroker::createDefault(xContext); - if ( !( xManager.is() && xManager->queryContentProvider( ::rtl::OUString("file:///" ) ).is() ) ) + if ( !( xManager->queryContentProvider( ::rtl::OUString("file:///" ) ).is() ) ) { // No UCB bRetVal = false; |