summaryrefslogtreecommitdiff
path: root/configmgr/source/childaccess.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'configmgr/source/childaccess.cxx')
-rw-r--r--configmgr/source/childaccess.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx
index 65cb9fc2e53f..68bc0b01351c 100644
--- a/configmgr/source/childaccess.cxx
+++ b/configmgr/source/childaccess.cxx
@@ -70,7 +70,8 @@ ChildAccess::ChildAccess(
rtl::Reference< Access > const & parent, OUString const & name,
rtl::Reference< Node > const & node):
Access(components), root_(root), parent_(parent), name_(name), node_(node),
- inTransaction_(false)
+ inTransaction_(false),
+ lock_( lock() )
{
assert(root.is() && parent.is() && node.is());
}
@@ -78,7 +79,8 @@ ChildAccess::ChildAccess(
ChildAccess::ChildAccess(
Components & components, rtl::Reference< RootAccess > const & root,
rtl::Reference< Node > const & node):
- Access(components), root_(root), node_(node), inTransaction_(false)
+ Access(components), root_(root), node_(node), inTransaction_(false),
+ lock_( lock() )
{
assert(root.is() && node.is());
}
@@ -146,7 +148,7 @@ void ChildAccess::release() throw () {
css::uno::Reference< css::uno::XInterface > ChildAccess::getParent()
{
assert(thisIs(IS_ANY));
- osl::MutexGuard g(theConfigLock());
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return static_cast< cppu::OWeakObject * >(parent_.get());
}
@@ -154,7 +156,7 @@ css::uno::Reference< css::uno::XInterface > ChildAccess::getParent()
void ChildAccess::setParent(css::uno::Reference< css::uno::XInterface > const &)
{
assert(thisIs(IS_ANY));
- osl::MutexGuard g(theConfigLock());
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
throw css::lang::NoSupportException(
"setParent", static_cast< cppu::OWeakObject * >(this));
@@ -164,7 +166,7 @@ sal_Int64 ChildAccess::getSomething(
css::uno::Sequence< sal_Int8 > const & aIdentifier)
{
assert(thisIs(IS_ANY));
- osl::MutexGuard g(theConfigLock());
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
return aIdentifier == getTunnelId()
? reinterpret_cast< sal_Int64 >(this) : 0;
@@ -312,7 +314,7 @@ void ChildAccess::commitChanges(bool valid, Modifications * globalModifications)
}
ChildAccess::~ChildAccess() {
- osl::MutexGuard g(theConfigLock());
+ osl::MutexGuard g(*lock_);
if (parent_.is()) {
parent_->releaseChild(name_);
}
@@ -337,7 +339,7 @@ void ChildAccess::addSupportedServiceNames(
css::uno::Any ChildAccess::queryInterface(css::uno::Type const & aType)
{
assert(thisIs(IS_ANY));
- osl::MutexGuard g(theConfigLock());
+ osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
css::uno::Any res(Access::queryInterface(aType));
return res.hasValue()