diff options
author | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-07-29 10:56:19 +0800 |
---|---|---|
committer | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-07-29 10:56:19 +0800 |
commit | d210c6ccc30466e98240c1409df0550514668d68 (patch) | |
tree | 0c94d52ecaebd283a92275cb372d5ddf926f5131 /unotools/source/ucbhelper/ucblockbytes.cxx | |
parent | 7f0993d43019a0ccb7f89c11fc23704c063b902f (diff) |
#i112600#: clean up l10ntools, rsc, sot, svl, tools and unotools
Diffstat (limited to 'unotools/source/ucbhelper/ucblockbytes.cxx')
-rw-r--r-- | unotools/source/ucbhelper/ucblockbytes.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx index f21855d20aed..51b6bb0b1a61 100644 --- a/unotools/source/ucbhelper/ucblockbytes.cxx +++ b/unotools/source/ucbhelper/ucblockbytes.cxx @@ -1284,7 +1284,7 @@ UcbLockBytes::UcbLockBytes( UcbLockBytesHandler* pHandler ) , m_bDontClose( sal_False ) , m_bStreamValid (sal_False) { - SetSynchronMode( TRUE ); + SetSynchronMode( sal_True ); } //---------------------------------------------------------------------------- @@ -1423,13 +1423,13 @@ void UcbLockBytes::terminate_Impl() } //---------------------------------------------------------------------------- -void UcbLockBytes::SetSynchronMode (BOOL bSynchron) +void UcbLockBytes::SetSynchronMode (sal_Bool bSynchron) { SvLockBytes::SetSynchronMode (bSynchron); } //---------------------------------------------------------------------------- -ErrCode UcbLockBytes::ReadAt ( ULONG nPos, void *pBuffer, ULONG nCount, ULONG *pRead) const +ErrCode UcbLockBytes::ReadAt ( sal_uIntPtr nPos, void *pBuffer, sal_uIntPtr nCount, sal_uIntPtr *pRead) const { if ( IsSynchronMode() ) { @@ -1488,13 +1488,13 @@ ErrCode UcbLockBytes::ReadAt ( ULONG nPos, void *pBuffer, ULONG nCount, ULONG *p rtl_copyMemory (pBuffer, aData.getConstArray(), nSize); if (pRead) - *pRead = ULONG(nSize); + *pRead = sal_uIntPtr(nSize); return ERRCODE_NONE; } //---------------------------------------------------------------------------- -ErrCode UcbLockBytes::WriteAt ( ULONG nPos, const void *pBuffer, ULONG nCount, ULONG *pWritten) +ErrCode UcbLockBytes::WriteAt ( sal_uIntPtr nPos, const void *pBuffer, sal_uIntPtr nCount, sal_uIntPtr *pWritten) { if ( pWritten ) *pWritten = 0; @@ -1543,11 +1543,11 @@ ErrCode UcbLockBytes::Flush() const } //---------------------------------------------------------------------------- -ErrCode UcbLockBytes::SetSize (ULONG nNewSize) +ErrCode UcbLockBytes::SetSize (sal_uIntPtr nNewSize) { SvLockBytesStat aStat; Stat( &aStat, (SvLockBytesStatFlag) 0 ); - ULONG nSize = aStat.nSize; + sal_uIntPtr nSize = aStat.nSize; if ( nSize > nNewSize ) { @@ -1564,8 +1564,8 @@ ErrCode UcbLockBytes::SetSize (ULONG nNewSize) if ( nSize < nNewSize ) { - ULONG nDiff = nNewSize-nSize, nCount=0; - BYTE* pBuffer = new BYTE[ nDiff ]; + sal_uIntPtr nDiff = nNewSize-nSize, nCount=0; + sal_uInt8* pBuffer = new sal_uInt8[ nDiff ]; memset(pBuffer, 0, nDiff); // initialize for enhanced security WriteAt( nSize, pBuffer, nDiff, &nCount ); delete[] pBuffer; @@ -1603,7 +1603,7 @@ ErrCode UcbLockBytes::Stat( SvLockBytesStat *pStat, SvLockBytesStatFlag) const try { - pStat->nSize = ULONG(xSeekable->getLength()); + pStat->nSize = sal_uIntPtr(xSeekable->getLength()); } catch (IOException) { |