summaryrefslogtreecommitdiff
path: root/configmgr/source/configurationprovider.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'configmgr/source/configurationprovider.cxx')
-rw-r--r--configmgr/source/configurationprovider.cxx24
1 files changed, 17 insertions, 7 deletions
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index cccb74658c..6b8d967e92 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -56,7 +56,7 @@
#include "cppu/unotype.hxx"
#include "cppuhelper/compbase5.hxx"
#include "cppuhelper/factory.hxx"
-#include "cppuhelper/implbase1.hxx"
+#include "cppuhelper/implbase2.hxx"
#include "cppuhelper/interfacecontainer.hxx"
#include "cppuhelper/weak.hxx"
#include "osl/diagnose.h"
@@ -129,7 +129,6 @@ private:
virtual css::uno::Sequence< rtl::OUString > SAL_CALL
getSupportedServiceNames() throw (css::uno::RuntimeException)
{ return configuration_provider::getSupportedServiceNames(); }
- //TODO: DefaultProvider?
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(
rtl::OUString const & aServiceSpecifier)
@@ -279,8 +278,7 @@ Service::createInstanceWithArguments(
static_cast< cppu::OWeakObject * >(this));
}
osl::MutexGuard guard(*lock_);
- Components::initSingleton(context_);
- Components & components = Components::getSingleton();
+ Components & components = Components::getSingleton(context_);
rtl::Reference< RootAccess > root(
new RootAccess(components, nodepath, locale, update));
if (root->isValue()) {
@@ -391,14 +389,14 @@ void Service::flushModifications() const {
Components * components;
{
osl::MutexGuard guard(*lock_);
- Components::initSingleton(context_);
- components = &Components::getSingleton();
+ components = &Components::getSingleton(context_);
}
components->flushModifications();
}
class Factory:
- public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >,
+ public cppu::WeakImplHelper2<
+ css::lang::XSingleComponentFactory, css::lang::XServiceInfo >,
private boost::noncopyable
{
public:
@@ -417,6 +415,18 @@ private:
css::uno::Sequence< css::uno::Any > const & Arguments,
css::uno::Reference< css::uno::XComponentContext > const & Context)
throw (css::uno::Exception, css::uno::RuntimeException);
+
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException)
+ { return configuration_provider::getImplementationName(); }
+
+ virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName)
+ throw (css::uno::RuntimeException)
+ { return ServiceName == getSupportedServiceNames()[0]; } //TODO
+
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames() throw (css::uno::RuntimeException)
+ { return configuration_provider::getSupportedServiceNames(); }
};
css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext(