summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-08-04 21:36:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-05 18:24:07 +0200
commit3487d85ea384f74c096499cfea8e565e778f8408 (patch)
treee6b608d8061cbbf2aeac8ccce3afc8f48d0ca381
parentosl::Mutex->std::mutex in HierarchyDataAccess (diff)
downloadcore-3487d85ea384f74c096499cfea8e565e778f8408.tar.gz
core-3487d85ea384f74c096499cfea8e565e778f8408.zip
osl::Mutex->std::mutex in fileaccess::XStream_impl
Change-Id: I0cf23f83ae66669c4bbd17f68992126143756b27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120025 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--ucb/source/ucp/file/filstr.cxx8
-rw-r--r--ucb/source/ucp/file/filstr.hxx4
2 files changed, 6 insertions, 6 deletions
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx
index 3031510a6b7f..8b4274cb60e0 100644
--- a/ucb/source/ucp/file/filstr.cxx
+++ b/ucb/source/ucp/file/filstr.cxx
@@ -88,7 +88,7 @@ uno::Reference< io::XInputStream > SAL_CALL
XStream_impl::getInputStream( )
{
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_bInputStreamCalled = true;
}
return uno::Reference< io::XInputStream >( this );
@@ -99,7 +99,7 @@ uno::Reference< io::XOutputStream > SAL_CALL
XStream_impl::getOutputStream( )
{
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_bOutputStreamCalled = true;
}
return uno::Reference< io::XOutputStream >( this );
@@ -208,7 +208,7 @@ XStream_impl::closeStream()
void SAL_CALL
XStream_impl::closeInput()
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_bInputStreamCalled = false;
if( ! m_bOutputStreamCalled )
@@ -219,7 +219,7 @@ XStream_impl::closeInput()
void SAL_CALL
XStream_impl::closeOutput()
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
m_bOutputStreamCalled = false;
if( ! m_bInputStreamCalled )
diff --git a/ucb/source/ucp/file/filstr.hxx b/ucb/source/ucp/file/filstr.hxx
index 13f963a9b751..e448f17052ab 100644
--- a/ucb/source/ucp/file/filstr.hxx
+++ b/ucb/source/ucp/file/filstr.hxx
@@ -18,7 +18,6 @@
*/
#pragma once
-#include <osl/mutex.hxx>
#include <rtl/ustring.hxx>
#include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/io/XTruncate.hpp>
@@ -27,6 +26,7 @@
#include <com/sun/star/io/XStream.hpp>
#include <com/sun/star/io/XAsyncOutputMonitor.hpp>
#include <cppuhelper/implbase.hxx>
+#include <mutex>
#include "filrec.hxx"
@@ -122,7 +122,7 @@ class XStream_impl : public cppu::WeakImplHelper<
private:
- osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
bool m_bInputStreamCalled,m_bOutputStreamCalled;
bool m_nIsOpen;