Remove dodgy and unused ReadNumber

This commit is contained in:
Caolán McNamara 2011-06-12 23:56:25 +01:00
parent e1ace63791
commit 666e9661d4
2 changed files with 0 additions and 132 deletions

View file

@ -411,14 +411,6 @@ public:
{ nJustification = nJus; CreateFormatString(); }
sal_uInt8 GetJustification() const { return nJustification; }
SvStream& ReadNumber( short& rShort );
SvStream& ReadNumber( sal_uInt16& rUInt16 );
SvStream& ReadNumber( long& rLong );
SvStream& ReadNumber( sal_uInt32& rUInt32 );
SvStream& ReadNumber( int& rInt );
SvStream& ReadNumber( float& rFloat );
SvStream& ReadNumber( double& rDouble );
SvStream& WriteNumber( short nShort );
SvStream& WriteNumber( sal_uInt16 nUInt16 );
SvStream& WriteNumber( long nLong );
@ -575,38 +567,6 @@ inline SvStream& operator<<( SvStream& rStr, SvStrPtr f )
return rStr;
}
inline SvStream& SvStream::ReadNumber( short& rShort )
{
long nTmp;
ReadNumber( nTmp );
rShort = (short)nTmp;
return *this;
}
inline SvStream& SvStream::ReadNumber( sal_uInt16& rUShort )
{
sal_uInt32 nTmp;
ReadNumber( nTmp );
rUShort = (sal_uInt16)nTmp;
return *this;
}
inline SvStream& SvStream::ReadNumber( int& rInt )
{
long nTmp;
ReadNumber( nTmp );
rInt = (int)nTmp;
return *this;
}
inline SvStream& SvStream::ReadNumber( float& rFloat )
{
double nTmp;
ReadNumber( nTmp );
rFloat = (float)nTmp;
return *this;
}
inline SvStream& SvStream::WriteNumber( short nShort )
{
WriteNumber( (long)nShort );
@ -625,14 +585,6 @@ inline SvStream& SvStream::WriteNumber( int nInt )
return *this;
}
/*
inline SvStream& SvStream::WriteNumber( unsigned int nUInt )
{
WriteNumber( (sal_uIntPtr)nUInt );
return *this;
}
*/
inline SvStream& SvStream::WriteNumber( float nFloat )
{
double nTemp = nFloat;

View file

@ -1987,90 +1987,6 @@ void SvStream::CreateFormatString()
}
}
/*************************************************************************
|*
|* Stream::ReadNumber()
|*
*************************************************************************/
#define BUFSIZE_LONG 21 // log( 2 hoch 64 ) + 1
SvStream& SvStream::ReadNumber( long& rLong )
{
EatWhite();
if( bIsEof || nError )
{
SetError( SVSTREAM_GENERALERROR );
return *this;
}
sal_Size nFPtr = Tell();
char buf[ BUFSIZE_LONG ];
memset( buf, 0, BUFSIZE_LONG );
sal_Size nTemp = Read( buf, BUFSIZE_LONG-1 );
if( !nTemp || nError )
{
SetError( SVSTREAM_GENERALERROR );
return *this;
}
char *pEndPtr;
rLong = strtol( buf, &pEndPtr, (int)nRadix );
nFPtr += ( (sal_Size)pEndPtr - (sal_Size)(&(buf[0])) );
Seek( nFPtr );
bIsEof = sal_False;
return *this;
}
SvStream& SvStream::ReadNumber( sal_uInt32& rUInt32 )
{
EatWhite();
if( bIsEof || nError )
{
SetError( SVSTREAM_GENERALERROR );
return *this;
}
sal_Size nFPtr = Tell();
char buf[ BUFSIZE_LONG ];
memset( buf, 0, BUFSIZE_LONG );
sal_Size nTemp = Read( buf, BUFSIZE_LONG-1 );
if( !nTemp || nError )
{
SetError( SVSTREAM_GENERALERROR );
return *this;
}
char *pEndPtr;
rUInt32 = strtoul( buf, &pEndPtr, (int)nRadix );
nFPtr += ( (sal_uIntPtr)pEndPtr - (sal_uIntPtr)buf );
Seek( nFPtr );
bIsEof = sal_False;
return *this;
}
SvStream& SvStream::ReadNumber( double& rDouble )
{
EatWhite();
if( bIsEof || nError )
{
SetError( SVSTREAM_GENERALERROR );
return *this;
}
sal_Size nFPtr = Tell();
char buf[ BUFSIZE_LONG ];
memset( buf, 0, BUFSIZE_LONG );
sal_Size nTemp = Read( buf, BUFSIZE_LONG-1 );
if( !nTemp || nError )
{
SetError( SVSTREAM_GENERALERROR );
return *this;
}
char *pEndPtr;
rDouble = strtod( buf, &pEndPtr );
nFPtr += ( (sal_Size)pEndPtr - (sal_Size)buf );
Seek( nFPtr );
bIsEof = sal_False;
return *this;
}
/*************************************************************************
|*
|* Stream::WriteNumber()