framework/source/fwe/helper/undomanagerhelper.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit d53b9c69e24d699a50497a1938dacf40e1682fc3
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Dec 18 19:57:35 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Dec 20 13:11:28 2021 +0100

    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.gran...@collabora.co.uk>

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();

Reply via email to