summaryrefslogtreecommitdiff
path: root/configmgr/source/update.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-02 08:05:01 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-02 19:07:20 +0100
commitcb109d6518cc36155f9d0665932de0a54fdb6f4a (patch)
tree7ea0a4d7f2ea197495f49f03529e0f9fce5acc13 /configmgr/source/update.cxx
parentc7043c0f2aab380648c8e35b8724107a881978b3 (diff)
Revert "no need to use shared_ptr here"
This reverts commit 122598af564082786f01b4eafdb9f09f0cffdf5f. Reason for revert: shared_ptr was introduced for fdo#31494, to avoid issues during shutdown Change-Id: I1c3ef4a966b9244da1e504806e917d1918b83803 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86095 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr/source/update.cxx')
-rw-r--r--configmgr/source/update.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index c8f6505243ee..7529e21ef6f1 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -58,6 +58,7 @@ public:
context_(context)
{
assert(context.is());
+ lock_ = lock();
}
private:
@@ -79,13 +80,14 @@ private:
css::uno::Sequence< OUString > const & includedPaths,
css::uno::Sequence< OUString > const & excludedPaths) override;
+ std::shared_ptr<osl::Mutex> lock_;
css::uno::Reference< css::uno::XComponentContext > context_;
};
void Service::insertExtensionXcsFile(
sal_Bool shared, OUString const & fileUri)
{
- osl::MutexGuard g(theConfigLock());
+ osl::MutexGuard g(*lock_);
Components::getSingleton(context_).insertExtensionXcsFile(shared, fileUri);
}
@@ -94,7 +96,7 @@ void Service::insertExtensionXcuFile(
{
Broadcaster bc;
{
- osl::MutexGuard g(theConfigLock());
+ osl::MutexGuard g(*lock_);
Components & components = Components::getSingleton(context_);
Modifications mods;
components.insertExtensionXcuFile(shared, fileUri, &mods);
@@ -108,7 +110,7 @@ void Service::removeExtensionXcuFile(OUString const & fileUri)
{
Broadcaster bc;
{
- osl::MutexGuard g(theConfigLock());
+ osl::MutexGuard g(*lock_);
Components & components = Components::getSingleton(context_);
Modifications mods;
components.removeExtensionXcuFile(fileUri, &mods);
@@ -125,7 +127,7 @@ void Service::insertModificationXcuFile(
{
Broadcaster bc;
{
- osl::MutexGuard g(theConfigLock());
+ osl::MutexGuard g(*lock_);
Components & components = Components::getSingleton(context_);
Modifications mods;
components.insertModificationXcuFile(