ucb/source/ucp/ext/ucpext_datasupplier.cxx |   14 +++++++-------
 ucb/source/ucp/ext/ucpext_datasupplier.hxx |    3 ++-
 2 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 46ceb1ccb792b1a9ee12b73c499c4763502ef1e3
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Feb 15 15:33:05 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Feb 16 07:10:32 2023 +0000

    osl::Mutex->std::mutex in ucb::ucp::ext::DataSupplier
    
    Change-Id: Id195c7cb676d4c7e0741adeb31f4b1a9854e8230
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147100
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx 
b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index b718ef076c34..9470cdeb4c1e 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -151,7 +151,7 @@ namespace ucb::ucp::ext
 
     OUString DataSupplier::queryContentIdentifierString( sal_uInt32 i_nIndex )
     {
-        ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
+        std::unique_lock aGuard( m_aMutex );
 
         if ( i_nIndex < m_aResults.size() )
         {
@@ -167,7 +167,7 @@ namespace ucb::ucp::ext
 
     Reference< XContentIdentifier > DataSupplier::queryContentIdentifier( 
sal_uInt32 i_nIndex )
     {
-        ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
+        std::unique_lock aGuard( m_aMutex );
 
         if ( i_nIndex < m_aResults.size() )
         {
@@ -190,7 +190,7 @@ namespace ucb::ucp::ext
 
     Reference< XContent > DataSupplier::queryContent( sal_uInt32 i_nIndex )
     {
-        ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
+        std::unique_lock aGuard( m_aMutex );
         ENSURE_OR_RETURN( i_nIndex < m_aResults.size(), "illegal index!", 
nullptr );
 
 
@@ -222,7 +222,7 @@ namespace ucb::ucp::ext
 
     bool DataSupplier::getResult( sal_uInt32 i_nIndex )
     {
-        ::osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
+        std::unique_lock aGuard( m_aMutex );
 
         // true if result already present.
         return m_aResults.size() > i_nIndex;
@@ -231,7 +231,7 @@ namespace ucb::ucp::ext
 
     sal_uInt32 DataSupplier::totalCount()
     {
-        ::osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
+        std::unique_lock aGuard( m_aMutex );
         return m_aResults.size();
     }
 
@@ -250,7 +250,7 @@ namespace ucb::ucp::ext
 
     Reference< XRow > DataSupplier::queryPropertyValues( sal_uInt32 i_nIndex  )
     {
-        ::osl::MutexGuard aGuard( m_aMutex );
+        std::unique_lock aGuard( m_aMutex );
         ENSURE_OR_RETURN( i_nIndex < m_aResults.size(), 
"DataSupplier::queryPropertyValues: illegal index!", nullptr );
 
         Reference< XRow > xRow = m_aResults[ i_nIndex ].xRow;
@@ -291,7 +291,7 @@ namespace ucb::ucp::ext
 
     void DataSupplier::releasePropertyValues( sal_uInt32 i_nIndex )
     {
-        ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
+        std::unique_lock aGuard( m_aMutex );
 
         if ( i_nIndex < m_aResults.size() )
             m_aResults[ i_nIndex ].xRow.clear();
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.hxx 
b/ucb/source/ucp/ext/ucpext_datasupplier.hxx
index f0bea109e683..a7198fc9ba3b 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.hxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.hxx
@@ -24,6 +24,7 @@
 #include <rtl/ref.hxx>
 #include <ucbhelper/resultset.hxx>
 
+#include <mutex>
 #include <vector>
 
 
@@ -75,7 +76,7 @@ namespace ucb::ucp::ext
             css::uno::Reference< css::sdbc::XRow >  xRow;
         };
         typedef ::std::vector< ResultListEntry >    ResultList;
-        ::osl::Mutex                                m_aMutex;
+        std::mutex                                  m_aMutex;
         ResultList                                  m_aResults;
         ::rtl::Reference< Content >                 m_xContent;
         css::uno::Reference< css::uno::XComponentContext > m_xContext;

Reply via email to