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 /include | |
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 'include')
-rw-r--r-- | include/svl/strmadpt.hxx | 12 | ||||
-rw-r--r-- | include/tools/stream.hxx | 18 | ||||
-rw-r--r-- | include/unotools/streamhelper.hxx | 4 | ||||
-rw-r--r-- | include/unotools/ucblockbytes.hxx | 4 |
4 files changed, 19 insertions, 19 deletions
diff --git a/include/svl/strmadpt.hxx b/include/svl/strmadpt.hxx index 7117a6e54e5a..5f540566db92 100644 --- a/include/svl/strmadpt.hxx +++ b/include/svl/strmadpt.hxx @@ -32,7 +32,7 @@ class SVL_DLLPUBLIC SvOutputStreamOpenLockBytes: public SvOpenLockBytes { com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > m_xOutputStream; - sal_uInt32 m_nPosition; + sal_uInt64 m_nPosition; public: TYPEINFO_OVERRIDE(); @@ -43,10 +43,10 @@ public: rTheOutputStream): m_xOutputStream(rTheOutputStream), m_nPosition(0) {} - virtual ErrCode ReadAt(sal_uLong, void *, sal_uLong, sal_uLong *) const SAL_OVERRIDE; + virtual ErrCode ReadAt(sal_uInt64, void *, sal_uLong, sal_uInt64 *) const SAL_OVERRIDE; - virtual ErrCode WriteAt(sal_uLong nPos, const void * pBuffer, sal_uLong nCount, - sal_uLong * pWritten) SAL_OVERRIDE; + virtual ErrCode WriteAt(sal_uInt64 nPos, const void * pBuffer, sal_uLong nCount, + sal_uInt64 * pWritten) SAL_OVERRIDE; virtual ErrCode Flush() const SAL_OVERRIDE; @@ -57,9 +57,9 @@ public: virtual ErrCode FillAppend(const void * pBuffer, sal_uLong nCount, sal_uLong * pWritten) SAL_OVERRIDE; - virtual sal_uLong Tell() const SAL_OVERRIDE; + virtual sal_uInt64 Tell() const SAL_OVERRIDE; - virtual sal_uLong Seek(sal_uLong) SAL_OVERRIDE; + virtual sal_uInt64 Seek(sal_uInt64) SAL_OVERRIDE; virtual void Terminate() SAL_OVERRIDE; }; diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index 929432a88650..448b4811865d 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -129,9 +129,9 @@ public: virtual void SetSynchronMode(bool bTheSync = true) { m_bSync = bTheSync; } virtual bool IsSynchronMode() const { return m_bSync; } - virtual ErrCode ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount, + virtual ErrCode ReadAt(sal_uInt64 nPos, void * pBuffer, sal_Size nCount, sal_Size * pRead) const; - virtual ErrCode WriteAt(sal_Size nPos, const void * pBuffer, sal_Size nCount, + virtual ErrCode WriteAt(sal_uInt64 nPos, const void * pBuffer, sal_Size nCount, sal_Size * pWritten); virtual ErrCode Flush() const; @@ -157,9 +157,9 @@ public: virtual ErrCode FillAppend(const void * pBuffer, sal_Size nCount, sal_Size * pWritten) = 0; - virtual sal_Size Tell() const = 0; + virtual sal_uInt64 Tell() const = 0; - virtual sal_Size Seek(sal_Size nPos) = 0; + virtual sal_uInt64 Seek(sal_uInt64 nPos) = 0; virtual void Terminate() = 0; }; @@ -170,7 +170,7 @@ SV_DECL_IMPL_REF(SvOpenLockBytes); class SvAsyncLockBytes: public SvOpenLockBytes { - sal_Size m_nSize; + sal_uInt64 m_nSize; bool m_bTerminated; public: @@ -179,17 +179,17 @@ public: SvAsyncLockBytes(SvStream * pStream, bool bOwner): SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(false) {} - virtual ErrCode ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount, + virtual ErrCode ReadAt(sal_uInt64 nPos, void * pBuffer, sal_Size nCount, sal_Size * pRead) const SAL_OVERRIDE; - virtual ErrCode WriteAt(sal_Size nPos, const void * pBuffer, sal_Size nCount, + virtual ErrCode WriteAt(sal_uInt64 nPos, const void * pBuffer, sal_Size nCount, sal_Size * pWritten) SAL_OVERRIDE; virtual ErrCode FillAppend(const void * pBuffer, sal_Size nCount, sal_Size * pWritten) SAL_OVERRIDE; - virtual sal_Size Tell() const SAL_OVERRIDE { return m_nSize; } + virtual sal_uInt64 Tell() const SAL_OVERRIDE { return m_nSize; } - virtual sal_Size Seek(sal_Size nPos) SAL_OVERRIDE; + virtual sal_uInt64 Seek(sal_uInt64 nPos) SAL_OVERRIDE; virtual void Terminate() SAL_OVERRIDE { m_bTerminated = true; } }; diff --git a/include/unotools/streamhelper.hxx b/include/unotools/streamhelper.hxx index 7f4d19dac859..6cf186070e3e 100644 --- a/include/unotools/streamhelper.hxx +++ b/include/unotools/streamhelper.hxx @@ -43,13 +43,13 @@ class UNOTOOLS_DLLPUBLIC OInputStreamHelper : public InputStreamHelper_Base { ::osl::Mutex m_aMutex; SvLockBytesRef m_xLockBytes; - sal_uInt32 m_nActPos; + sal_uInt64 m_nActPos; sal_Int32 m_nAvailable; // this is typically the chunk(buffer) size public: OInputStreamHelper(const SvLockBytesRef& _xLockBytes, sal_uInt32 _nAvailable, - sal_uInt32 _nPos = 0) + sal_uInt64 _nPos = 0) :m_xLockBytes(_xLockBytes) ,m_nActPos(_nPos) ,m_nAvailable(_nAvailable){} diff --git a/include/unotools/ucblockbytes.hxx b/include/unotools/ucblockbytes.hxx index 049ca69e6828..8bb15e77dc28 100644 --- a/include/unotools/ucblockbytes.hxx +++ b/include/unotools/ucblockbytes.hxx @@ -132,8 +132,8 @@ public: // SvLockBytes virtual void SetSynchronMode (bool bSynchron) SAL_OVERRIDE; - virtual ErrCode ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount, sal_uLong *pRead) const SAL_OVERRIDE; - virtual ErrCode WriteAt ( sal_uLong, const void*, sal_uLong, sal_uLong *pWritten) SAL_OVERRIDE; + virtual ErrCode ReadAt(sal_uInt64 nPos, void *pBuffer, sal_uLong nCount, sal_uLong *pRead) const SAL_OVERRIDE; + virtual ErrCode WriteAt(sal_uInt64, const void*, sal_uLong, sal_uLong *pWritten) SAL_OVERRIDE; virtual ErrCode Flush (void) const SAL_OVERRIDE; virtual ErrCode SetSize (sal_uLong) SAL_OVERRIDE; virtual ErrCode Stat ( SvLockBytesStat *pStat, SvLockBytesStatFlag) const SAL_OVERRIDE; |