diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-03-28 23:03:57 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-03-29 02:03:07 +0100 |
commit | 19bbfc0b39d79a90539fd3094d9b6d7d81619a45 (patch) | |
tree | ccac02c9c175f7254c08a108c5107d7f3ebed87f /svl | |
parent | 655a39d8c0d151618d7c3b3fe0dcff508c2b53c5 (diff) |
tools: allow 64-bit positions on SvLockBytes
Bump stream positions to 64 bits on:
SvLockBytes::ReadAt()
SvLockBytes::WriteAt()
SvAsyncLockBytes::m_nSize
SvOpenLockBytes::Seek()
SvOpenLockBytes::Tell()
SvOutputStreamOpenLockBytes::m_nPosition
OInputStreamHelper::m_nActPos
Change-Id: Ica3b674e0ab23a756260a51475e97a5396ecdddb
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/misc/strmadpt.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx index d5820185d5f6..31d7275139f3 100644 --- a/svl/source/misc/strmadpt.cxx +++ b/svl/source/misc/strmadpt.cxx @@ -138,14 +138,14 @@ inline sal_uInt32 SvDataPipe_Impl::getReadPosition() const TYPEINIT1(SvOutputStreamOpenLockBytes, SvOpenLockBytes) // virtual -ErrCode SvOutputStreamOpenLockBytes::ReadAt(sal_uLong, void *, sal_uLong, sal_uLong *) +ErrCode SvOutputStreamOpenLockBytes::ReadAt(sal_uInt64, void *, sal_uLong, sal_uLong*) const { return ERRCODE_IO_CANTREAD; } // virtual -ErrCode SvOutputStreamOpenLockBytes::WriteAt(sal_uLong nPos, void const * pBuffer, +ErrCode SvOutputStreamOpenLockBytes::WriteAt(sal_uInt64 const nPos, void const * pBuffer, sal_uLong nCount, sal_uLong * pWritten) { if (nPos != m_nPosition) @@ -215,13 +215,13 @@ ErrCode SvOutputStreamOpenLockBytes::FillAppend(void const * pBuffer, } // virtual -sal_uLong SvOutputStreamOpenLockBytes::Tell() const +sal_uInt64 SvOutputStreamOpenLockBytes::Tell() const { return m_nPosition; } // virtual -sal_uLong SvOutputStreamOpenLockBytes::Seek(sal_uLong) +sal_uInt64 SvOutputStreamOpenLockBytes::Seek(sal_uInt64) { return m_nPosition; } @@ -293,8 +293,7 @@ SvLockBytesInputStream::readBytes(uno::Sequence< sal_Int8 > & rData, while (nSize < nBytesToRead) { sal_Size nCount; - ErrCode nError = m_xLockBytes->ReadAt(static_cast<sal_Size>( - m_nPosition), + ErrCode nError = m_xLockBytes->ReadAt(m_nPosition, rData.getArray() + nSize, nBytesToRead - nSize, &nCount); if (nError != ERRCODE_NONE && nError != ERRCODE_IO_PENDING) @@ -327,7 +326,7 @@ SvLockBytesInputStream::readSomeBytes(uno::Sequence< sal_Int8 > & rData, ErrCode nError; do { - nError = m_xLockBytes->ReadAt(static_cast<sal_Size>(m_nPosition), + nError = m_xLockBytes->ReadAt(m_nPosition, rData.getArray(), nMaxBytesToRead < 0 ? 0 : nMaxBytesToRead, |