summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-02-15 15:33:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-16 07:10:32 +0000
commit46ceb1ccb792b1a9ee12b73c499c4763502ef1e3 (patch)
tree638d38137929d7922077b76f45ffea7e090e807a /ucb
parentae5fda223143bb7a2cddf90d741e7376046da0b6 (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/ext/ucpext_datasupplier.cxx14
-rw-r--r--ucb/source/ucp/ext/ucpext_datasupplier.hxx3
2 files changed, 9 insertions, 8 deletions
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;