summaryrefslogtreecommitdiff
path: root/extensions/source/logging
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-11-14 22:07:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-11-14 22:07:23 +0100
commit8b75883b87c9f7989f98fb413f5e51200c52891c (patch)
tree5eaf6d052d25c61654b4e06ffb67784eab9d263b /extensions/source/logging
parentf72516ed25d25963f497396985d56344eb3ff465 (diff)
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.
Diffstat (limited to 'extensions/source/logging')
-rw-r--r--extensions/source/logging/loggerconfig.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx
index a8d216162677..eb97216536f6 100644
--- a/extensions/source/logging/loggerconfig.cxx
+++ b/extensions/source/logging/loggerconfig.cxx
@@ -32,6 +32,7 @@
#include "loggerconfig.hxx"
/** === begin UNO includes === **/
+#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
@@ -214,11 +215,9 @@ namespace logging
if ( !_rxLogger.is() )
throw NullPointerException();
- // the configuration provider
- Reference< XMultiServiceFactory > xConfigProvider;
- ::rtl::OUString sConfigProvServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ) );
- if ( !_rContext.createComponent( sConfigProvServiceName, xConfigProvider ) )
- throw ServiceNotRegisteredException( sConfigProvServiceName, _rxLogger );
+ Reference< XMultiServiceFactory > xConfigProvider(
+ com::sun::star::configuration::theDefaultProvider::get(
+ _rContext.getUNOContext()));
// write access to the "Settings" node (which includes settings for all loggers)
Sequence< Any > aArguments(1);