diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-10-31 18:24:08 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-31 18:27:36 +0100 |
commit | c936fcb0f3e1048e3b7085b1564f8e1f24a44f16 (patch) | |
tree | df000d128097bf845ed3379d4cd1899e6bc87466 /configmgr | |
parent | 56d7afee15ccd57b6c9ed31ad4bd071a6e66f075 (diff) |
Some more configuration::theDefaultProvider simplifications
Change-Id: I91ded7801f4959f2dac7b5b3e4c8d1f3929f4ed9
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/configurationprovider.cxx | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx index c9043ea6e8f2..db10168e4b8f 100644 --- a/configmgr/source/configurationprovider.cxx +++ b/configmgr/source/configurationprovider.cxx @@ -25,6 +25,7 @@ #include "boost/noncopyable.hpp" #include "com/sun/star/beans/NamedValue.hpp" #include "com/sun/star/beans/PropertyValue.hpp" +#include "com/sun/star/configuration/theDefaultProvider.hpp" #include "com/sun/star/lang/EventObject.hpp" #include "com/sun/star/lang/Locale.hpp" #include "com/sun/star/lang/XLocalizable.hpp" @@ -32,7 +33,6 @@ #include "com/sun/star/lang/XServiceInfo.hpp" #include "com/sun/star/lang/XSingleComponentFactory.hpp" #include "com/sun/star/uno/Any.hxx" -#include "com/sun/star/uno/DeploymentException.hpp" #include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/RuntimeException.hpp" @@ -432,23 +432,7 @@ Factory::createInstanceWithArgumentsAndContext( throw (css::uno::Exception, css::uno::RuntimeException) { if (Arguments.getLength() == 0) { - css::uno::Reference< css::uno::XInterface > instance; - if (!(Context->getValueByName( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "/singletons/" - "com.sun.star.configuration.theDefaultProvider"))) - >>= instance) || - !instance.is()) - { - throw css::uno::DeploymentException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "component context fails to supply singleton" - " com.sun.star.configuration.theDefaultProvider")), - Context); - } - return instance; + return css::configuration::theDefaultProvider::get(Context); } else { rtl::OUString locale; for (sal_Int32 i = 0; i < Arguments.getLength(); ++i) { |