framework/source/uiconfiguration/globalsettings.cxx     |   11 ++++++-----
 i18npool/source/transliteration/transliterationImpl.cxx |    5 +++--
 2 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit b67257c5dc54b37495a755005192e4cf186aef25
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Nov 21 18:14:46 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Nov 22 07:55:13 2021 +0100

    osl::Mutex->std::mutex in GlobalSettings_Access
    
    Change-Id: I5162a157fd07870bf768947b32e8afe8f1fb0a02
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125629
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/framework/source/uiconfiguration/globalsettings.cxx 
b/framework/source/uiconfiguration/globalsettings.cxx
index f880e7354fd2..2c517205e2db 100644
--- a/framework/source/uiconfiguration/globalsettings.cxx
+++ b/framework/source/uiconfiguration/globalsettings.cxx
@@ -28,6 +28,7 @@
 #include <rtl/ref.hxx>
 #include <comphelper/propertysequence.hxx>
 #include <cppuhelper/implbase.hxx>
+#include <mutex>
 
 //  Defines
 
@@ -64,7 +65,7 @@ class GlobalSettings_Access : public ::cppu::WeakImplHelper<
     private:
         void impl_initConfigAccess();
 
-        osl::Mutex                                                m_mutex;
+        std::mutex                                                m_mutex;
         bool                                                      m_bDisposed  
 : 1,
                                                                   
m_bConfigRead : 1;
         OUString                                                  
m_aNodeRefStates;
@@ -91,7 +92,7 @@ GlobalSettings_Access::GlobalSettings_Access( const 
css::uno::Reference< css::un
 // XComponent
 void SAL_CALL GlobalSettings_Access::dispose()
 {
-    osl::MutexGuard g(m_mutex);
+    std::unique_lock g(m_mutex);
     m_xConfigAccess.clear();
     m_bDisposed = true;
 }
@@ -107,14 +108,14 @@ void SAL_CALL GlobalSettings_Access::removeEventListener( 
const css::uno::Refere
 // XEventListener
 void SAL_CALL GlobalSettings_Access::disposing( const css::lang::EventObject& )
 {
-    osl::MutexGuard g(m_mutex);
+    std::unique_lock g(m_mutex);
     m_xConfigAccess.clear();
 }
 
 // settings access
 bool GlobalSettings_Access::HasToolbarStatesInfo()
 {
-    osl::MutexGuard g(m_mutex);
+    std::unique_lock g(m_mutex);
 
     if ( m_bDisposed )
         return false;
@@ -148,7 +149,7 @@ bool GlobalSettings_Access::HasToolbarStatesInfo()
 
 bool GlobalSettings_Access::GetToolbarStateInfo( GlobalSettings::StateInfo 
eStateInfo, css::uno::Any& aValue )
 {
-    osl::MutexGuard g(m_mutex);
+    std::unique_lock g(m_mutex);
 
     if ( m_bDisposed )
         return false;
commit 60e185446eef9c4084b22901f1ffb41b36628b6e
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Nov 21 18:35:23 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Nov 22 07:55:06 2021 +0100

    osl::Mutex->std::mutex in TransliterationImpl::loadBody
    
    Change-Id: I15441110bf27c3f2ad9a61389339c55b9c4c3bb4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125632
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/i18npool/source/transliteration/transliterationImpl.cxx 
b/i18npool/source/transliteration/transliterationImpl.cxx
index 09e791c33e71..c85d16442341 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -30,6 +30,7 @@
 #include <rtl/ustring.hxx>
 
 #include <algorithm>
+#include <mutex>
 #include <numeric>
 
 using namespace com::sun::star::uno;
@@ -586,8 +587,8 @@ namespace
 void TransliterationImpl::loadBody( OUString const &implName, 
Reference<XExtendedTransliteration>& body )
 {
     assert(!implName.isEmpty());
-    static osl::Mutex transBodyMutex;
-    ::osl::MutexGuard guard(transBodyMutex);
+    static std::mutex transBodyMutex;
+    std::unique_lock guard(transBodyMutex);
     static TransBody lastTransBody;
     if (implName != lastTransBody.Name)
     {

Reply via email to