summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-17 19:05:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-17 22:17:15 +0200
commit5be9e0760ed74906c27b484e0d3235e70ea6f1c8 (patch)
tree63d29b7ba7ae1f9da41cce4d568bc77c0a6014eb /comphelper
parent2f8635fc919906fe8238fa5ef9e77cfe2f23df83 (diff)
osl::Mutex->std::mutex in SequenceOutputStreamService
Change-Id: I1aaa9ebd76e2376be82b25f2659d4b0f22dc14e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119113 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/streaming/seqoutputstreamserv.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/comphelper/source/streaming/seqoutputstreamserv.cxx b/comphelper/source/streaming/seqoutputstreamserv.cxx
index 477961397413..e19ea1001ae8 100644
--- a/comphelper/source/streaming/seqoutputstreamserv.cxx
+++ b/comphelper/source/streaming/seqoutputstreamserv.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/io/NotConnectedException.hpp>
#include <com/sun/star/io/XSequenceOutputStream.hpp>
+#include <mutex>
namespace com::sun::star::uno { class XComponentContext; }
@@ -61,7 +62,7 @@ private:
virtual ~SequenceOutputStreamService() override {};
- ::osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
uno::Reference< io::XOutputStream > m_xOutputStream;
uno::Sequence< ::sal_Int8 > m_aSequence;
};
@@ -89,7 +90,7 @@ uno::Sequence< OUString > SAL_CALL SequenceOutputStreamService::getSupportedServ
// css::io::XOutputStream:
void SAL_CALL SequenceOutputStreamService::writeBytes( const uno::Sequence< ::sal_Int8 > & aData )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOutputStream.is() )
throw io::NotConnectedException();
@@ -98,7 +99,7 @@ void SAL_CALL SequenceOutputStreamService::writeBytes( const uno::Sequence< ::sa
void SAL_CALL SequenceOutputStreamService::flush()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOutputStream.is() )
throw io::NotConnectedException();
@@ -107,7 +108,7 @@ void SAL_CALL SequenceOutputStreamService::flush()
void SAL_CALL SequenceOutputStreamService::closeOutput()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOutputStream.is() )
throw io::NotConnectedException();
@@ -118,7 +119,7 @@ void SAL_CALL SequenceOutputStreamService::closeOutput()
// css::io::XSequenceOutputStream:
uno::Sequence< ::sal_Int8 > SAL_CALL SequenceOutputStreamService::getWrittenBytes()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOutputStream.is() )
throw io::NotConnectedException();