diff -urN ooo_SRC680_m138_src.orig/tools/inc/stream.hxx ooo_SRC680_m138_src/tools/inc/stream.hxx --- ooo_SRC680_m138_src.orig/tools/inc/stream.hxx 2005-11-05 19:04:38.000000000 +0100 +++ ooo_SRC680_m138_src/tools/inc/stream.hxx 2005-11-05 19:06:47.000000000 +0100 @@ -376,6 +376,9 @@ SvStream& operator>>( sal_uInt16& rUInt16 ); SvStream& operator>>( sal_uInt32& rUInt32 ); SvStream& operator>>( long& rLong ); +#if SAL_TYPES_SIZEOFLONG == 8 + SvStream& operator>>( sal_Size& rSize ); +#endif SvStream& operator>>( short& rShort ); SvStream& operator>>( int& rInt ); SvStream& operator>>( signed char& rChar ); @@ -394,6 +397,9 @@ SvStream& operator<<( sal_uInt16 nUInt16 ); SvStream& operator<<( sal_uInt32 nUInt32 ); SvStream& operator<<( long nLong ); +#if SAL_TYPES_SIZEOFLONG == 8 + SvStream& operator<<( sal_Size nSize ); +#endif SvStream& operator<<( short nShort ); SvStream& operator<<( int nInt ); SvStream& operator<<( signed char nChar ); diff -urN ooo_SRC680_m138_src.orig/tools/source/stream/stream.cxx ooo_SRC680_m138_src/tools/source/stream/stream.cxx --- ooo_SRC680_m138_src.orig/tools/source/stream/stream.cxx 2005-11-05 19:04:38.000000000 +0100 +++ ooo_SRC680_m138_src/tools/source/stream/stream.cxx 2005-11-05 19:25:07.000000000 +0100 @@ -94,6 +94,10 @@ { r = SWAPLONG(r); } inline static void SwapULong( sal_uInt32& r ) { r = SWAPLONG(r); } +#if SAL_TYPES_SIZEOFLONG == 8 +inline static void SwapSize( sal_Size& r ) + { r = SWAPLONG(r); } +#endif inline static void SwapLongInt( int& r ) { r = SWAPLONG(r); } inline static void SwapLongUInt( unsigned int& r ) @@ -152,7 +156,7 @@ if( (tmp == STREAM_IO_READ) && sizeof(datatype)<=nBufFree) \ {\ for (int i = 0; i < sizeof(datatype); i++)\ - ((char *)&r)[i] = pBufPos[i];\ + ((char *)&value)[i] = pBufPos[i];\ nBufActualPos += sizeof(datatype);\ pBufPos += sizeof(datatype);\ nBufFree -= sizeof(datatype);\ @@ -1209,6 +1213,7 @@ return *this; } + SvStream& SvStream::operator >> ( long& r ) { #if(SAL_TYPES_SIZEOFLONG != 4) @@ -1225,6 +1230,29 @@ return *this; } +#if SAL_TYPES_SIZEOFLONG == 8 +SvStream& SvStream::operator >> ( sal_Size& r ) +{ + + DBG_ASSERT( FALSE, "SvStream operator >> sal_Size not yet implemented!\n" ); +/* +#if(SAL_TYPES_SIZEOFLONG != 4) + int tmp = r; + READNUMBER_WITHOUT_SWAP(sal_Size,tmp) + r = tmp; + if( bSwap ) + SwapLong(r); +#else + READNUMBER_WITHOUT_SWAP(long,r) + if( bSwap ) + SwapLong(r); +#endif +*/ + return *this; +} + +#endif // SAL_TYPES_SIZEOFLONG == 8 + SvStream& SvStream::operator >> ( short& r ) { READNUMBER_WITHOUT_SWAP(short,r) @@ -1366,6 +1394,24 @@ return *this; } +#if(SAL_TYPES_SIZEOFLONG == 8) +SvStream& SvStream::operator<< ( sal_Size v ) +{ +#if(SAL_TYPES_SIZEOFLONG != 4) + int tmp = v; + if( bSwap ) + SwapInt(tmp); + WRITENUMBER_WITHOUT_SWAP(int,tmp) +#else + if( bSwap ) + SwapSize(v); + WRITENUMBER_WITHOUT_SWAP(long,v) +#endif + return *this; +} + +#endif + SvStream& SvStream::operator<< ( short v ) { if( bSwap )