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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sun Aug 1 19:02:26 UTC 2021


 sd/source/ui/framework/configuration/ResourceFactoryManager.cxx |    8 ++++----
 sd/source/ui/framework/configuration/ResourceFactoryManager.hxx |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit e5d3ea2531210219cf5cd10a861aed0ad93ba07f
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Aug 1 13:04:36 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Aug 1 21:01:52 2021 +0200

    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 at collabora.co.uk>

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;


More information about the Libreoffice-commits mailing list