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.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index ed50642994d9..cccb74658c11 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -109,6 +109,7 @@ public:
ServiceBase(*static_cast< osl::Mutex * >(this)), context_(context),
locale_(locale)
{
+ lock_ = lock();
OSL_ASSERT(context.is());
}
@@ -173,6 +174,7 @@ private:
css::uno::Reference< css::uno::XComponentContext > context_;
rtl::OUString locale_;
+ boost::shared_ptr<osl::Mutex> lock_;
};
css::uno::Reference< css::uno::XInterface > Service::createInstance(
@@ -276,7 +278,7 @@ Service::createInstanceWithArguments(
ServiceSpecifier),
static_cast< cppu::OWeakObject * >(this));
}
- osl::MutexGuard guard(lock);
+ osl::MutexGuard guard(*lock_);
Components::initSingleton(context_);
Components & components = Components::getSingleton();
rtl::Reference< RootAccess > root(
@@ -358,13 +360,13 @@ void Service::removeFlushListener(
void Service::setLocale(css::lang::Locale const & eLocale)
throw (css::uno::RuntimeException)
{
- osl::MutexGuard guard(lock);
+ osl::MutexGuard guard(*lock_);
locale_ = comphelper::Locale(
eLocale.Language, eLocale.Country, eLocale.Variant).toISO();
}
css::lang::Locale Service::getLocale() throw (css::uno::RuntimeException) {
- osl::MutexGuard guard(lock);
+ osl::MutexGuard guard(*lock_);
css::lang::Locale loc;
if (locale_.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("*"))) {
loc.Language = locale_;
@@ -388,7 +390,7 @@ css::lang::Locale Service::getLocale() throw (css::uno::RuntimeException) {
void Service::flushModifications() const {
Components * components;
{
- osl::MutexGuard guard(lock);
+ osl::MutexGuard guard(*lock_);
Components::initSingleton(context_);
components = &Components::getSingleton();
}