From a3bb733ec6c6af04041c0b2a9849df22c26b3d29 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 27 Feb 2013 15:16:02 +0200 Subject: fdo#46808, Convert singleton theMasterScriptProviderFactory Change-Id: I647a02e552acdd354463fc46c13c5a73b1c90d09 --- desktop/source/deployment/registry/sfwk/dp_sfwk.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'desktop') diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx index e414e8558866..9a6c3b2ffc54 100644 --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -27,7 +27,7 @@ #include "comphelper/servicedecl.hxx" #include "svl/inettype.hxx" #include -#include +#include #include #include @@ -304,17 +304,13 @@ void BackendImpl::PackageImpl:: initPackageHandler() // NOT supported at the momemtn // TODO } - Reference< provider::XScriptProviderFactory > xFac( - that->getComponentContext()->getValueByName( - "/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory"), UNO_QUERY ); + Reference< provider::XScriptProviderFactory > xFac = + provider::theMasterScriptProviderFactory::get( that->getComponentContext() ); - if ( xFac.is() ) + Reference< container::XNameContainer > xName( xFac->createScriptProvider( aContext ), UNO_QUERY ); + if ( xName.is() ) { - Reference< container::XNameContainer > xName( xFac->createScriptProvider( aContext ), UNO_QUERY ); - if ( xName.is() ) - { - m_xNameCntrPkgHandler.set( xName ); - } + m_xNameCntrPkgHandler.set( xName ); } // TODO what happens if above fails?? } -- cgit