summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-30 15:37:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-31 18:21:19 +0200
commitb1d9de5a91a21060d151f68ae8ee1d79cf04aa8f (patch)
treed82942241eec702abbb2d0a715d5949a4b5628e4
parent9a873383868814e18de8d205a03c0824c74b6d56 (diff)
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@collabora.co.uk>
-rw-r--r--oox/source/core/filterbase.cxx8
1 files changed, 4 insertions, 4 deletions
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 );
}