package/source/xstor/ohierarchyholder.cxx |   12 ++++++------
 package/source/xstor/ohierarchyholder.hxx |    4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit cf4e1e0bb8145ed1feccc7c916b60cb394a2ee92
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Feb 17 08:40:10 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Feb 17 07:33:24 2023 +0000

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

diff --git a/package/source/xstor/ohierarchyholder.cxx 
b/package/source/xstor/ohierarchyholder.cxx
index 209136bcdf36..eafdf4a567f4 100644
--- a/package/source/xstor/ohierarchyholder.cxx
+++ b/package/source/xstor/ohierarchyholder.cxx
@@ -80,7 +80,7 @@ std::vector<OUString> 
OHierarchyHolder_Impl::GetListPathFromString( std::u16stri
 
 uno::Reference< embed::XExtendedStorageStream > 
OHierarchyElement_Impl::GetStreamHierarchically( sal_Int32 nStorageMode, 
std::vector<OUString>& aListPath, sal_Int32 nStreamMode, const 
::comphelper::SequenceAsHashMap& aEncryptionData )
 {
-    ::osl::MutexGuard aGuard( m_aMutex );
+    std::unique_lock aGuard( m_aMutex );
 
     if ( !( nStorageMode & embed::ElementModes::WRITE ) && ( nStreamMode & 
embed::ElementModes::WRITE ) )
         throw io::IOException("invalid storage/stream mode combo");
@@ -162,7 +162,7 @@ uno::Reference< embed::XExtendedStorageStream > 
OHierarchyElement_Impl::GetStrea
 
 void OHierarchyElement_Impl::RemoveStreamHierarchically( 
std::vector<OUString>& aListPath )
 {
-    ::osl::MutexGuard aGuard( m_aMutex );
+    std::unique_lock aGuard( m_aMutex );
 
     if ( aListPath.empty() )
         throw uno::RuntimeException();
@@ -211,7 +211,7 @@ void OHierarchyElement_Impl::Commit()
     uno::Reference< embed::XStorage > xOwnStor;
 
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
+        std::unique_lock aGuard( m_aMutex );
         aParent = m_rParent;
         xOwnStor = m_xOwnStorage;
     }
@@ -229,7 +229,7 @@ void OHierarchyElement_Impl::TestForClosing()
 {
     ::rtl::Reference< OHierarchyElement_Impl > xKeepAlive( this );
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
+        std::unique_lock aGuard( m_aMutex );
 
         if ( m_aOpenStreams.empty() && m_aChildren.empty() )
         {
@@ -259,7 +259,7 @@ void SAL_CALL OHierarchyElement_Impl::disposing( const 
lang::EventObject& Source
     try
     {
         {
-            osl::MutexGuard aGuard(m_aMutex);
+            std::unique_lock aGuard(m_aMutex);
             uno::Reference< embed::XExtendedStorageStream > 
xStream(Source.Source, uno::UNO_QUERY);
 
             m_aOpenStreams.erase(std::remove_if(m_aOpenStreams.begin(), 
m_aOpenStreams.end(),
@@ -281,7 +281,7 @@ void SAL_CALL OHierarchyElement_Impl::disposing( const 
lang::EventObject& Source
 void OHierarchyElement_Impl::RemoveElement( const ::rtl::Reference< 
OHierarchyElement_Impl >& aRef )
 {
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
+        std::unique_lock aGuard( m_aMutex );
         OHierarchyElementList_Impl::iterator aIter = m_aChildren.begin();
         while (aIter != m_aChildren.end())
         {
diff --git a/package/source/xstor/ohierarchyholder.hxx 
b/package/source/xstor/ohierarchyholder.hxx
index e88632fdbb1d..c3ceddabd1b1 100644
--- a/package/source/xstor/ohierarchyholder.hxx
+++ b/package/source/xstor/ohierarchyholder.hxx
@@ -29,7 +29,7 @@
 #include <comphelper/sequenceashashmap.hxx>
 
 #include <rtl/ref.hxx>
-
+#include <mutex>
 #include <unordered_map>
 #include <utility>
 #include <vector>
@@ -44,7 +44,7 @@ typedef ::std::vector< css::uno::WeakReference< 
css::embed::XExtendedStorageStre
 
 class OHierarchyElement_Impl : public cppu::WeakImplHelper< 
css::embed::XTransactionListener >
 {
-    ::osl::Mutex m_aMutex;
+    std::mutex m_aMutex;
 
     ::rtl::Reference< OHierarchyElement_Impl > m_rParent;
     css::uno::Reference< css::embed::XStorage > m_xOwnStorage;

Reply via email to