diff -ur 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:30.000000000 +0100 +++ ooo_SRC680_m138_src/tools/inc/stream.hxx 2005-11-06 00:01:35.000000000 +0100 @@ -92,6 +94,31 @@ inline rtl_TextEncoding GetStoreCharSet( return eEncoding; } +// ------------------ +// - 64-bit helpers - +// ------------------ + +// The only reason these inlines exist is to make conversion +// to full 64-bit stream APIs easier later on. If all places +// that make direct use of the stream APIs use these inlines +// to convert back to 32-bit numbers, we should +// just be able to grep the code for places that depend on +// 32-bit interaction with SvStream. + +inline sal_uInt32 svstream_Size_to_u32( sal_Size n ) +{ +// This doesn't compile on Windows... +// OSL_ENSURE((sal_uInt32)n <= ::std::numeric_limits< sal_uInt32 >::max(), +// "svstream_Size_to_u32(): WARNING! truncation will during cast from 64-bit to 32-bit."); + return (sal_uInt32) n; +} + +inline sal_Size svstream_u32_to_Size( sal_uInt32 n ) +{ + return (sal_Size) n; +} + + // --------------- // - StreamTypes - // ---------------