summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-19 14:07:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-19 13:46:30 +0100
commit3705a2904d50210e3515723ad24bbbb6a72eb37f (patch)
tree32d9bb1cdb5527cd9281c58f1a642e5cabb8ed49
parentbc898e2c2784e36ad4d4cdf6d962e39069d2c82d (diff)
use SolarMutexReleaser in UUIInteractionHelper
instead of hand-coding it Change-Id: I16cc72854a0d02422eaacf5794b97cfcd7689d83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--uui/source/iahndl.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index f3c7c3b94088..0c9b9397aeeb 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -164,11 +164,8 @@ UUIInteractionHelper::handleRequest(
HandleData aHD(rRequest);
Link<void*,void> aLink(&aHD,handlerequest);
Application::PostUserEvent(aLink,this);
- comphelper::SolarMutex& rSolarMutex = Application::GetSolarMutex();
- sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? rSolarMutex.release(true) : 0;
+ SolarMutexReleaser aReleaser;
aHD.wait();
- if (nLockCount)
- rSolarMutex.acquire(nLockCount);
return aHD.bHandled;
}
else
@@ -215,11 +212,8 @@ UUIInteractionHelper::getStringFromRequest(
HandleData aHD(rRequest);
Link<void*,void> aLink(&aHD,getstringfromrequest);
Application::PostUserEvent(aLink,this);
- comphelper::SolarMutex& rSolarMutex = Application::GetSolarMutex();
- sal_uInt32 nLockCount = (rSolarMutex.IsCurrentThread()) ? rSolarMutex.release(true) : 0;
+ SolarMutexReleaser aReleaser;
aHD.wait();
- if (nLockCount)
- rSolarMutex.acquire(nLockCount);
return aHD.m_aResult;
}
else