summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-18 19:57:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-20 13:11:28 +0100
commitd53b9c69e24d699a50497a1938dacf40e1682fc3 (patch)
tree0e30a9131aeba26704962cc5dc7064683081229b /framework
parent833b240d1d04a8aae1c1f83c760d2e2fd800550a (diff)
osl::Mutex->std::mutex in UndoManagerHelper_Impl
Change-Id: I4d279e2175f22422bec242ef8a15166cf67ef59f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127105 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/fwe/helper/undomanagerhelper.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx
index be88d7fe3872..4b33fdc9f0d6 100644
--- a/framework/source/fwe/helper/undomanagerhelper.cxx
+++ b/framework/source/fwe/helper/undomanagerhelper.cxx
@@ -38,6 +38,7 @@
#include <osl/conditn.hxx>
#include <functional>
+#include <mutex>
#include <stack>
#include <queue>
@@ -198,7 +199,7 @@ namespace framework
{
private:
::osl::Mutex m_aMutex;
- ::osl::Mutex m_aQueueMutex;
+ std::mutex m_aQueueMutex;
bool m_bAPIActionRunning;
bool m_bProcessingEvents;
sal_Int32 m_nLockCount;
@@ -452,7 +453,7 @@ namespace framework
// create the request, and add it to our queue
::rtl::Reference< UndoManagerRequest > pRequest( new UndoManagerRequest( i_request ) );
{
- ::osl::MutexGuard aQueueGuard( m_aQueueMutex );
+ std::unique_lock aQueueGuard( m_aQueueMutex );
m_aEventQueue.push( pRequest );
}
@@ -470,7 +471,7 @@ namespace framework
{
pRequest.clear();
{
- ::osl::MutexGuard aQueueGuard( m_aQueueMutex );
+ std::unique_lock aQueueGuard( m_aQueueMutex );
if ( m_aEventQueue.empty() )
{
// reset the flag before releasing the queue mutex, otherwise it's possible that another thread
@@ -492,7 +493,7 @@ namespace framework
{
// no chance to process further requests, if the current one failed
// => discard them
- ::osl::MutexGuard aQueueGuard( m_aQueueMutex );
+ std::unique_lock aQueueGuard( m_aQueueMutex );
while ( !m_aEventQueue.empty() )
{
pRequest = m_aEventQueue.front();