--- ooo_cws_src680_ooo64bit02_src/tools/source/zcodec/zcodec.cxx 2004-10-09 03:36:24.000000000 +0800 +++ ooo_cws_src680_ooo64bit02_src.orig/tools/source/zcodec/zcodec.cxx 2004-06-17 21:13:05.000000000 +0800 @@ -509,12 +509,8 @@ { #ifdef OSL_LITENDIAN -#if SAL_TYPES_SIZEOFLONG == 8 - nNumber = SWAPLONG64( nNumber ); -#else nNumber = SWAPLONG( nNumber ); #endif -#endif return rtl_crc32( nLatestCRC, &nNumber, 4 ); } --- ooo_cws_src680_ooo64bit02_src/tools/source/stream/stream.cxx 2004-10-09 03:47:47.000000000 +0800 +++ ooo_cws_src680_ooo64bit02_src.orig/tools/source/stream/stream.cxx 2004-09-10 23:10:04.000000000 +0800 @@ -117,41 +117,17 @@ inline static void SwapUInt( unsigned int& r ) { r = SWAPSHORT(r); } inline static void SwapLong( long& r ) - { -#if SAL_TYPES_SIZEOFLONG == 8 - r = SWAPLONG64(r); -#else - r = SWAPLONG(r); -#endif - } + { r = SWAPLONG(r); } inline static void SwapULong( sal_uInt32& r ) - { -#if SAL_TYPES_SIZEOFLONG == 8 - r = SWAPINT32(r); -#else - r = SWAPLONG(r); -#endif - } + { r = SWAPLONG(r); } #if SAL_TYPES_SIZEOFLONG == 8 inline static void SwapSize( sal_Size& r ) - { r = SWAPLONG64(r); } + { r = SWAPLONG(r); } #endif inline static void SwapLongInt( int& r ) - { -#if SAL_TYPES_SIZEOFLONG == 8 - r = SWAPINT32(r); -#else - r = SWAPLONG(r); -#endif - } + { r = SWAPLONG(r); } inline static void SwapLongUInt( unsigned int& r ) - { -#if SAL_TYPES_SIZEOFLONG == 8 - r = SWAPINT32(r); -#else - r = SWAPLONG(r); -#endif - } + { r = SWAPLONG(r); } #ifdef UNX inline static void SwapFloat( float& r ) { @@ -169,13 +145,8 @@ c[0] ^= c[1]; // zwei 32-Bit-Werte in situ vertauschen c[1] ^= c[0]; c[0] ^= c[1]; -#if SAL_TYPES_SIZEOFLONG == 8 - c[0] = SWAPINT32(c[0]); // und die beiden 32-Bit-Werte selbst in situ drehen - c[1] = SWAPINT32(c[1]); -#else c[0] = SWAPLONG(c[0]); // und die beiden 32-Bit-Werte selbst in situ drehen c[1] = SWAPLONG(c[1]); -#endif } } @@ -1194,7 +1165,6 @@ SvStream& SvStream::operator >> ( long& r ) { -/* #if(SAL_TYPES_SIZEOFLONG != 4) unsigned int tmp = r; READNUMBER_WITHOUT_SWAP(long,tmp) @@ -1206,19 +1176,15 @@ if( bSwap ) SwapLong(r); #endif -*/ - READNUMBER_WITHOUT_SWAP(long,r) - if( bSwap ) - SwapLong(r); return *this; } #if SAL_TYPES_SIZEOFLONG == 8 SvStream& SvStream::operator >> ( sal_Size& r ) { -/* - DBG_ASSERT( FALSE, "SvStream operator >> sal_Size not yet implemented!\n" ); + 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) @@ -1231,9 +1197,6 @@ SwapLong(r); #endif */ - READNUMBER_WITHOUT_SWAP(sal_Size,r) - if( bSwap ) - SwapSize(r); return *this; } @@ -1367,7 +1330,6 @@ SvStream& SvStream::operator<< ( long v ) { -/* #if(SAL_TYPES_SIZEOFLONG != 4) int tmp = v; if( bSwap ) @@ -1378,17 +1340,12 @@ SwapLong(v); WRITENUMBER_WITHOUT_SWAP(long,v) #endif -*/ - if( bSwap ) - SwapLong(v); - WRITENUMBER_WITHOUT_SWAP(long,v) return *this; } #if(SAL_TYPES_SIZEOFLONG == 8) SvStream& SvStream::operator<< ( sal_Size v ) { -/* #if(SAL_TYPES_SIZEOFLONG != 4) int tmp = v; if( bSwap ) @@ -1397,12 +1354,8 @@ #else if( bSwap ) SwapSize(v); - WRITENUMBER_WITHOUT_SWAP(sal_Size,v) + WRITENUMBER_WITHOUT_SWAP(long,v) #endif -*/ - if( bSwap ) - SwapSize(v); - WRITENUMBER_WITHOUT_SWAP(sal_Size,v) return *this; } --- ooo_cws_src680_ooo64bit02_src/vcl/source/gdi/impgraph.cxx 2004-10-09 11:04:39.000000000 +0800 +++ ooo_cws_src680_ooo64bit02_src.orig/vcl/source/gdi/impgraph.cxx 2004-04-20 21:54:19.000000000 +0800 @@ -969,19 +969,6 @@ // swapped if( nType > 100L ) { -#if SAL_TYPES_SIZEOFLONG == 8 - nType = SWAPLONG64( nType ); - nLen = SWAPLONG64( nLen ); - nWidth = SWAPLONG64( nWidth ); - nHeight = SWAPLONG64( nHeight ); - nMapMode = SWAPLONG64( nMapMode ); - nScaleNumX = SWAPLONG64( nScaleNumX ); - nScaleDenomX = SWAPLONG64( nScaleDenomX ); - nScaleNumY = SWAPLONG64( nScaleNumY ); - nScaleDenomY = SWAPLONG64( nScaleDenomY ); - nOffsX = SWAPLONG64( nOffsX ); - nOffsY = SWAPLONG64( nOffsY ); -#else nType = SWAPLONG( nType ); nLen = SWAPLONG( nLen ); nWidth = SWAPLONG( nWidth ); @@ -993,7 +980,6 @@ nScaleDenomY = SWAPLONG( nScaleDenomY ); nOffsX = SWAPLONG( nOffsX ); nOffsY = SWAPLONG( nOffsY ); -#endif } aSize = Size( nWidth, nHeight ); --- ooo_cws_src680_ooo64bit02_src/vcl/source/gdi/bmpacc.cxx 2004-10-09 11:06:58.000000000 +0800 +++ ooo_cws_src680_ooo64bit02_src.orig/vcl/source/gdi/bmpacc.cxx 2004-06-17 20:15:31.000000000 +0800 @@ -285,12 +285,8 @@ BYTE* pLast4Bytes = (BYTE*) GetBuffer() + ( nScanSize - 4 ); #ifdef OSL_LITENDIAN -#if SAL_TYPES_SIZEOFLONG == 8 - nMask = SWAPINT32( nMask ); -#else nMask = SWAPLONG( nMask ); #endif -#endif for( long i = 0; i < nHeight; i++, pLast4Bytes += nScanSize ) ( *(long*) pLast4Bytes ) &= nMask; } --- ooo_cws_src680_ooo64bit02_src/vcl/source/gdi/pngread.cxx 2004-10-09 11:10:41.000000000 +0800 +++ ooo_cws_src680_ooo64bit02_src.orig/vcl/source/gdi/pngread.cxx 2004-06-24 19:08:58.000000000 +0800 @@ -1554,12 +1554,8 @@ mnChunkType = nChunkType; #ifdef OSL_LITENDIAN -#if SAL_TYPES_SIZEOFLONG == 8 - nChunkType = SWAPINT32( nChunkType ); -#else nChunkType = SWAPLONG( nChunkType ); #endif -#endif mnCRC = rtl_crc32( 0, &nChunkType, 4 ); mnChunkDatSize = 0; @@ -1590,11 +1586,7 @@ *mpIStm >> nRet; #ifdef OSL_LITENDIAN -#if SAL_TYPES_SIZEOFLONG == 8 - sal_uInt32 nTemp = SWAPINT32( nRet ); -#else sal_uInt32 nTemp = SWAPLONG( nRet ); -#endif mnCRC = rtl_crc32( mnCRC, &nTemp, 4 ); #else mnCRC = rtl_crc32( mnCRC, &nRet, 4 ); --- ooo_cws_src680_ooo64bit02_src/vcl/source/gdi/pngwrite.cxx 2004-10-09 11:13:50.000000000 +0800 +++ ooo_cws_src680_ooo64bit02_src.orig/vcl/source/gdi/pngwrite.cxx 2004-09-10 23:33:34.000000000 +0800 @@ -652,16 +652,12 @@ mnChunkDatSize = 0; - *mpOStm << 0UL; // writes chunk lenght + *mpOStm << (ULONG)0; // writes chunk lenght *mpOStm << nChunkType; // chunk type to stream #ifdef OSL_LITENDIAN -#if SAL_TYPES_SIZEOFLONG == 8 - nChunkType = SWAPLONG64( nChunkType ); -#else nChunkType = SWAPLONG( nChunkType ); #endif -#endif mnCRC = rtl_crc32( 0, &nChunkType, 4 ); } @@ -679,12 +675,8 @@ mnChunkDatSize+=4; *mpOStm << nSource; #ifdef OSL_LITENDIAN -#if SAL_TYPES_SIZEOFLONG == 8 - nSource = SWAPINT32( nSource ); -#else nSource = SWAPLONG( nSource ); #endif -#endif mnCRC = rtl_crc32( mnCRC, &nSource, 4 ); } --- ooo_cws_src680_ooo64bit02_src/svtools/source/filter.vcl/ipng/ipng.cxx 2004-10-09 11:47:24.000000000 +0800 +++ ooo_cws_src680_ooo64bit02_src.orig/svtools/source/filter.vcl/ipng/ipng.cxx 2004-06-17 21:19:34.000000000 +0800 @@ -1465,12 +1465,8 @@ mnChunkType = nChunkType; #ifdef OSL_LITENDIAN -#if SAL_TYPES_SIZEOFLONG == 8 - nChunkType = SWAPINT32( nChunkType ); -#else nChunkType = SWAPLONG( nChunkType ); #endif -#endif mnCRC = rtl_crc32( 0, &nChunkType, 4 ); mnChunkDatSize = 0; @@ -1497,11 +1493,7 @@ *mpIStm >> nRet; #ifdef OSL_LITENDIAN -#if SAL_TYPES_SIZEOFLONG == 8 - sal_uInt32 nTemp = SWAPINT32( nRet ); -#else sal_uInt32 nTemp = SWAPLONG( nRet ); -#endif mnCRC = rtl_crc32( mnCRC, &nTemp, 4 ); #else mnCRC = rtl_crc32( mnCRC, &nRet, 4 ); --- ooo_cws_src680_ooo64bit02_src/goodies/source/filter.vcl/epng/epng.cxx 2004-10-09 12:03:57.000000000 +0800 +++ ooo_cws_src680_ooo64bit02_src.orig/goodies/source/filter.vcl/epng/epng.cxx 2004-06-17 20:51:12.000000000 +0800 @@ -120,28 +120,28 @@ BYTE* mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1 BYTE* mpPreviousScan; // as big as mpDeflateInBuf BYTE* mpCurrentScan; - sal_uInt32 mnDeflateInSize; + ULONG mnDeflateInSize; - sal_uInt32 mnWidth, mnHeight; + ULONG mnWidth, mnHeight; BYTE mnBitsPerPixel; BYTE mnFilterType; // 0 oder 4; - sal_uInt32 mnBBP; // bytes per pixel ( needed for filtering ) + ULONG mnBBP; // bytes per pixel ( needed for filtering ) BOOL mbTrueAlpha; - sal_Int32 mnCRC; + ULONG mnCRC; long mnChunkDatSize; - sal_uInt32 mnLastPercent; + ULONG mnLastPercent; - void ImplCallback( sal_uInt32 nPercent ); + void ImplCallback( ULONG nPercent ); void ImplWritepHYs( const Graphic& rGraphic ); void ImplWriteIDAT(); - sal_uInt32 ImplGetFilter( sal_uInt32 nY, sal_uInt32 nXStart=0, sal_uInt32 nXAdd=1 ); + ULONG ImplGetFilter( ULONG nY, ULONG nXStart=0, ULONG nXAdd=1 ); void ImplClearFirstScanline(); void ImplWriteTransparent(); BOOL ImplWriteHeader(); void ImplWritePalette(); - void ImplOpenChunk( sal_uInt32 nChunkType ); + void ImplOpenChunk( ULONG nChunkType ); void ImplWriteChunk( BYTE nNumb ); - void ImplWriteChunk( sal_uInt32 nNumb ); + void ImplWriteChunk( ULONG nNumb ); void ImplWriteChunk( unsigned char* pSource, long nDatSize ); void ImplCloseChunk( void ); @@ -325,7 +325,7 @@ // ------------------------------------------------------------------------ -void PNGWriter::ImplCallback( sal_uInt32 nPercent ) +void PNGWriter::ImplCallback( ULONG nPercent ) { if( nPercent >= mnLastPercent + 3 ) { @@ -345,12 +345,12 @@ /* png signature is always an array of 8 bytes */ - *mpOStm << (sal_uInt32)0x89504e47; - *mpOStm << (sal_uInt32)0x0d0a1a0a; + *mpOStm << (ULONG)0x89504e47; + *mpOStm << (ULONG)0x0d0a1a0a; ImplOpenChunk(PNGCHUNK_IHDR); - ImplWriteChunk( ( mnWidth = (sal_uInt32)mpAccess->Width() ) ); - ImplWriteChunk( ( mnHeight = (sal_uInt32)mpAccess->Height() ) ); + ImplWriteChunk( ( mnWidth = (ULONG)mpAccess->Width() ) ); + ImplWriteChunk( ( mnHeight = (ULONG)mpAccess->Height() ) ); if ( mnWidth && mnHeight && mnBitsPerPixel && mbStatus ) { @@ -386,7 +386,7 @@ void PNGWriter::ImplWritePalette() { - const sal_uInt32 nCount = mpAccess->GetPaletteEntryCount(); + const ULONG nCount = mpAccess->GetPaletteEntryCount(); BYTE* pTempBuf = new BYTE[ nCount*3 ]; BYTE* pTmp = pTempBuf; @@ -408,11 +408,11 @@ void PNGWriter::ImplWriteTransparent () { - const sal_uInt32 nTransIndex = mpAccess->GetBestMatchingColor( BMP_COL_TRANS ); + const ULONG nTransIndex = mpAccess->GetBestMatchingColor( BMP_COL_TRANS ); ImplOpenChunk( PNGCHUNK_tRNS ); - for ( sal_uInt32 n = 0; n <= nTransIndex; n++ ) + for ( ULONG n = 0UL; n <= nTransIndex; n++ ) ImplWriteChunk( ( nTransIndex == n ) ? (BYTE) 0x0 : (BYTE) 0xff ); ImplCloseChunk(); @@ -469,13 +469,13 @@ if ( mnInterlaced == 0 ) { - for ( sal_uInt32 nY = 0; nY < mnHeight; nY++ ) + for ( ULONG nY = 0; nY < mnHeight; nY++ ) mpZCodec->Write( *mpOStm, mpDeflateInBuf, ImplGetFilter( nY ) ); } else { // interlace mode - sal_uInt32 nY; + ULONG nY; for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 1 mpZCodec->Write( *mpOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 8 ) ); ImplClearFirstScanline(); @@ -530,7 +530,7 @@ // appends to the currently used pass // the complete size of scanline will be returned - in interlace mode zero is possible! -sal_uInt32 PNGWriter::ImplGetFilter ( sal_uInt32 nY, sal_uInt32 nXStart, sal_uInt32 nXAdd ) +ULONG PNGWriter::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd ) { BYTE* pDest; @@ -551,10 +551,10 @@ { case( 1 ): { - sal_uInt32 nX, nXIndex; + ULONG nX, nXIndex; for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX+=nXAdd, nXIndex++ ) { - sal_uInt32 nShift = ( nXIndex & 7 ) ^ 7; + ULONG nShift = ( nXIndex & 7 ) ^ 7; if ( nShift == 7) *pDest = (BYTE) mpAccess->GetPixel( nY, nX ) << nShift; else if ( nShift == 0 ) @@ -568,7 +568,7 @@ case( 4 ): { - sal_uInt32 nX, nXIndex; + ULONG nX, nXIndex; for ( nX = nXStart, nXIndex = 0; nX < mnWidth; nX+= nXAdd, nXIndex++ ) { if( nXIndex & 1 ) @@ -582,7 +582,7 @@ case( 8 ): { - for ( sal_uInt32 nX = nXStart; nX < mnWidth; nX+=nXAdd ) + for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd ) *pDest++ = mpAccess->GetPixel( nY, nX ); } break; @@ -598,7 +598,7 @@ { if ( mbTrueAlpha ) { - for ( sal_uInt32 nX = nXStart; nX < mnWidth; nX += nXAdd ) + for ( ULONG nX = nXStart; nX < mnWidth; nX += nXAdd ) { const BitmapColor& rColor = mpAccess->GetPixel( nY, nX ); *pDest++ = rColor.GetRed(); @@ -611,7 +611,7 @@ { const BitmapColor aTrans( mpMaskAccess->GetBestMatchingColor( Color( COL_WHITE ) ) ); - for ( sal_uInt32 nX = nXStart; nX < mnWidth; nX+=nXAdd ) + for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd ) { const BitmapColor& rColor = mpAccess->GetPixel( nY, nX ); *pDest++ = rColor.GetRed(); @@ -627,7 +627,7 @@ } else { - for ( sal_uInt32 nX = nXStart; nX < mnWidth; nX+=nXAdd ) + for ( ULONG nX = nXStart; nX < mnWidth; nX+=nXAdd ) { const BitmapColor& rColor = mpAccess->GetPixel( nY, nX ); *pDest++ = rColor.GetRed(); @@ -644,7 +644,7 @@ pDest = mpDeflateInBuf; *pDest++ = 4; // filter type - sal_uInt32 na, nb, nc; + ULONG na, nb, nc; long np, npa, npb, npc; BYTE* p1 = mpCurrentScan + 1; // Current Pixel @@ -698,22 +698,18 @@ // ------------------------------------------------------------------------ -void PNGWriter::ImplOpenChunk ( sal_uInt32 nChunkType ) +void PNGWriter::ImplOpenChunk ( ULONG nChunkType ) { /* calculate CRC for the chunk type and store result in mnCRC */ mnChunkDatSize = 0; - *mpOStm << (sal_uInt32)0; // writes chunk lenght + *mpOStm << (ULONG)0; // writes chunk lenght *mpOStm << nChunkType; // chunk type to stream #ifdef OSL_LITENDIAN -#if SAL_TYPES_SIZEOFLONG == 8 - nChunkType = SWAPINT32( nChunkType ); -#else nChunkType = SWAPLONG( nChunkType ); #endif -#endif mnCRC = rtl_crc32( 0, &nChunkType, 4 ); } @@ -726,17 +722,13 @@ *mpOStm << nSource; } -void PNGWriter::ImplWriteChunk ( sal_uInt32 nSource ) +void PNGWriter::ImplWriteChunk ( ULONG nSource ) { mnChunkDatSize+=4; *mpOStm << nSource; #ifdef OSL_LITENDIAN -#if SAL_TYPES_SIZEOFLONG == 8 - nSource = SWAPINT32( nSource ); -#else nSource = SWAPLONG( nSource ); #endif -#endif mnCRC = rtl_crc32( mnCRC, &nSource, 4 ); } @@ -756,7 +748,7 @@ if ( mnChunkDatSize ) // datsize is allowed to be zero and was already set in ImplOpenChunk(..) { - const sal_uInt32 nEndPos = mpOStm->Tell(); + const ULONG nEndPos = mpOStm->Tell(); mpOStm->SeekRel( -(mnChunkDatSize + 12 ) ); *mpOStm << mnChunkDatSize;