[Libreoffice-commits] core.git: 5 commits - basic/source forms/source include/sot include/svl include/tools include/unotools lotuswordpro/source sd/source sot/source svl/source tools/source unotools/source
Michael Stahl
mstahl at redhat.com
Fri Mar 28 18:07:06 PDT 2014
basic/source/runtime/iosys.cxx | 20 +--
forms/source/component/imgprod.cxx | 18 +--
include/sot/storage.hxx | 6 -
include/svl/instrm.hxx | 6 -
include/svl/outstrm.hxx | 6 -
include/svl/strmadpt.hxx | 14 +-
include/tools/pstm.hxx | 3
include/tools/stream.hxx | 60 ++++------
include/unotools/streamhelper.hxx | 4
include/unotools/ucblockbytes.hxx | 8 -
lotuswordpro/source/filter/bento.hxx | 4
lotuswordpro/source/filter/utbenvs.cxx | 4
sd/source/ui/animations/CustomAnimationList.cxx | 9 -
sd/source/ui/app/sdmod1.cxx | 2
sot/source/sdstor/stgole.cxx | 2
sot/source/sdstor/stgstrms.cxx | 6 -
sot/source/sdstor/storage.cxx | 8 -
sot/source/sdstor/ucbstorage.cxx | 20 +--
svl/source/misc/strmadpt.cxx | 35 +-----
tools/source/ref/pstm.cxx | 15 --
tools/source/stream/stream.cxx | 140 +++++++++++-------------
tools/source/stream/strmunx.cxx | 9 -
tools/source/stream/strmwnt.cxx | 11 -
unotools/source/streaming/streamhelper.cxx | 9 -
unotools/source/ucbhelper/ucblockbytes.cxx | 8 -
25 files changed, 178 insertions(+), 249 deletions(-)
New commits:
commit 64febc8feffd0968a433fa366e0a0c82cdff47c6
Author: Michael Stahl <mstahl at redhat.com>
Date: Sat Mar 29 01:26:10 2014 +0100
remove weird unused CustomAnimationTriggerEntryItem::IsA()
Change-Id: I57c4920ed8e4ecbe90a314ce69e5abc292763347
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index d88188d..cceac14 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -357,7 +357,6 @@ class CustomAnimationTriggerEntryItem : public SvLBoxString
public:
CustomAnimationTriggerEntryItem( SvTreeListEntry*,sal_uInt16 nFlags, const OUString& aDescription );
virtual ~CustomAnimationTriggerEntryItem();
- virtual sal_uInt16 IsA();
void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ) SAL_OVERRIDE;
SvLBoxItem* Create() const SAL_OVERRIDE;
void Clone( SvLBoxItem* pSource ) SAL_OVERRIDE;
@@ -382,14 +381,6 @@ CustomAnimationTriggerEntryItem::~CustomAnimationTriggerEntryItem()
}
-
-sal_uInt16 CustomAnimationTriggerEntryItem::IsA()
-{
- return (sal_uInt16)-1;
-}
-
-
-
void CustomAnimationTriggerEntryItem::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData )
{
if( !pViewData )
commit 15006df5bdce7d06ee5c3ecd2f1618ce3dc6124c
Author: Michael Stahl <mstahl at redhat.com>
Date: Sat Mar 29 01:24:43 2014 +0100
tools: remove unused SvStream::IsA() and associated ID_*STREAM macros
Change-Id: I6ed0991fb5bd1d5085ee1b93323b57b1afc69860
diff --git a/include/svl/instrm.hxx b/include/svl/instrm.hxx
index 441238f..9571e54 100644
--- a/include/svl/instrm.hxx
+++ b/include/svl/instrm.hxx
@@ -61,8 +61,6 @@ public:
virtual ~SvInputStream();
- virtual sal_uInt16 IsA() const SAL_OVERRIDE;
-
virtual void AddMark(sal_uLong nPos);
virtual void RemoveMark(sal_uLong nPos);
diff --git a/include/svl/outstrm.hxx b/include/svl/outstrm.hxx
index a0bea05..f41b9ac 100644
--- a/include/svl/outstrm.hxx
+++ b/include/svl/outstrm.hxx
@@ -50,8 +50,6 @@ public:
rTheStream);
virtual ~SvOutputStream();
-
- virtual sal_uInt16 IsA() const SAL_OVERRIDE;
};
#endif // INCLUDED_SVL_OUTSTRM_HXX
diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx
index cf42246..f11a021 100644
--- a/include/tools/pstm.hxx
+++ b/include/tools/pstm.hxx
@@ -215,7 +215,6 @@ public:
void SetStream( SvStream * pStream );
SvStream * GetStream() const { return pStm; }
- virtual sal_uInt16 IsA() const SAL_OVERRIDE;
SvPersistBase * GetObject( sal_uIntPtr nIdx ) const;
sal_uIntPtr GetIndex( SvPersistBase * ) const;
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 7732d6d..81b897d 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -79,13 +79,6 @@ typedef sal_uInt16 StreamMode;
#define COMPRESSMODE_ZBITMAP (sal_uInt16)0x0001
#define COMPRESSMODE_NATIVE (sal_uInt16)0x0010
-#define ID_STREAM 1
-#define ID_FILESTREAM 2
-#define ID_MEMORYSTREAM 3
-#define ID_SHAREDMEMORYSTREAM 4
-#define ID_STORAGESTREAM 5
-#define ID_PERSISTSTREAM 6
-
class SvStream;
typedef SvStream& (*SvStrPtr)( SvStream& );
@@ -455,7 +448,6 @@ public:
bool IsWritable() const { return bIsWritable; }
StreamMode GetStreamMode() const { return eStreamMode; }
- virtual sal_uInt16 IsA() const;
long GetVersion() { return nVersion; }
void SetVersion( long n ) { nVersion = n; }
@@ -678,7 +670,6 @@ public:
void Close();
bool IsOpen() const { return bIsOpen; }
bool IsLocked() const { return ( nLockCounter!=0 ); }
- virtual sal_uInt16 IsA() const SAL_OVERRIDE;
const OUString& GetFileName() const { return aFilename; }
};
@@ -737,7 +728,6 @@ public:
sal_Size GetEndOfData() const { return nEndOfData; }
const void* GetData() { Flush(); return pBuf; }
operator const void*() { Flush(); return pBuf; }
- virtual sal_uInt16 IsA() const SAL_OVERRIDE;
void* SwitchBuffer( sal_Size nInitSize=512, sal_Size nResize=64 );
void* SetBuffer( void* pBuf, sal_Size nSize,
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index 7746ec6..03beb02 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -647,12 +647,6 @@ SvInputStream::~SvInputStream()
}
// virtual
-sal_uInt16 SvInputStream::IsA() const
-{
- return 0;
-}
-
-// virtual
void SvInputStream::AddMark(sal_uLong nPos)
{
if (open() && m_pPipe)
@@ -763,12 +757,6 @@ SvOutputStream::~SvOutputStream()
}
}
-// virtual
-sal_uInt16 SvOutputStream::IsA() const
-{
- return 0;
-}
-
// SvDataPipe_Impl
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index eeab479..1c51898 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -182,17 +182,6 @@ void SvPersistStream::SetStream( SvStream * pStream )
}
}
-/** Returns the identifier of this stream class.
-
- @return ID_PERSISTSTREAM
-
- @see SvStream::IsA
-*/
-sal_uInt16 SvPersistStream::IsA() const
-{
- return ID_PERSISTSTREAM;
-}
-
void SvPersistStream::ResetError()
{
SvStream::ResetError();
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index dcfc40c..086f797 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -431,11 +431,6 @@ SvStream::~SvStream()
delete[] pRWBuf;
}
-sal_uInt16 SvStream::IsA() const
-{
- return (sal_uInt16)ID_STREAM;
-}
-
void SvStream::ClearError()
{
bIsEof = false;
@@ -1726,11 +1721,6 @@ SvMemoryStream::~SvMemoryStream()
}
}
-sal_uInt16 SvMemoryStream::IsA() const
-{
- return (sal_uInt16)ID_MEMORYSTREAM;
-}
-
const void* SvMemoryStream::GetBuffer()
{
Flush();
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 9a937fe..010bcc6 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -306,11 +306,6 @@ SvFileStream::~SvFileStream()
delete pInstanceData;
}
-sal_uInt16 SvFileStream::IsA() const
-{
- return ID_FILESTREAM;
-}
-
sal_Size SvFileStream::GetData( void* pData, sal_Size nSize )
{
#ifdef DBG_UTIL
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index 29e0923..d5f519f 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -133,11 +133,6 @@ SvFileStream::~SvFileStream()
delete pInstanceData;
}
-sal_uInt16 SvFileStream::IsA() const
-{
- return ID_FILESTREAM;
-}
-
/// Does not check for EOF, makes isEof callable
sal_Size SvFileStream::GetData( void* pData, sal_Size nSize )
{
commit 1258b576aef2ff3cdd4f44e1c03edb8c862a79f6
Author: Michael Stahl <mstahl at redhat.com>
Date: Sat Mar 29 01:19:24 2014 +0100
tools: support 64-bit file positions in SvStream
Bump stream positions to 64 bits on:
SvLockBytes::SetSize()
SvStream::SeekPos()
SvStream::SetSize()
SvStream::SetStreamSize()
SvStream::Seek()
SvStream::SeekRel()
SvStream::Tell()
SvStream::remainingSize()
SvStream::nActPos
SvStream::nBufFilePos
Change-Id: I0521fd60d31d1a33e5634cbf51dd42edc46ad919
TODO: adapt callers of Seek()/SeekRel()/Tell()/remainingSize()
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index 6af1645..47be5b2 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -50,7 +50,7 @@ public:
virtual ErrCode ReadAt( sal_uInt64 nPos, void* pBuffer, sal_Size nCount, sal_Size * pRead ) const SAL_OVERRIDE;
virtual ErrCode WriteAt( sal_uInt64 nPos, const void* pBuffer, sal_Size nCount, sal_Size * pWritten ) SAL_OVERRIDE;
virtual ErrCode Flush() const SAL_OVERRIDE;
- virtual ErrCode SetSize( sal_Size nSize ) SAL_OVERRIDE;
+ virtual ErrCode SetSize( sal_uInt64 nSize ) SAL_OVERRIDE;
virtual ErrCode Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const SAL_OVERRIDE;
};
@@ -145,7 +145,7 @@ ErrCode ImgProdLockBytes::Flush() const
-ErrCode ImgProdLockBytes::SetSize( sal_Size nSize )
+ErrCode ImgProdLockBytes::SetSize(sal_uInt64 const nSize)
{
if( GetStream() )
return SvLockBytes::SetSize( nSize );
diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx
index 2ce9bf5..b0c5b46 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -56,7 +56,7 @@ friend class SotStorage;
protected:
virtual sal_uLong GetData( void* pData, sal_uLong nSize ) SAL_OVERRIDE;
virtual sal_uLong PutData( const void* pData, sal_uLong nSize ) SAL_OVERRIDE;
- virtual sal_uLong SeekPos( sal_uLong nPos ) SAL_OVERRIDE;
+ virtual sal_uInt64 SeekPos(sal_uInt64 nPos) SAL_OVERRIDE;
virtual void FlushData() SAL_OVERRIDE;
~SotStorageStream();
public:
@@ -77,13 +77,13 @@ public:
virtual void ResetError() SAL_OVERRIDE;
- virtual void SetSize( sal_uLong nNewSize ) SAL_OVERRIDE;
+ virtual void SetSize( sal_uInt64 nNewSize ) SAL_OVERRIDE;
sal_uInt32 GetSize() const;
bool CopyTo( SotStorageStream * pDestStm );
virtual bool Commit();
virtual bool Revert();
bool SetProperty( const OUString& rName, const ::com::sun::star::uno::Any& rValue );
- virtual sal_Size remainingSize() SAL_OVERRIDE;
+ virtual sal_uInt64 remainingSize() SAL_OVERRIDE;
};
#ifndef SOT_DECL_SOTSTORAGESTREAM_DEFINED
diff --git a/include/svl/instrm.hxx b/include/svl/instrm.hxx
index 149b0f7..441238f 100644
--- a/include/svl/instrm.hxx
+++ b/include/svl/instrm.hxx
@@ -47,11 +47,11 @@ class SVL_DLLPUBLIC SvInputStream: public SvStream
SVL_DLLPRIVATE virtual sal_uLong PutData(void const *, sal_uLong) SAL_OVERRIDE;
- SVL_DLLPRIVATE virtual sal_uLong SeekPos(sal_uLong nPos) SAL_OVERRIDE;
+ SVL_DLLPRIVATE virtual sal_uInt64 SeekPos(sal_uInt64 nPos) SAL_OVERRIDE;
SVL_DLLPRIVATE virtual void FlushData() SAL_OVERRIDE;
- SVL_DLLPRIVATE virtual void SetSize(sal_uLong) SAL_OVERRIDE;
+ SVL_DLLPRIVATE virtual void SetSize(sal_uInt64) SAL_OVERRIDE;
public:
SvInputStream(
diff --git a/include/svl/outstrm.hxx b/include/svl/outstrm.hxx
index 8ab49a6..a0bea05 100644
--- a/include/svl/outstrm.hxx
+++ b/include/svl/outstrm.hxx
@@ -38,11 +38,11 @@ class SVL_DLLPUBLIC SvOutputStream: public SvStream
SVL_DLLPRIVATE virtual sal_uLong PutData(void const * pData, sal_uLong nSize) SAL_OVERRIDE;
- SVL_DLLPRIVATE virtual sal_uLong SeekPos(sal_uLong) SAL_OVERRIDE;
+ SVL_DLLPRIVATE virtual sal_uInt64 SeekPos(sal_uInt64) SAL_OVERRIDE;
SVL_DLLPRIVATE virtual void FlushData() SAL_OVERRIDE;
- SVL_DLLPRIVATE virtual void SetSize(sal_uLong) SAL_OVERRIDE;
+ SVL_DLLPRIVATE virtual void SetSize(sal_uInt64) SAL_OVERRIDE;
public:
SvOutputStream(com::sun::star::uno::Reference<
diff --git a/include/svl/strmadpt.hxx b/include/svl/strmadpt.hxx
index 5f54056..872a850 100644
--- a/include/svl/strmadpt.hxx
+++ b/include/svl/strmadpt.hxx
@@ -50,7 +50,7 @@ public:
virtual ErrCode Flush() const SAL_OVERRIDE;
- virtual ErrCode SetSize(sal_uLong) SAL_OVERRIDE;
+ virtual ErrCode SetSize(sal_uInt64) SAL_OVERRIDE;
virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const SAL_OVERRIDE;
diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx
index f43603e..cf42246 100644
--- a/include/tools/pstm.hxx
+++ b/include/tools/pstm.hxx
@@ -197,7 +197,7 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ) SAL_OVERRIDE;
virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize ) SAL_OVERRIDE;
- virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos ) SAL_OVERRIDE;
+ virtual sal_uInt64 SeekPos(sal_uInt64 nPos) SAL_OVERRIDE;
virtual void FlushData() SAL_OVERRIDE;
protected:
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 448b481..7732d6d 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -70,7 +70,7 @@ typedef sal_uInt16 StreamMode;
#define STREAM_STD_READWRITE (STREAM_READWRITE | STREAM_SHARE_DENYALL)
#define STREAM_SEEK_TO_BEGIN 0L
-#define STREAM_SEEK_TO_END ULONG_MAX
+#define STREAM_SEEK_TO_END SAL_MAX_UINT64
#define NUMBERFORMAT_INT_BIGENDIAN (sal_uInt16)0x0000
#define NUMBERFORMAT_INT_LITTLEENDIAN (sal_uInt16)0xFFFF
@@ -136,7 +136,7 @@ public:
virtual ErrCode Flush() const;
- virtual ErrCode SetSize(sal_Size nSize);
+ virtual ErrCode SetSize(sal_uInt64 nSize);
virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const;
};
@@ -204,7 +204,7 @@ private:
// LockBytes Interface
void* pImp; // unused
SvLockBytesRef xLockBytes; // Default implementation
- sal_Size nActPos;
+ sal_uInt64 m_nActPos;
// Puffer-Verwaltung
sal_uInt8* pRWBuf; // Points to read/write buffer
@@ -244,15 +244,15 @@ private:
SvStream& operator=( const SvStream& rStream ); // not implemented
protected:
- sal_Size nBufFilePos;///< File position of pBuf[0]
+ sal_uInt64 m_nBufFilePos; ///< File position of pBuf[0]
sal_uInt16 eStreamMode;
bool bIsWritable;
virtual sal_Size GetData( void* pData, sal_Size nSize );
virtual sal_Size PutData( const void* pData, sal_Size nSize );
- virtual sal_Size SeekPos( sal_Size nPos );
+ virtual sal_uInt64 SeekPos( sal_uInt64 nPos );
virtual void FlushData();
- virtual void SetSize( sal_Size nSize );
+ virtual void SetSize(sal_uInt64 nSize);
void ClearError();
void ClearBuffer();
@@ -339,15 +339,15 @@ public:
sal_Size Read( void* pData, sal_Size nSize );
sal_Size Write( const void* pData, sal_Size nSize );
- sal_Size Seek( sal_Size nPos );
- sal_Size SeekRel( sal_sSize nPos );
- sal_Size Tell() const { return nBufFilePos+nBufActualPos; }
+ sal_uInt64 Seek( sal_uInt64 nPos );
+ sal_uInt64 SeekRel( sal_Int64 nPos );
+ sal_uInt64 Tell() const { return m_nBufFilePos + nBufActualPos; }
// length between current (Tell()) pos and end of stream
- virtual sal_Size remainingSize();
+ virtual sal_uInt64 remainingSize();
void Flush();
bool IsEof() const { return bIsEof; }
// next Tell() <= nSize
- bool SetStreamSize( sal_Size nSize );
+ bool SetStreamSize( sal_uInt64 nSize );
/** Read a line of bytes.
@@ -662,8 +662,8 @@ private:
protected:
virtual sal_Size GetData( void* pData, sal_Size nSize ) SAL_OVERRIDE;
virtual sal_Size PutData( const void* pData, sal_Size nSize ) SAL_OVERRIDE;
- virtual sal_Size SeekPos( sal_Size nPos ) SAL_OVERRIDE;
- virtual void SetSize( sal_Size nSize ) SAL_OVERRIDE;
+ virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) SAL_OVERRIDE;
+ virtual void SetSize( sal_uInt64 nSize ) SAL_OVERRIDE;
virtual void FlushData() SAL_OVERRIDE;
public:
@@ -703,8 +703,8 @@ protected:
virtual sal_Size GetData( void* pData, sal_Size nSize ) SAL_OVERRIDE;
virtual sal_Size PutData( const void* pData, sal_Size nSize ) SAL_OVERRIDE;
- virtual sal_Size SeekPos( sal_Size nPos ) SAL_OVERRIDE;
- virtual void SetSize( sal_Size nSize ) SAL_OVERRIDE;
+ virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) SAL_OVERRIDE;
+ virtual void SetSize( sal_uInt64 nSize ) SAL_OVERRIDE;
virtual void FlushData() SAL_OVERRIDE;
/// AllocateMemory must update pBuf accordingly
@@ -747,7 +747,7 @@ public:
bool IsObjectMemoryOwner() { return bOwnsData; }
void SetResizeOffset( sal_Size nNewResize ) { nResize = nNewResize; }
sal_Size GetResizeOffset() const { return nResize; }
- virtual sal_Size remainingSize() SAL_OVERRIDE { return GetBufSize() - Tell(); }
+ virtual sal_uInt64 remainingSize() SAL_OVERRIDE { return GetBufSize() - Tell(); }
};
class TOOLS_DLLPUBLIC SvScriptStream: public SvStream
diff --git a/include/unotools/ucblockbytes.hxx b/include/unotools/ucblockbytes.hxx
index 8bb15e7..a8b854a 100644
--- a/include/unotools/ucblockbytes.hxx
+++ b/include/unotools/ucblockbytes.hxx
@@ -134,8 +134,8 @@ public:
virtual void SetSynchronMode (bool bSynchron) 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 Flush() const SAL_OVERRIDE;
+ virtual ErrCode SetSize(sal_uInt64) SAL_OVERRIDE;
virtual ErrCode Stat ( SvLockBytesStat *pStat, SvLockBytesStatFlag) const SAL_OVERRIDE;
void SetError( ErrCode nError )
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx
index b27f957..54d1925 100644
--- a/lotuswordpro/source/filter/bento.hxx
+++ b/lotuswordpro/source/filter/bento.hxx
@@ -190,8 +190,8 @@ protected: // Overridden methods
virtual sal_uLong GetData( void* pData, sal_uLong nSize ) SAL_OVERRIDE;
virtual sal_uLong PutData( const void* pData, sal_uLong nSize ) SAL_OVERRIDE;
- virtual sal_uLong SeekPos( sal_uLong nPos ) SAL_OVERRIDE;
- virtual void SetSize( sal_uLong nSize ) SAL_OVERRIDE;
+ virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) SAL_OVERRIDE;
+ virtual void SetSize( sal_uInt64 nSize ) SAL_OVERRIDE;
virtual void FlushData() SAL_OVERRIDE;
private: // Data
diff --git a/lotuswordpro/source/filter/utbenvs.cxx b/lotuswordpro/source/filter/utbenvs.cxx
index 4bbc6b8..ea67781 100644
--- a/lotuswordpro/source/filter/utbenvs.cxx
+++ b/lotuswordpro/source/filter/utbenvs.cxx
@@ -97,7 +97,7 @@ sal_uLong LtcUtBenValueStream::PutData( const void* /*pData*/, sal_uLong nSize
* @param position in value stream
* @return current position in value stream
*/
- sal_uLong LtcUtBenValueStream::SeekPos( sal_uLong nPos )
+sal_uInt64 LtcUtBenValueStream::SeekPos(sal_uInt64 const nPos)
{
if (nPos <= m_ulValueLength)
cCurrentPosition = nPos;
@@ -111,7 +111,7 @@ sal_uLong LtcUtBenValueStream::PutData( const void* /*pData*/, sal_uLong nSize
* @param size of buffer
* @return
*/
- void LtcUtBenValueStream::SetSize( sal_uLong /*nSize*/ )
+ void LtcUtBenValueStream::SetSize( sal_uInt64 /*nSize*/ )
{
//pLtcBenContainer pContainer = cpValue->GetContainer();
//pContainer->GetStream()->SetStreamSize(nSize);
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 301899d..0b9d0b5 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -68,7 +68,7 @@ sal_uLong StgInternalStream::PutData( const void* pData, sal_uLong nSize )
return 0;
}
-sal_uLong StgInternalStream::SeekPos( sal_uLong nPos )
+sal_uInt64 StgInternalStream::SeekPos(sal_uInt64 const nPos)
{
return pStrm ? pStrm->Seek( nPos ) : 0;
}
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index f1d1fa2..680daf2 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -1187,7 +1187,7 @@ sal_uLong StgTmpStrm::GetSize() const
return n;
}
-void StgTmpStrm::SetSize( sal_uLong n )
+void StgTmpStrm::SetSize(sal_uInt64 n)
{
if( pStrm )
pStrm->SetStreamSize( n );
@@ -1241,7 +1241,7 @@ void StgTmpStrm::SetSize( sal_uLong n )
{
if( n > nEndOfData )
{
- sal_uLong nCur = Tell();
+ sal_uInt64 nCur = Tell();
Seek( nEndOfData - 1 );
WriteUChar( (sal_uInt8) 0 );
Seek( nCur );
@@ -1284,7 +1284,7 @@ sal_uLong StgTmpStrm::PutData( const void* pData, sal_uLong n )
return nNew;
}
-sal_uLong StgTmpStrm::SeekPos( sal_uLong n )
+sal_uInt64 StgTmpStrm::SeekPos(sal_uInt64 n)
{
if( n == STREAM_SEEK_TO_END )
n = GetSize();
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 5f18003..217df32 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -160,7 +160,7 @@ sal_uLong SotStorageStream::PutData( const void* pData, sal_uLong nSize )
return nRet;
}
-sal_uLong SotStorageStream::SeekPos( sal_uLong nPos )
+sal_uInt64 SotStorageStream::SeekPos(sal_uInt64 nPos)
{
sal_uLong nRet = 0;
@@ -186,9 +186,9 @@ void SotStorageStream::FlushData()
SvStream::FlushData();
}
-void SotStorageStream::SetSize( sal_uLong nNewSize )
+void SotStorageStream::SetSize(sal_uInt64 const nNewSize)
{
- sal_uLong nPos = Tell();
+ sal_uInt64 const nPos = Tell();
if( pOwnStm )
{
pOwnStm->SetSize( nNewSize );
@@ -211,7 +211,7 @@ sal_uInt32 SotStorageStream::GetSize() const
return nSize;
}
-sal_Size SotStorageStream::remainingSize()
+sal_uInt64 SotStorageStream::remainingSize()
{
if (pOwnStm)
return pOwnStm->GetSize() - Tell();
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 117c732..a27239c 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -407,8 +407,8 @@ public:
virtual sal_uLong GetData( void* pData, sal_uLong nSize ) SAL_OVERRIDE;
virtual sal_uLong PutData( const void* pData, sal_uLong nSize ) SAL_OVERRIDE;
- virtual sal_uLong SeekPos( sal_uLong nPos ) SAL_OVERRIDE;
- virtual void SetSize( sal_uLong nSize ) SAL_OVERRIDE;
+ virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) SAL_OVERRIDE;
+ virtual void SetSize( sal_uInt64 nSize ) SAL_OVERRIDE;
virtual void FlushData() SAL_OVERRIDE;
virtual void ResetError() SAL_OVERRIDE;
@@ -447,7 +447,7 @@ public:
BaseStorage* CreateStorage();// create an OLE Storage on the UCBStorageStream
sal_uLong GetSize();
- sal_uLong ReadSourceWriteTemporary( sal_uLong aLength ); // read aLength from source and copy to temporary,
+ sal_uInt64 ReadSourceWriteTemporary( sal_uInt64 aLength ); // read aLength from source and copy to temporary,
// no seeking is produced
sal_uLong ReadSourceWriteTemporary(); // read source till the end and copy to temporary,
@@ -827,12 +827,12 @@ sal_uLong UCBStorageStream_Impl::ReadSourceWriteTemporary()
}
-sal_uLong UCBStorageStream_Impl::ReadSourceWriteTemporary( sal_uLong aLength )
+sal_uInt64 UCBStorageStream_Impl::ReadSourceWriteTemporary(sal_uInt64 aLength)
{
// read aLength bite from the source stream and copy them to the current
// position of the temporary stream
- sal_uLong aResult = 0;
+ sal_uInt64 aResult = 0;
if( m_bSourceRead )
{
@@ -843,7 +843,7 @@ sal_uLong UCBStorageStream_Impl::ReadSourceWriteTemporary( sal_uLong aLength )
sal_uLong aReaded = 32000;
- for( sal_uLong pInd = 0; pInd < aLength && aReaded == 32000 ; pInd += 32000 )
+ for (sal_uInt64 pInd = 0; pInd < aLength && aReaded == 32000 ; pInd += 32000)
{
sal_uLong aToCopy = min( aLength - pInd, 32000 );
aReaded = m_rSource->readBytes( aData, aToCopy );
@@ -939,12 +939,12 @@ sal_uLong UCBStorageStream_Impl::PutData( const void* pData, sal_uLong nSize )
}
-sal_uLong UCBStorageStream_Impl::SeekPos( sal_uLong nPos )
+sal_uInt64 UCBStorageStream_Impl::SeekPos(sal_uInt64 const nPos)
{
if( !Init() )
return 0;
- sal_uLong aResult;
+ sal_uInt64 aResult;
if( nPos == STREAM_SEEK_TO_END )
{
@@ -996,7 +996,7 @@ sal_uLong UCBStorageStream_Impl::SeekPos( sal_uLong nPos )
return aResult;
}
-void UCBStorageStream_Impl::SetSize( sal_uLong nSize )
+void UCBStorageStream_Impl::SetSize(sal_uInt64 const nSize)
{
if ( !(m_nMode & STREAM_WRITE) )
{
@@ -1011,7 +1011,7 @@ void UCBStorageStream_Impl::SetSize( sal_uLong nSize )
if( m_bSourceRead )
{
- sal_uLong aPos = m_pStream->Tell();
+ sal_uInt64 const aPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
if( m_pStream->Tell() < nSize )
ReadSourceWriteTemporary( nSize - m_pStream->Tell() );
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index 31d7275..7746ec6 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -170,7 +170,7 @@ ErrCode SvOutputStreamOpenLockBytes::Flush() const
}
// virtual
-ErrCode SvOutputStreamOpenLockBytes::SetSize(sal_uLong)
+ErrCode SvOutputStreamOpenLockBytes::SetSize(sal_uInt64)
{
return ERRCODE_IO_NOTSUPPORTED;
}
@@ -547,7 +547,7 @@ void SvInputStream::FlushData()
{}
// virtual
-sal_uLong SvInputStream::SeekPos(sal_uLong nPos)
+sal_uInt64 SvInputStream::SeekPos(sal_uInt64 const nPos)
{
if (open())
{
@@ -614,7 +614,7 @@ sal_uLong SvInputStream::SeekPos(sal_uLong nPos)
}
// virtual
-void SvInputStream::SetSize(sal_uLong)
+void SvInputStream::SetSize(sal_uInt64)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
}
@@ -712,7 +712,7 @@ sal_uLong SvOutputStream::PutData(void const * pData, sal_uLong nSize)
}
// virtual
-sal_uLong SvOutputStream::SeekPos(sal_uLong)
+sal_uInt64 SvOutputStream::SeekPos(sal_uInt64)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
@@ -736,7 +736,7 @@ void SvOutputStream::FlushData()
}
// virtual
-void SvOutputStream::SetSize(sal_uLong)
+void SvOutputStream::SetSize(sal_uInt64)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
}
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index c9d1727..eeab479 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -216,10 +216,10 @@ sal_uIntPtr SvPersistStream::PutData( const void* pData, sal_uIntPtr nSize )
return nRet;
}
-sal_uIntPtr SvPersistStream::SeekPos( sal_uIntPtr nPos )
+sal_uInt64 SvPersistStream::SeekPos(sal_uInt64 const nPos)
{
DBG_ASSERT( pStm, "stream not set" );
- sal_uIntPtr nRet = pStm->Seek( nPos );
+ sal_uInt64 nRet = pStm->Seek( nPos );
SetError( pStm->GetError() );
return nRet;
}
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index ea2e186..dcfc40c 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -220,7 +220,7 @@ ErrCode SvLockBytes::Flush() const
}
// virtual
-ErrCode SvLockBytes::SetSize(sal_Size nSize)
+ErrCode SvLockBytes::SetSize(sal_uInt64 const nSize)
{
if (!m_pStream)
{
@@ -242,7 +242,7 @@ ErrCode SvLockBytes::Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const
if (pStat)
{
- sal_Size nPos = m_pStream->Tell();
+ sal_uInt64 const nPos = m_pStream->Tell();
pStat->nSize = m_pStream->Seek(STREAM_SEEK_TO_END);
m_pStream->Seek(nPos);
}
@@ -319,8 +319,8 @@ sal_Size SvStream::GetData( void* pData, sal_Size nSize )
{
DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
sal_Size nRet;
- nError = xLockBytes->ReadAt( nActPos, pData, nSize, &nRet );
- nActPos += nRet;
+ nError = xLockBytes->ReadAt(m_nActPos, pData, nSize, &nRet);
+ m_nActPos += nRet;
return nRet;
}
else return 0;
@@ -332,25 +332,25 @@ sal_Size SvStream::PutData( const void* pData, sal_Size nSize )
{
DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
sal_Size nRet;
- nError = xLockBytes->WriteAt( nActPos, pData, nSize, &nRet );
- nActPos += nRet;
+ nError = xLockBytes->WriteAt(m_nActPos, pData, nSize, &nRet);
+ m_nActPos += nRet;
return nRet;
}
else return 0;
}
-sal_Size SvStream::SeekPos( sal_Size nPos )
+sal_uInt64 SvStream::SeekPos(sal_uInt64 const nPos)
{
if( !GetError() && nPos == STREAM_SEEK_TO_END )
{
DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
SvLockBytesStat aStat;
xLockBytes->Stat( &aStat, SVSTATFLAG_DEFAULT );
- nActPos = aStat.nSize;
+ m_nActPos = aStat.nSize;
}
else
- nActPos = nPos;
- return nActPos;
+ m_nActPos = nPos;
+ return m_nActPos;
}
void SvStream::FlushData()
@@ -362,7 +362,7 @@ void SvStream::FlushData()
}
}
-void SvStream::SetSize( sal_Size nSize )
+void SvStream::SetSize(sal_uInt64 const nSize)
{
DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
nError = xLockBytes->SetSize( nSize );
@@ -370,7 +370,7 @@ void SvStream::SetSize( sal_Size nSize )
void SvStream::ImpInit()
{
- nActPos = 0;
+ m_nActPos = 0;
nCompressMode = COMPRESSMODE_NONE;
eStreamCharSet = osl_getThreadTextEncoding();
nCryptMask = 0;
@@ -383,7 +383,7 @@ void SvStream::ImpInit()
SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- nBufFilePos = 0;
+ m_nBufFilePos = 0;
nBufActualPos = 0;
bIsDirty = false;
bIsConsistent = true;
@@ -463,7 +463,7 @@ void SvStream::SetNumberFormatInt( sal_uInt16 nNewFormat )
void SvStream::SetBufferSize( sal_uInt16 nBufferSize )
{
- sal_Size nActualFilePos = Tell();
+ sal_uInt64 const nActualFilePos = Tell();
bool bDontSeek = (pRWBuf == 0);
if( bIsDirty && bIsConsistent && bIsWritable ) // due to Windows NT: Access denied
@@ -472,7 +472,7 @@ void SvStream::SetBufferSize( sal_uInt16 nBufferSize )
if( nBufSize )
{
delete[] pRWBuf;
- nBufFilePos += nBufActualPos;
+ m_nBufFilePos += nBufActualPos;
}
pRWBuf = 0;
@@ -492,7 +492,7 @@ void SvStream::ClearBuffer()
{
nBufActualLen = 0;
nBufActualPos = 0;
- nBufFilePos = 0;
+ m_nBufFilePos = 0;
pBufPos = pRWBuf;
bIsDirty = false;
bIsConsistent = true;
@@ -519,7 +519,7 @@ bool SvStream::ReadLine( OString& rStr, sal_Int32 nMaxBytesToRead )
{
sal_Char buf[256+1];
bool bEnd = false;
- sal_Size nOldFilePos = Tell();
+ sal_uInt64 nOldFilePos = Tell();
sal_Char c = 0;
sal_Size nTotalLen = 0;
@@ -593,7 +593,7 @@ bool SvStream::ReadUniStringLine( OUString& rStr, sal_Int32 nMaxCodepointsToRead
{
sal_Unicode buf[256+1];
bool bEnd = false;
- sal_Size nOldFilePos = Tell();
+ sal_uInt64 nOldFilePos = Tell();
sal_Unicode c = 0;
sal_Size nTotalLen = 0;
@@ -690,7 +690,7 @@ OString read_zeroTerminated_uInt8s_ToOString(SvStream& rStream)
sal_Char buf[ 256 + 1 ];
bool bEnd = false;
- sal_Size nFilePos = rStream.Tell();
+ sal_uInt64 nFilePos = rStream.Tell();
while( !bEnd && !rStream.GetError() )
{
@@ -857,18 +857,18 @@ bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
return nError == SVSTREAM_OK;
}
-sal_Size SvStream::SeekRel( sal_sSize nPos )
+sal_uInt64 SvStream::SeekRel(sal_Int64 const nPos)
{
- sal_Size nActualPos = Tell();
+ sal_uInt64 nActualPos = Tell();
if ( nPos >= 0 )
{
- if ( SAL_MAX_SIZE - nActualPos > (sal_Size)nPos )
+ if (SAL_MAX_UINT64 - nActualPos > static_cast<sal_uInt64>(nPos))
nActualPos += nPos;
}
else
{
- sal_Size nAbsPos = (sal_Size)-nPos;
+ sal_uInt64 const nAbsPos = static_cast<sal_uInt64>(-nPos);
if ( nActualPos >= nAbsPos )
nActualPos -= nAbsPos;
}
@@ -1262,7 +1262,7 @@ sal_Size SvStream::Read( void* pData, sal_Size nCount )
nCount = GetData( (char*)pData,nCount);
if( nCryptMask )
EncryptBuffer(pData, nCount);
- nBufFilePos += nCount;
+ m_nBufFilePos += nCount;
}
else
{
@@ -1281,7 +1281,7 @@ sal_Size SvStream::Read( void* pData, sal_Size nCount )
{
if( bIsDirty ) // Does stream require a flush?
{
- SeekPos( nBufFilePos );
+ SeekPos(m_nBufFilePos);
if( nCryptMask )
CryptAndWriteBuffer(pRWBuf, nBufActualLen);
else
@@ -1297,22 +1297,22 @@ sal_Size SvStream::Read( void* pData, sal_Size nCount )
bIoRead = false;
- SeekPos( nBufFilePos + nBufActualPos );
+ SeekPos(m_nBufFilePos + nBufActualPos);
nBufActualLen = 0;
pBufPos = pRWBuf;
nCount = GetData( (char*)pData, nCount );
if( nCryptMask )
EncryptBuffer(pData, nCount);
- nBufFilePos += nCount;
- nBufFilePos += nBufActualPos;
+ m_nBufFilePos += nCount;
+ m_nBufFilePos += nBufActualPos;
nBufActualPos = 0;
}
else
{
// => Yes. Fill buffer first, then copy to target area
- nBufFilePos += nBufActualPos;
- SeekPos( nBufFilePos );
+ m_nBufFilePos += nBufActualPos;
+ SeekPos(m_nBufFilePos);
// TODO: Typecast before GetData, sal_uInt16 nCountTmp
sal_Size nCountTmp = GetData( pRWBuf, nBufSize );
@@ -1356,7 +1356,7 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
nCount = CryptAndWriteBuffer( pData, nCount );
else
nCount = PutData( (char*)pData, nCount );
- nBufFilePos += nCount;
+ m_nBufFilePos += nCount;
return nCount;
}
@@ -1378,7 +1378,7 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
// Does stream require flushing?
if( bIsDirty )
{
- SeekPos( nBufFilePos );
+ SeekPos(m_nBufFilePos);
if( nCryptMask )
CryptAndWriteBuffer( pRWBuf, (sal_Size)nBufActualLen );
else
@@ -1390,16 +1390,16 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
if( nCount > nBufSize )
{
bIoWrite = false;
- nBufFilePos += nBufActualPos;
+ m_nBufFilePos += nBufActualPos;
nBufActualLen = 0;
nBufActualPos = 0;
pBufPos = pRWBuf;
- SeekPos( nBufFilePos );
+ SeekPos(m_nBufFilePos);
if( nCryptMask )
nCount = CryptAndWriteBuffer( pData, nCount );
else
nCount = PutData( (char*)pData, nCount );
- nBufFilePos += nCount;
+ m_nBufFilePos += nCount;
}
else
{
@@ -1407,7 +1407,7 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
memcpy( pRWBuf, pData, (size_t)nCount );
// Mind the order!
- nBufFilePos += nBufActualPos;
+ m_nBufFilePos += nBufActualPos;
nBufActualPos = (sal_uInt16)nCount;
pBufPos = pRWBuf + nCount;
nBufActualLen = (sal_uInt16)nCount;
@@ -1418,21 +1418,21 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
return nCount;
}
-sal_Size SvStream::Seek( sal_Size nFilePos )
+sal_uInt64 SvStream::Seek(sal_uInt64 const nFilePos)
{
bIoRead = bIoWrite = false;
bIsEof = false;
if( !pRWBuf )
{
- nBufFilePos = SeekPos( nFilePos );
- DBG_ASSERT(Tell()==nBufFilePos,"Out Of Sync!");
- return nBufFilePos;
+ m_nBufFilePos = SeekPos( nFilePos );
+ DBG_ASSERT(Tell() == m_nBufFilePos,"Out Of Sync!");
+ return m_nBufFilePos;
}
// Is seek position within buffer?
- if( nFilePos >= nBufFilePos && nFilePos <= (nBufFilePos + nBufActualLen))
+ if (nFilePos >= m_nBufFilePos && nFilePos <= (m_nBufFilePos + nBufActualLen))
{
- nBufActualPos = (sal_uInt16)(nFilePos - nBufFilePos);
+ nBufActualPos = (sal_uInt16)(nFilePos - m_nBufFilePos);
pBufPos = pRWBuf + nBufActualPos;
// Update nBufFree to avoid crash upon PutBack
nBufFree = nBufActualLen - nBufActualPos;
@@ -1441,7 +1441,7 @@ sal_Size SvStream::Seek( sal_Size nFilePos )
{
if( bIsDirty && bIsConsistent)
{
- SeekPos( nBufFilePos );
+ SeekPos(m_nBufFilePos);
if( nCryptMask )
CryptAndWriteBuffer( pRWBuf, nBufActualLen );
else
@@ -1451,25 +1451,25 @@ sal_Size SvStream::Seek( sal_Size nFilePos )
nBufActualLen = 0;
nBufActualPos = 0;
pBufPos = pRWBuf;
- nBufFilePos = SeekPos( nFilePos );
+ m_nBufFilePos = SeekPos( nFilePos );
}
#ifdef OV_DEBUG
{
- sal_Size nDebugTemp = nBufFilePos + nBufActualPos;
+ sal_uInt64 nDebugTemp = m_nBufFilePos + nBufActualPos;
DBG_ASSERT(Tell()==nDebugTemp,"Sync?");
}
#endif
- return nBufFilePos + nBufActualPos;
+ return m_nBufFilePos + nBufActualPos;
}
//STREAM_SEEK_TO_END in the some of the Seek backends is special cased to be
//efficient, in others e.g. SotStorageStream it's really horribly slow, and in
//those this should be overridden
-sal_Size SvStream::remainingSize()
+sal_uInt64 SvStream::remainingSize()
{
- sal_Size nCurr = Tell();
- sal_Size nEnd = Seek(STREAM_SEEK_TO_END);
- sal_Size nMaxAvailable = nEnd-nCurr;
+ sal_uInt64 const nCurr = Tell();
+ sal_uInt64 const nEnd = Seek(STREAM_SEEK_TO_END);
+ sal_uInt64 nMaxAvailable = nEnd-nCurr;
Seek(nCurr);
return nMaxAvailable;
}
@@ -1478,7 +1478,7 @@ void SvStream::Flush()
{
if( bIsDirty && bIsConsistent )
{
- SeekPos( nBufFilePos );
+ SeekPos(m_nBufFilePos);
if( nCryptMask )
CryptAndWriteBuffer( pRWBuf, (sal_Size)nBufActualLen );
else
@@ -1494,14 +1494,14 @@ void SvStream::RefreshBuffer()
{
if( bIsDirty && bIsConsistent )
{
- SeekPos( nBufFilePos );
+ SeekPos(m_nBufFilePos);
if( nCryptMask )
CryptAndWriteBuffer( pRWBuf, (sal_Size)nBufActualLen );
else
PutData( pRWBuf, nBufActualLen );
bIsDirty = false;
}
- SeekPos( nBufFilePos );
+ SeekPos(m_nBufFilePos);
nBufActualLen = (sal_uInt16)GetData( pRWBuf, nBufSize );
if( nBufActualLen && nError == ERRCODE_IO_PENDING )
nError = ERRCODE_NONE;
@@ -1621,7 +1621,7 @@ void SvStream::SetCryptMaskKey(const OString& rCryptMaskKey)
void SvStream::SyncSvStream( sal_Size nNewStreamPos )
{
ClearBuffer();
- SvStream::nBufFilePos = nNewStreamPos;
+ SvStream::m_nBufFilePos = nNewStreamPos;
}
void SvStream::SyncSysStream()
@@ -1630,10 +1630,10 @@ void SvStream::SyncSysStream()
SeekPos( Tell() );
}
-bool SvStream::SetStreamSize( sal_Size nSize )
+bool SvStream::SetStreamSize(sal_uInt64 const nSize)
{
#ifdef DBG_UTIL
- sal_Size nFPos = Tell();
+ sal_uInt64 nFPos = Tell();
#endif
sal_uInt16 nBuf = nBufSize;
SetBufferSize( 0 );
@@ -1740,8 +1740,8 @@ const void* SvMemoryStream::GetBuffer()
sal_uIntPtr SvMemoryStream::GetSize()
{
Flush();
- sal_uIntPtr nTemp = Tell();
- sal_uIntPtr nLength = Seek( STREAM_SEEK_TO_END );
+ sal_uInt64 const nTemp = Tell();
+ sal_uInt64 const nLength = Seek( STREAM_SEEK_TO_END );
Seek( nTemp );
return nLength;
}
@@ -1842,7 +1842,7 @@ sal_Size SvMemoryStream::PutData( const void* pData, sal_Size nCount )
return nCount;
}
-sal_Size SvMemoryStream::SeekPos( sal_Size nNewPos )
+sal_uInt64 SvMemoryStream::SeekPos(sal_uInt64 const nNewPos)
{
// nEndOfData: First position in stream not allowed to read from
// nSize: Size of allocated buffer
@@ -1975,7 +1975,7 @@ void* SvMemoryStream::SwitchBuffer( sal_Size nInitSize, sal_Size nResizeOffset)
return pRetVal;
}
-void SvMemoryStream::SetSize( sal_Size nNewSize )
+void SvMemoryStream::SetSize(sal_uInt64 const nNewSize)
{
long nDiff = (long)nNewSize - (long)nSize;
ReAllocateMemory( nDiff );
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 6cfbca5..9a937fe 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -361,7 +361,7 @@ sal_Size SvFileStream::PutData( const void* pData, sal_Size nSize )
return (sal_Size)nWrite;
}
-sal_Size SvFileStream::SeekPos( sal_Size nPos )
+sal_uInt64 SvFileStream::SeekPos(sal_uInt64 const nPos)
{
if ( IsOpen() )
{
@@ -593,7 +593,7 @@ void SvFileStream::ResetError()
SvStream::ClearError();
}
-void SvFileStream::SetSize (sal_Size nSize)
+void SvFileStream::SetSize (sal_uInt64 const nSize)
{
if (IsOpen())
{
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index 9a6ce98..29e0923 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -165,7 +165,7 @@ sal_Size SvFileStream::PutData( const void* pData, sal_Size nSize )
return nCount;
}
-sal_Size SvFileStream::SeekPos( sal_Size nPos )
+sal_uInt64 SvFileStream::SeekPos(sal_uInt64 const nPos)
{
DWORD nNewPos = 0;
if( IsOpen() )
@@ -184,7 +184,7 @@ sal_Size SvFileStream::SeekPos( sal_Size nPos )
}
else
SetError( SVSTREAM_GENERALERROR );
- return (sal_Size)nNewPos;
+ return static_cast<sal_uInt64>(nNewPos);
}
void SvFileStream::FlushData()
@@ -410,7 +410,7 @@ void SvFileStream::ResetError()
SvStream::ClearError();
}
-void SvFileStream::SetSize( sal_Size nSize )
+void SvFileStream::SetSize(sal_uInt64 const nSize)
{
if( IsOpen() )
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 4d49bc1..6585818 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1502,7 +1502,7 @@ ErrCode UcbLockBytes::Flush() const
}
-ErrCode UcbLockBytes::SetSize (sal_uLong nNewSize)
+ErrCode UcbLockBytes::SetSize (sal_uInt64 const nNewSize)
{
SvLockBytesStat aStat;
Stat( &aStat, (SvLockBytesStatFlag) 0 );
commit 19bbfc0b39d79a90539fd3094d9b6d7d81619a45
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Mar 28 23:03:57 2014 +0100
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
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index aca7b5e..6af1645 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -47,8 +47,8 @@ public:
ImgProdLockBytes( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > & rStreamRef );
virtual ~ImgProdLockBytes();
- virtual ErrCode ReadAt( sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pRead ) const SAL_OVERRIDE;
- virtual ErrCode WriteAt( sal_Size nPos, const void* pBuffer, sal_Size nCount, sal_Size* pWritten ) SAL_OVERRIDE;
+ virtual ErrCode ReadAt( sal_uInt64 nPos, void* pBuffer, sal_Size nCount, sal_Size * pRead ) const SAL_OVERRIDE;
+ virtual ErrCode WriteAt( sal_uInt64 nPos, const void* pBuffer, sal_Size nCount, sal_Size * pWritten ) SAL_OVERRIDE;
virtual ErrCode Flush() const SAL_OVERRIDE;
virtual ErrCode SetSize( sal_Size nSize ) SAL_OVERRIDE;
virtual ErrCode Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const SAL_OVERRIDE;
@@ -94,9 +94,8 @@ ImgProdLockBytes::~ImgProdLockBytes()
{
}
-
-
-ErrCode ImgProdLockBytes::ReadAt( sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pRead ) const
+ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos,
+ void* pBuffer, sal_Size nCount, sal_Size * pRead) const
{
if( GetStream() )
{
@@ -125,9 +124,8 @@ ErrCode ImgProdLockBytes::ReadAt( sal_Size nPos, void* pBuffer, sal_Size nCount,
}
}
-
-
-ErrCode ImgProdLockBytes::WriteAt( sal_Size nPos, const void* pBuffer, sal_Size nCount, sal_Size* pWritten )
+ErrCode ImgProdLockBytes::WriteAt(sal_uInt64 const nPos,
+ const void* pBuffer, sal_Size nCount, sal_Size * pWritten)
{
if( GetStream() )
return SvLockBytes::WriteAt( nPos, pBuffer, nCount, pWritten );
diff --git a/include/svl/strmadpt.hxx b/include/svl/strmadpt.hxx
index 7117a6e..5f54056 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 929432a..448b481 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 7f4d19d..6cf1860 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 049ca69..8bb15e7 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;
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 61f4030..143c41d 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -931,7 +931,7 @@ OutlineToImpressFinalizer::OutlineToImpressFinalizer (
static const sal_Size nBufferSize = 4096;
::boost::scoped_array<sal_Int8> pBuffer (new sal_Int8[nBufferSize]);
- sal_Size nReadPosition (0);
+ sal_uInt64 nReadPosition(0);
bool bLoop (true);
while (bLoop)
{
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index d582018..31d7275 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,
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 71a06de..ea2e186 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -173,7 +173,7 @@ void SvLockBytes::close()
TYPEINIT0(SvLockBytes);
// virtual
-ErrCode SvLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
+ErrCode SvLockBytes::ReadAt(sal_uInt64 const nPos, void * pBuffer, sal_Size nCount,
sal_Size * pRead) const
{
if (!m_pStream)
@@ -190,7 +190,7 @@ ErrCode SvLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
}
// virtual
-ErrCode SvLockBytes::WriteAt(sal_Size nPos, const void * pBuffer, sal_Size nCount,
+ErrCode SvLockBytes::WriteAt(sal_uInt64 const nPos, const void * pBuffer, sal_Size nCount,
sal_Size * pWritten)
{
if (!m_pStream)
@@ -258,7 +258,7 @@ TYPEINIT1(SvOpenLockBytes, SvLockBytes);
TYPEINIT1(SvAsyncLockBytes, SvOpenLockBytes);
// virtual
-ErrCode SvAsyncLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
+ErrCode SvAsyncLockBytes::ReadAt(sal_uInt64 const nPos, void * pBuffer, sal_Size nCount,
sal_Size * pRead) const
{
if (m_bTerminated)
@@ -274,7 +274,7 @@ ErrCode SvAsyncLockBytes::ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
}
// virtual
-ErrCode SvAsyncLockBytes::WriteAt(sal_Size nPos, const void * pBuffer,
+ErrCode SvAsyncLockBytes::WriteAt(sal_uInt64 const nPos, const void * pBuffer,
sal_Size nCount, sal_Size * pWritten)
{
if (m_bTerminated)
@@ -304,7 +304,7 @@ ErrCode SvAsyncLockBytes::FillAppend(const void * pBuffer, sal_Size nCount,
}
// virtual
-sal_Size SvAsyncLockBytes::Seek(sal_Size nPos)
+sal_uInt64 SvAsyncLockBytes::Seek(sal_uInt64 const nPos)
{
if (nPos != STREAM_SEEK_TO_END)
m_nSize = nPos;
diff --git a/unotools/source/streaming/streamhelper.cxx b/unotools/source/streaming/streamhelper.cxx
index 519e6c7..569d6e1 100644
--- a/unotools/source/streaming/streamhelper.cxx
+++ b/unotools/source/streaming/streamhelper.cxx
@@ -47,10 +47,9 @@ sal_Int32 SAL_CALL OInputStreamHelper::readBytes(staruno::Sequence< sal_Int8 >&
::osl::MutexGuard aGuard( m_aMutex );
aData.realloc(nBytesToRead);
- sal_Size nRead;
+ sal_Size nRead(0);
ErrCode nError = m_xLockBytes->ReadAt(m_nActPos, (void*)aData.getArray(), nBytesToRead, &nRead);
- // FIXME nRead could be truncated on 64-bit arches
- m_nActPos += (sal_uInt32)nRead;
+ m_nActPos += nRead;
if (nError != ERRCODE_NONE)
throw stario::IOException(OUString(), static_cast<staruno::XWeak*>(this));
@@ -65,9 +64,7 @@ sal_Int32 SAL_CALL OInputStreamHelper::readBytes(staruno::Sequence< sal_Int8 >&
void SAL_CALL OInputStreamHelper::seek( sal_Int64 location ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- // cast is truncating, but position would be truncated as soon as
- // put into SvLockBytes anyway
- m_nActPos = sal::static_int_cast<sal_uInt32>(location);
+ m_nActPos = location;
}
sal_Int64 SAL_CALL OInputStreamHelper::getPosition( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 7253eff..4d49bc1 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1374,7 +1374,8 @@ void UcbLockBytes::SetSynchronMode (bool bSynchron)
}
-ErrCode UcbLockBytes::ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount, sal_uLong *pRead) const
+ErrCode UcbLockBytes::ReadAt(sal_uInt64 const nPos,
+ void *pBuffer, sal_uLong nCount, sal_uLong *pRead) const
{
if ( IsSynchronMode() )
{
@@ -1442,7 +1443,8 @@ ErrCode UcbLockBytes::ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount,
}
-ErrCode UcbLockBytes::WriteAt ( sal_uLong nPos, const void *pBuffer, sal_uLong nCount, sal_uLong *pWritten)
+ErrCode UcbLockBytes::WriteAt(sal_uInt64 const nPos, const void *pBuffer,
+ sal_uLong nCount, sal_uLong *pWritten)
{
if ( pWritten )
*pWritten = 0;
commit 655a39d8c0d151618d7c3b3fe0dcff508c2b53c5
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Mar 28 23:31:23 2014 +0100
basic: for PutData()/GetData() actually 32bits should be enough
Change-Id: I3c605a1e5b46d262ff557dac280b15136467b906
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index e5f868f1..c4bd913 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -313,8 +313,8 @@ class OslStream : public SvStream
public:
OslStream( const OUString& rName, short nStrmMode );
~OslStream();
- virtual sal_uInt64 GetData( void* pData, sal_uInt64 nSize ) SAL_OVERRIDE;
- virtual sal_uInt64 PutData( const void* pData, sal_uInt64 nSize ) SAL_OVERRIDE;
+ virtual sal_Size GetData( void* pData, sal_Size nSize ) SAL_OVERRIDE;
+ virtual sal_Size PutData( const void* pData, sal_Size nSize ) SAL_OVERRIDE;
virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) SAL_OVERRIDE;
virtual void FlushData() SAL_OVERRIDE;
virtual void SetSize( sal_uInt64 nSize) SAL_OVERRIDE;
@@ -357,16 +357,16 @@ OslStream::~OslStream()
maFile.close();
}
-sal_uInt64 OslStream::GetData( void* pData, sal_uInt64 nSize )
+sal_Size OslStream::GetData(void* pData, sal_Size nSize)
{
- sal_uInt64 nBytesRead = nSize;
+ sal_Size nBytesRead = nSize;
maFile.read( pData, nBytesRead, nBytesRead );
return nBytesRead;
}
-sal_uInt64 OslStream::PutData( const void* pData, sal_uInt64 nSize )
+sal_Size OslStream::PutData(const void* pData, sal_Size nSize)
{
- sal_uInt64 nBytesWritten;
+ sal_Size nBytesWritten;
maFile.write( pData, nSize, nBytesWritten );
return nBytesWritten;
}
@@ -407,8 +407,8 @@ public:
UCBStream( Reference< XInputStream > & xIS );
UCBStream( Reference< XStream > & xS );
~UCBStream();
- virtual sal_uInt64 GetData( void* pData, sal_uInt64 nSize ) SAL_OVERRIDE;
- virtual sal_uInt64 PutData( const void* pData, sal_uInt64 nSize ) SAL_OVERRIDE;
+ virtual sal_Size GetData( void* pData, sal_Size nSize ) SAL_OVERRIDE;
+ virtual sal_Size PutData( const void* pData, sal_Size nSize ) SAL_OVERRIDE;
virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) SAL_OVERRIDE;
virtual void FlushData() SAL_OVERRIDE;
virtual void SetSize( sal_uInt64 nSize ) SAL_OVERRIDE;
@@ -450,7 +450,7 @@ UCBStream::~UCBStream()
}
}
-sal_uInt64 UCBStream::GetData( void* pData, sal_uInt64 nSize )
+sal_Size UCBStream::GetData(void* pData, sal_Size nSize)
{
try
{
@@ -481,7 +481,7 @@ sal_uInt64 UCBStream::GetData( void* pData, sal_uInt64 nSize )
return 0;
}
-sal_uInt64 UCBStream::PutData( const void* pData, sal_uInt64 nSize )
+sal_Size UCBStream::PutData(const void* pData, sal_Size nSize)
{
try
{
More information about the Libreoffice-commits
mailing list