From 8b75883b87c9f7989f98fb413f5e51200c52891c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 14 Nov 2011 22:07:23 +0100 Subject: Simplified some uses of css.configuration.theDefaultProvider. * Retro-added new-style UNOIDL singleton specification for it, for easy instantiation. * Plus new comphelper::getComponentContext to map from XMultiServiceFactory to XComponentContext. --- configmgr/qa/unit/test.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'configmgr') diff --git a/configmgr/qa/unit/test.cxx b/configmgr/qa/unit/test.cxx index fe8d29e9ef88..f645517a3426 100644 --- a/configmgr/qa/unit/test.cxx +++ b/configmgr/qa/unit/test.cxx @@ -36,6 +36,7 @@ #include "com/sun/star/beans/XPropertyChangeListener.hpp" #include "com/sun/star/beans/XPropertySet.hpp" #include "com/sun/star/beans/XPropertyState.hpp" +#include "com/sun/star/configuration/theDefaultProvider.hpp" #include "com/sun/star/container/XHierarchicalNameAccess.hpp" #include "com/sun/star/container/XNameReplace.hpp" #include "com/sun/star/container/XNamed.hpp" @@ -371,13 +372,7 @@ void Test::setUp() { css::uno::UNO_QUERY_THROW)->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext"))), css::uno::UNO_QUERY_THROW); - CPPUNIT_ASSERT( - context_->getValueByName( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "/singletons/" - "com.sun.star.configuration.theDefaultProvider"))) >>= - provider_); + provider_ = css::configuration::theDefaultProvider::get(context_); } void Test::tearDown() { -- cgit