[Libreoffice-commits] core.git: oox/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sat Jul 31 16:21:52 UTC 2021


 oox/source/core/filterbase.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b1d9de5a91a21060d151f68ae8ee1d79cf04aa8f
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jul 30 15:37:06 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 31 18:21:19 2021 +0200

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

diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 1fd2ebc4f010..7dd362a32954 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -32,11 +32,11 @@
 #include <comphelper/sequence.hxx>
 #include <comphelper/scopeguard.hxx>
 #include <unotools/mediadescriptor.hxx>
-#include <osl/mutex.hxx>
 #include <osl/diagnose.h>
 #include <rtl/instance.hxx>
 #include <rtl/uri.hxx>
 #include <memory>
+#include <mutex>
 #include <set>
 
 #include <oox/core/filterbase.hxx>
@@ -68,7 +68,7 @@ namespace {
 
 struct UrlPool
 {
-    ::osl::Mutex        maMutex;
+    std::mutex             maMutex;
     ::std::set< OUString > maUrls;
 };
 
@@ -93,7 +93,7 @@ private:
 DocumentOpenedGuard::DocumentOpenedGuard( const OUString& rUrl )
 {
     UrlPool& rUrlPool = StaticUrlPool::get();
-    ::osl::MutexGuard aGuard( rUrlPool.maMutex );
+    std::lock_guard aGuard( rUrlPool.maMutex );
     mbValid = rUrl.isEmpty() || (rUrlPool.maUrls.count( rUrl ) == 0);
     if( mbValid && !rUrl.isEmpty() )
     {
@@ -105,7 +105,7 @@ DocumentOpenedGuard::DocumentOpenedGuard( const OUString& rUrl )
 DocumentOpenedGuard::~DocumentOpenedGuard()
 {
     UrlPool& rUrlPool = StaticUrlPool::get();
-    ::osl::MutexGuard aGuard( rUrlPool.maMutex );
+    std::lock_guard aGuard( rUrlPool.maMutex );
     if( !maUrl.isEmpty() )
         rUrlPool.maUrls.erase( maUrl );
 }


More information about the Libreoffice-commits mailing list