summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-08-01 13:04:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-01 21:01:52 +0200
commite5d3ea2531210219cf5cd10a861aed0ad93ba07f (patch)
tree59b9eadc1c46b21d2cf259dfb36531bfc1d8d652
parent933cf264b29307ce5cdf489ff89f5da889f5d298 (diff)
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 <noel.grandin@collabora.co.uk>
-rw-r--r--sd/source/ui/framework/configuration/ResourceFactoryManager.cxx8
-rw-r--r--sd/source/ui/framework/configuration/ResourceFactoryManager.hxx4
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<XResourceFactory>& rxFactory)
{
- ::osl::MutexGuard aGuard (maMutex);
+ std::lock_guard aGuard (maMutex);
// Collect a list with all keys that map to the given factory.
::std::vector<OUString> aKeys;
@@ -178,7 +178,7 @@ Reference<XResourceFactory> ResourceFactoryManager::GetFactory (
Reference<XResourceFactory> 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 <sal/config.h>
+#include <mutex>
#include <unordered_map>
#include <utility>
#include <vector>
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ustring.hxx>
-#include <osl/mutex.hxx>
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<css::drawing::framework::XResourceFactory> > FactoryMap;