[Libreoffice-commits] core.git: sc/inc sc/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 2 10:17:44 UTC 2021


 sc/inc/refreshtimer.hxx              |    6 +++---
 sc/source/core/tool/refreshtimer.cxx |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 287680683ca266f1fb4f447ac9bdaf76669d559d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Jul 31 18:50:43 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 2 12:17:07 2021 +0200

    osl::Mutex->std::mutex in ScRefreshTimer
    
    Change-Id: I64cac28e15edc90a8456e99c22e78cc84750eebd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119747
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx
index 395ea9198abc..9582d1b19a2c 100644
--- a/sc/inc/refreshtimer.hxx
+++ b/sc/inc/refreshtimer.hxx
@@ -23,20 +23,20 @@
 
 #include <tools/solar.h>
 #include <vcl/timer.hxx>
-#include <osl/mutex.hxx>
 #include "scdllapi.h"
 #include <memory>
+#include <mutex>
 
 class ScRefreshTimerControl
 {
-    ::osl::Mutex    aMutex;
+    std::mutex      aMutex;
     sal_uInt16      nBlockRefresh;
 
 public:
     ScRefreshTimerControl() : nBlockRefresh(0) {}
     void SetAllowRefresh( bool b );
     bool IsRefreshAllowed() const { return !nBlockRefresh; }
-    ::osl::Mutex& GetMutex() { return aMutex; }
+    std::mutex& GetMutex() { return aMutex; }
 };
 
 class ScRefreshTimer : public AutoTimer
diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx
index c466febcee24..35c8eace9b40 100644
--- a/sc/source/core/tool/refreshtimer.cxx
+++ b/sc/source/core/tool/refreshtimer.cxx
@@ -36,7 +36,7 @@ ScRefreshTimerProtector::ScRefreshTimerProtector( std::unique_ptr<ScRefreshTimer
     {
         m_rpControl->SetAllowRefresh( false );
         // wait for any running refresh in another thread to finish
-        ::osl::MutexGuard aGuard( m_rpControl->GetMutex() );
+        std::lock_guard aGuard( m_rpControl->GetMutex() );
     }
 }
 
@@ -122,7 +122,7 @@ void ScRefreshTimer::Invoke()
     if ( ppControl && *ppControl && (*ppControl)->IsRefreshAllowed() )
     {
         // now we COULD make the call in another thread ...
-        ::osl::MutexGuard aGuard( (*ppControl)->GetMutex() );
+        std::lock_guard aGuard( (*ppControl)->GetMutex() );
         Timer::Invoke();
         // restart from now on, don't execute immediately again if timed out
         // a second time during refresh


More information about the Libreoffice-commits mailing list