summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
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;