summaryrefslogtreecommitdiff
path: root/ucbhelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-06-04 16:35:09 +0200
committerNoel Grandin <noel@peralex.com>2013-06-05 08:13:23 +0200
commita1afcae81ca3c4b6bb240263b3259090d48c7715 (patch)
tree6045b67820afbf70fad99781b9e2126206bbe66e /ucbhelper
parent546fa9f365ef1b19abe6739d2f42389f82576437 (diff)
fdo#46808, Convert XMultiServiceFactory in ucb module
Change-Id: I4e1cfe22ba6043521dd1237f90ade66f80b29253
Diffstat (limited to 'ucbhelper')
-rw-r--r--ucbhelper/source/provider/registerucb.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/ucbhelper/source/provider/registerucb.cxx b/ucbhelper/source/provider/registerucb.cxx
index 944fe01f1abc..a17e0ad8bd6f 100644
--- a/ucbhelper/source/provider/registerucb.cxx
+++ b/ucbhelper/source/provider/registerucb.cxx
@@ -42,14 +42,14 @@ namespace ucbhelper {
bool
registerAtUcb(
uno::Reference< ucb::XContentProviderManager > const & rManager,
- uno::Reference< lang::XMultiServiceFactory > const & rServiceFactory,
+ uno::Reference< uno::XComponentContext > const & rxContext,
OUString const & rName,
OUString const & rArguments,
OUString const & rTemplate,
ContentProviderRegistrationInfo * pInfo)
throw (uno::RuntimeException)
{
- OSL_ENSURE(rServiceFactory.is(),
+ OSL_ENSURE(rxContext.is(),
"ucb::registerAtUcb(): No service factory");
bool bNoProxy = rArguments.startsWith("{noproxy}");
@@ -66,13 +66,7 @@ registerAtUcb(
uno::Reference< ucb::XContentProviderFactory > xProxyFactory;
try
{
- uno::Reference< beans::XPropertySet > xFactoryProperties( rServiceFactory, uno::UNO_QUERY_THROW );
- uno::Reference< uno::XComponentContext > xContext = uno::Reference< uno::XComponentContext >(
- xFactoryProperties->getPropertyValue( OUString( "DefaultContext" ) ),
- uno::UNO_QUERY );
- xProxyFactory
- = uno::Reference< ucb::XContentProviderFactory >(
- ucb::ContentProviderProxyFactory::create( xContext ) );
+ xProxyFactory = ucb::ContentProviderProxyFactory::create( rxContext );
}
catch (uno::Exception const &) {}
OSL_ENSURE(xProxyFactory.is(), "No ContentProviderProxyFactory");
@@ -85,7 +79,7 @@ registerAtUcb(
try
{
xProvider = uno::Reference< ucb::XContentProvider >(
- rServiceFactory->createInstance(rName),
+ rxContext->getServiceManager()->createInstanceWithContext(rName, rxContext),
uno::UNO_QUERY);
}
catch (uno::RuntimeException const &) { throw; }