summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-02-24 02:27:22 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-02-24 09:54:09 +0000
commit08d1f22ebb9003acd968cda6bc6909f2fe4c5fd2 (patch)
tree918d2ddda68a1940d41c98ae5821286c3faba390 /tools
parent0cf6f241e40b8be3c9d809c528b367df32f3f2ee (diff)
make the implementation use the same type than the declaration
Change-Id: I860e6db6ea4a7a7194283ba4fc23ae30cb1de4f8 Reviewed-on: https://gerrit.libreoffice.org/8201 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/stream/strmwnt.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index cd9f1c5bacdf..9a6ce98c2128 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -44,9 +44,9 @@ public:
}
};
-static sal_uIntPtr GetSvError( DWORD nWntError )
+static sal_Size GetSvError( DWORD nWntError )
{
- static struct { DWORD wnt; sal_uIntPtr sv; } errArr[] =
+ static struct { DWORD wnt; sal_Size sv; } errArr[] =
{
{ ERROR_SUCCESS, SVSTREAM_OK },
{ ERROR_ACCESS_DENIED, SVSTREAM_ACCESS_DENIED },
@@ -86,7 +86,7 @@ static sal_uIntPtr GetSvError( DWORD nWntError )
{ (DWORD)0xFFFFFFFF, SVSTREAM_GENERALERROR }
};
- sal_uIntPtr nRetVal = SVSTREAM_GENERALERROR; // default error
+ sal_Size nRetVal = SVSTREAM_GENERALERROR; // default error
int i=0;
do
{
@@ -139,7 +139,7 @@ sal_uInt16 SvFileStream::IsA() const
}
/// Does not check for EOF, makes isEof callable
-sal_uIntPtr SvFileStream::GetData( void* pData, sal_uIntPtr nSize )
+sal_Size SvFileStream::GetData( void* pData, sal_Size nSize )
{
DWORD nCount = 0;
if( IsOpen() )
@@ -147,14 +147,14 @@ sal_uIntPtr SvFileStream::GetData( void* pData, sal_uIntPtr nSize )
bool bResult = ReadFile(pInstanceData->hFile,(LPVOID)pData,nSize,&nCount,NULL);
if( !bResult )
{
- sal_uIntPtr nTestError = GetLastError();
+ sal_Size nTestError = GetLastError();
SetError(::GetSvError( nTestError ) );
}
}
return (DWORD)nCount;
}
-sal_uIntPtr SvFileStream::PutData( const void* pData, sal_uIntPtr nSize )
+sal_Size SvFileStream::PutData( const void* pData, sal_Size nSize )
{
DWORD nCount = 0;
if( IsOpen() )
@@ -165,7 +165,7 @@ sal_uIntPtr SvFileStream::PutData( const void* pData, sal_uIntPtr nSize )
return nCount;
}
-sal_uIntPtr SvFileStream::SeekPos( sal_uIntPtr nPos )
+sal_Size SvFileStream::SeekPos( sal_Size nPos )
{
DWORD nNewPos = 0;
if( IsOpen() )
@@ -184,7 +184,7 @@ sal_uIntPtr SvFileStream::SeekPos( sal_uIntPtr nPos )
}
else
SetError( SVSTREAM_GENERALERROR );
- return (sal_uIntPtr)nNewPos;
+ return (sal_Size)nNewPos;
}
void SvFileStream::FlushData()
@@ -196,7 +196,7 @@ void SvFileStream::FlushData()
}
}
-bool SvFileStream::LockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
+bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes )
{
bool bRetVal = false;
if( IsOpen() )
@@ -208,7 +208,7 @@ bool SvFileStream::LockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
return bRetVal;
}
-bool SvFileStream::UnlockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
+bool SvFileStream::UnlockRange( sal_Size nByteOffset, sal_Size nBytes )
{
bool bRetVal = false;
if( IsOpen() )
@@ -347,7 +347,7 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nMode )
if( (pInstanceData->hFile==INVALID_HANDLE_VALUE) &&
(nAccessMode & GENERIC_WRITE))
{
- sal_uIntPtr nErr = ::GetSvError( GetLastError() );
+ sal_Size nErr = ::GetSvError( GetLastError() );
if(nErr==SVSTREAM_ACCESS_DENIED || nErr==SVSTREAM_SHARING_VIOLATION)
{
nMode &= (~STREAM_WRITE);
@@ -410,14 +410,14 @@ void SvFileStream::ResetError()
SvStream::ClearError();
}
-void SvFileStream::SetSize( sal_uIntPtr nSize )
+void SvFileStream::SetSize( sal_Size nSize )
{
if( IsOpen() )
{
int bError = false;
HANDLE hFile = pInstanceData->hFile;
- sal_uIntPtr nOld = SetFilePointer( hFile, 0L, NULL, FILE_CURRENT );
+ sal_Size nOld = SetFilePointer( hFile, 0L, NULL, FILE_CURRENT );
if( nOld != 0xffffffff )
{
if( SetFilePointer(hFile,nSize,NULL,FILE_BEGIN ) != 0xffffffff)