diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-27 15:16:02 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-03-07 08:23:39 +0200 |
commit | a3bb733ec6c6af04041c0b2a9849df22c26b3d29 (patch) | |
tree | 4eebd3cafbed5f1d401afcb378928bed7781f072 /desktop | |
parent | cd8ea20aa4b85128956a79c80f7953d30e99e802 (diff) |
fdo#46808, Convert singleton theMasterScriptProviderFactory
Change-Id: I647a02e552acdd354463fc46c13c5a73b1c90d09
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/registry/sfwk/dp_sfwk.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
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 <com/sun/star/container/XNameContainer.hpp> -#include <com/sun/star/script/provider/XScriptProviderFactory.hpp> +#include <com/sun/star/script/provider/theMasterScriptProviderFactory.hpp> #include <com/sun/star/xml/sax/Parser.hpp> #include <memory> @@ -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?? } |