diff options
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/streaming/oslfile2streamwrap.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx index eff916a833ff..472e085d642e 100644 --- a/comphelper/source/streaming/oslfile2streamwrap.cxx +++ b/comphelper/source/streaming/oslfile2streamwrap.cxx @@ -51,10 +51,10 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8 if (nBytesToRead < 0) throw css::io::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this)); - ::osl::MutexGuard aGuard( m_aMutex ); - aData.realloc(nBytesToRead); + std::lock_guard aGuard( m_aMutex ); + sal_uInt64 nRead = 0; FileBase::RC eError = m_pFile->read(static_cast<void*>(aData.getArray()), nBytesToRead, nRead); if (eError != FileBase::E_None) @@ -80,7 +80,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if (!m_pFile) throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); @@ -97,7 +97,7 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip) sal_Int32 SAL_CALL OSLInputStreamWrapper::available() { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if (!m_pFile) throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this)); |