summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-29 16:02:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-29 19:25:43 +0200
commite15586246b94815de2004a6f73fdbd3473e62525 (patch)
treef56ddcd1608b996e08a068dc118c3681d286e8f0
parentosl::Mutex->std::mutex in FormulaBuffer (diff)
downloadcore-e15586246b94815de2004a6f73fdbd3473e62525.tar.gz
core-e15586246b94815de2004a6f73fdbd3473e62525.zip
osl::Mutex->std::mutex in OSeekableInputWrapper
Change-Id: Ib6cc0a6b1fcc4685f2ac8c120c86ce79f3036535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119673 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--comphelper/source/streaming/seekableinput.cxx16
-rw-r--r--include/comphelper/seekableinput.hxx4
2 files changed, 10 insertions, 10 deletions
diff --git a/comphelper/source/streaming/seekableinput.cxx b/comphelper/source/streaming/seekableinput.cxx
index 905e739e85a1..e9291c6c9234 100644
--- a/comphelper/source/streaming/seekableinput.cxx
+++ b/comphelper/source/streaming/seekableinput.cxx
@@ -117,7 +117,7 @@ void OSeekableInputWrapper::PrepareCopy_Impl()
sal_Int32 SAL_CALL OSeekableInputWrapper::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -130,7 +130,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::readBytes( uno::Sequence< sal_Int8 >&
sal_Int32 SAL_CALL OSeekableInputWrapper::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -143,7 +143,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::readSomeBytes( uno::Sequence< sal_Int8
void SAL_CALL OSeekableInputWrapper::skipBytes( sal_Int32 nBytesToSkip )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -156,7 +156,7 @@ void SAL_CALL OSeekableInputWrapper::skipBytes( sal_Int32 nBytesToSkip )
sal_Int32 SAL_CALL OSeekableInputWrapper::available()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -169,7 +169,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::available()
void SAL_CALL OSeekableInputWrapper::closeInput()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -191,7 +191,7 @@ void SAL_CALL OSeekableInputWrapper::closeInput()
void SAL_CALL OSeekableInputWrapper::seek( sal_Int64 location )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -204,7 +204,7 @@ void SAL_CALL OSeekableInputWrapper::seek( sal_Int64 location )
sal_Int64 SAL_CALL OSeekableInputWrapper::getPosition()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -217,7 +217,7 @@ sal_Int64 SAL_CALL OSeekableInputWrapper::getPosition()
sal_Int64 SAL_CALL OSeekableInputWrapper::getLength()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
diff --git a/include/comphelper/seekableinput.hxx b/include/comphelper/seekableinput.hxx
index 5ab241071a70..5c2e6be07c6e 100644
--- a/include/comphelper/seekableinput.hxx
+++ b/include/comphelper/seekableinput.hxx
@@ -19,12 +19,12 @@
#ifndef INCLUDED_COMPHELPER_SEEKABLEINPUT_HXX
#define INCLUDED_COMPHELPER_SEEKABLEINPUT_HXX
-#include <osl/mutex.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <cppuhelper/implbase.hxx>
#include <comphelper/comphelperdllapi.h>
+#include <mutex>
namespace com::sun::star::uno { class XComponentContext; }
@@ -39,7 +39,7 @@ class SAL_DLLPUBLIC_TEMPLATE OSeekableInputWrapper_BASE
class COMPHELPER_DLLPUBLIC OSeekableInputWrapper final
: public OSeekableInputWrapper_BASE
{
- ::osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
css::uno::Reference< css::uno::XComponentContext > m_xContext;