From e5d3ea2531210219cf5cd10a861aed0ad93ba07f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 1 Aug 2021 13:04:36 +0200 Subject: osl::Mutex->std::mutex in ResourceFactoryManager Change-Id: I8d332dde02c953b59c4bd26e3d31505c9677d546 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119822 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/framework/configuration/ResourceFactoryManager.cxx | 8 ++++---- sd/source/ui/framework/configuration/ResourceFactoryManager.hxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx index 855cfc21509f..6e082d9019fa 100644 --- a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx +++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx @@ -73,7 +73,7 @@ void ResourceFactoryManager::AddFactory ( if (rsURL.isEmpty()) throw lang::IllegalArgumentException(); - ::osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); if (rsURL.indexOf('*') >= 0 || rsURL.indexOf('?') >= 0) { @@ -100,7 +100,7 @@ void ResourceFactoryManager::RemoveFactoryForURL ( if (rsURL.isEmpty()) throw lang::IllegalArgumentException(); - ::osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); FactoryMap::iterator iFactory (maFactoryMap.find(rsURL)); if (iFactory != maFactoryMap.end()) @@ -123,7 +123,7 @@ void ResourceFactoryManager::RemoveFactoryForURL ( void ResourceFactoryManager::RemoveFactoryForReference( const Reference& rxFactory) { - ::osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); // Collect a list with all keys that map to the given factory. ::std::vector aKeys; @@ -178,7 +178,7 @@ Reference ResourceFactoryManager::GetFactory ( Reference ResourceFactoryManager::FindFactory (const OUString& rsURLBase) { - ::osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); FactoryMap::const_iterator iFactory (maFactoryMap.find(rsURLBase)); if (iFactory != maFactoryMap.end()) return iFactory->second; diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx index 46875735ff77..61daf383b2f2 100644 --- a/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx +++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.hxx @@ -21,13 +21,13 @@ #include +#include #include #include #include #include #include -#include namespace com::sun::star::drawing::framework { class XControllerManager; } namespace com::sun::star::drawing::framework { class XResourceFactory; } @@ -87,7 +87,7 @@ public: const OUString& rsURL); private: - ::osl::Mutex maMutex; + std::mutex maMutex; typedef std::unordered_map< OUString, css::uno::Reference > FactoryMap; -- cgit