diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-25 17:56:24 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-26 15:26:48 +0200 |
commit | 5501c8d2220ee3cab703d09d348e99ba3e017dba (patch) | |
tree | ce59b08fa7ad1192f3038266db1be0d64a05c0c3 /filter | |
parent | dedfa972bc19f21e6fab7c38a64ae9543142f416 (diff) |
remove unnecessary casts in calls to SvStream.WriteUInt16
left over from our conversion of the SvStream output operators
to more specific methods
Change-Id: I482ca7abb84613971e7e8f839f7aa67a65cd71ff
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/flash/swfwriter.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/egif/egif.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/eos2met/eos2met.cxx | 10 | ||||
-rw-r--r-- | filter/source/graphicfilter/epict/epict.cxx | 130 | ||||
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/etiff/etiff.cxx | 8 | ||||
-rw-r--r-- | filter/source/graphicfilter/ios2met/ios2met.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 26 |
8 files changed, 93 insertions, 93 deletions
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index e1858f2a5ba5..75310809d866 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -148,7 +148,7 @@ void Writer::storeTo( Reference< XOutputStream > &xOutStream ) } // Endtag - mpMovieStream->WriteUInt16( (sal_uInt16)0 ); + mpMovieStream->WriteUInt16( 0 ); Tag aHeader( 0xff ); diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx index 0dd214800265..73c5c53d6bdc 100644 --- a/filter/source/graphicfilter/egif/egif.cxx +++ b/filter/source/graphicfilter/egif/egif.cxx @@ -322,9 +322,9 @@ void GIFWriter::WriteGlobalHeader( const Size& rSize ) // write dummy palette with two entries (black/white); // we do this only because of a bug in Photoshop, since those can't // read pictures without a global color palette - m_rGIF.WriteUInt16( (sal_uInt16) 0 ); - m_rGIF.WriteUInt16( (sal_uInt16) 255 ); - m_rGIF.WriteUInt16( (sal_uInt16) 65535 ); + m_rGIF.WriteUInt16( 0 ); + m_rGIF.WriteUInt16( 255 ); + m_rGIF.WriteUInt16( 65535 ); if( m_rGIF.GetError() ) bStatus = false; diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index a0d91f8b490e..40104114550e 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -654,7 +654,7 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap) // Image Size: pMET->WriteUChar( 0x94 ).WriteUChar( 0x09 ).WriteUChar( 0x02 ); - pMET->WriteUInt16( (sal_uInt16) 0 ).WriteUInt16( (sal_uInt16) 0 ); + pMET->WriteUInt16( 0 ).WriteUInt16( 0 ); WriteBigEndianShort((sal_uInt16)nHeight); WriteBigEndianShort((sal_uInt16)nWidth); @@ -1152,7 +1152,7 @@ void METWriter::WillWriteOrder(sal_uInt32 nNextOrderMaximumLength) void METWriter::METBitBlt(Point aPt, Size aSize, const Size& rBmpSizePixel) { WillWriteOrder(46); - pMET->WriteUChar( 0xd6 ).WriteUChar( 44 ).WriteUInt16( (sal_uInt16)0 ).WriteUInt16( (sal_uInt16) 0x00cc ); + pMET->WriteUChar( 0xd6 ).WriteUChar( 44 ).WriteUInt16( 0 ).WriteUInt16( 0x00cc ); WriteBigEndianLong(nActBitmapId++); pMET->WriteUChar( 0x02 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ); WritePoint(Point(aPt.X(),aPt.Y()+aSize.Height())); @@ -1240,7 +1240,7 @@ void METWriter::METEndArea() void METWriter::METBeginPath(sal_uInt32 nPathId) { WillWriteOrder(8); - pMET->WriteUChar( 0xd0 ).WriteUChar( 6 ).WriteUInt16( (sal_uInt16) 0 ).WriteUInt32( nPathId ); + pMET->WriteUChar( 0xd0 ).WriteUChar( 6 ).WriteUInt16( 0 ).WriteUInt32( nPathId ); } @@ -2414,9 +2414,9 @@ void METWriter::WriteGraphicsObject(const GDIMetaFile * pMTF) // now at first we write the head of the segment: pMET->WriteUChar( 0x70 ).WriteUChar( 0x0e ).WriteUInt32( (sal_uInt32)0 ); pMET->WriteUChar( 0x70 ).WriteUChar( 0x10 ); // Flags - pMET->WriteUInt16( (sal_uInt16)0 ); // Lo-Word of the length of the segment data (Big Endian) + pMET->WriteUInt16( 0 ); // Lo-Word of the length of the segment data (Big Endian) pMET->WriteUInt32( (sal_uInt32)0 ); // Reserved - pMET->WriteUInt16( (sal_uInt16)0 ); // Hi-Word of the length of the segment (Big Endian) (Ohh Ohh OS2) + pMET->WriteUInt16( 0 ); // Hi-Word of the length of the segment (Big Endian) (Ohh Ohh OS2) // Annotation: we're writing the correct data length again below // now all orders are being written out: diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index a044ef414820..e429966df865 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -462,7 +462,7 @@ void PictWriter::WriteOpcode_TxFace(const vcl::Font & rFont) if (rFont.IsShadow()) nFace|=0x10; if (bDstTxFaceValid==false || nDstTxFace!=nFace) { - pPict->WriteUInt16( (sal_uInt16)0x0004 ).WriteUChar( nFace ).WriteUChar( 0 ); + pPict->WriteUInt16( 0x0004 ).WriteUChar( nFace ).WriteUChar( 0 ); nDstTxFace=nFace; bDstTxFaceValid=true; } @@ -479,7 +479,7 @@ void PictWriter::WriteOpcode_TxMode(RasterOp eMode) case ROP_XOR: nVal=0x000a; break; default: nVal=0x0008; } - pPict->WriteUInt16( (sal_uInt16)0x0005 ).WriteUInt16( nVal ); + pPict->WriteUInt16( 0x0005 ).WriteUInt16( nVal ); eDstTxMode=eMode; bDstTxModeValid=true; } @@ -490,7 +490,7 @@ void PictWriter::WriteOpcode_PnSize(sal_uInt16 nSize) { if (nSize==0) nSize=1; if (bDstPnSizeValid==false || nDstPnSize!=nSize) { - pPict->WriteUInt16( (sal_uInt16)0x0007 ).WriteUInt16( nSize ).WriteUInt16( nSize ); + pPict->WriteUInt16( 0x0007 ).WriteUInt16( nSize ).WriteUInt16( nSize ); nDstPnSize=nSize; bDstPnSizeValid=true; } @@ -508,7 +508,7 @@ void PictWriter::WriteOpcode_PnMode(RasterOp eMode) case ROP_XOR: nVal=0x000a; break; default: nVal=0x0008; } - pPict->WriteUInt16( (sal_uInt16)0x0008 ).WriteUInt16( nVal ); + pPict->WriteUInt16( 0x0008 ).WriteUInt16( nVal ); eDstPnMode=eMode; bDstPnModeValid=true; } @@ -521,7 +521,7 @@ void PictWriter::WriteOpcode_PnLinePat(bool bVisible) ConvertLinePattern(aPat,bVisible); if (bDstPnPatValid==false || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) { - pPict->WriteUInt16( (sal_uInt16)0x0009 ).WriteUInt32( aPat.nHi ).WriteUInt32( aPat.nLo ); + pPict->WriteUInt16( 0x0009 ).WriteUInt32( aPat.nHi ).WriteUInt32( aPat.nLo ); aDstPnPat=aPat; bDstPnPatValid=true; } @@ -534,7 +534,7 @@ void PictWriter::WriteOpcode_PnFillPat(bool bVisible) ConvertFillPattern(aPat,bVisible); if (bDstPnPatValid==false || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) { - pPict->WriteUInt16( (sal_uInt16)0x0009 ).WriteUInt32( aPat.nHi ).WriteUInt32( aPat.nLo ); + pPict->WriteUInt16( 0x0009 ).WriteUInt32( aPat.nHi ).WriteUInt32( aPat.nLo ); aDstPnPat=aPat; bDstPnPatValid=true; } @@ -543,7 +543,7 @@ void PictWriter::WriteOpcode_PnFillPat(bool bVisible) void PictWriter::WriteOpcode_OvSize(const Size & rSize) { - pPict->WriteUInt16( (sal_uInt16)0x000b ); + pPict->WriteUInt16( 0x000b ); WriteSize(rSize); } @@ -555,7 +555,7 @@ void PictWriter::WriteOpcode_TxSize(sal_uInt16 nSize) nDstTxSize = (sal_uInt16) OutputDevice::LogicToLogic( Size( 0, nSize ), aSrcMapMode, aTargetMapMode ).Height(); - pPict->WriteUInt16( (sal_uInt16)0x000d ).WriteUInt16( nDstTxSize ); + pPict->WriteUInt16( 0x000d ).WriteUInt16( nDstTxSize ); bDstTxSizeValid=true; } } @@ -564,7 +564,7 @@ void PictWriter::WriteOpcode_TxSize(sal_uInt16 nSize) void PictWriter::WriteOpcode_RGBFgCol(const Color & rColor) { if (bDstFgColValid==false || aDstFgCol!=rColor) { - pPict->WriteUInt16( (sal_uInt16)0x001a ); + pPict->WriteUInt16( 0x001a ); WriteRGBColor(rColor); aDstFgCol=rColor; bDstFgColValid=true; @@ -575,7 +575,7 @@ void PictWriter::WriteOpcode_RGBFgCol(const Color & rColor) void PictWriter::WriteOpcode_RGBBkCol(const Color & rColor) { if (bDstBkColValid==false || aDstBkCol!=rColor) { - pPict->WriteUInt16( (sal_uInt16)0x001b ); + pPict->WriteUInt16( 0x001b ); WriteRGBColor(rColor); aDstBkCol=rColor; bDstBkColValid=true; @@ -597,13 +597,13 @@ void PictWriter::WriteOpcode_Line(const Point & rLocPt, const Point & rNewPt) dv=aNewPt.Y()-aLocPt.Y(); if (dh<=127 && dh>=-128 && dv<=127 && dv>=-128) { // ShortLine - pPict->WriteUInt16( (sal_uInt16)0x0022 ); + pPict->WriteUInt16( 0x0022 ); WritePoint(rLocPt); pPict->WriteChar( (char)dh ).WriteChar( (char)dv ); } else { - pPict->WriteUInt16( (sal_uInt16)0x0020 ); + pPict->WriteUInt16( 0x0020 ); WritePoint(rLocPt); WritePoint(rNewPt); } @@ -624,12 +624,12 @@ void PictWriter::WriteOpcode_LineFrom(const Point & rNewPt) if (dh<=127 && dh>=-128 && dv<=127 && dv>=-128) { // ShortLine - pPict->WriteUInt16( (sal_uInt16)0x0023 ); + pPict->WriteUInt16( 0x0023 ); pPict->WriteChar( (char)dh ).WriteChar( (char)dv ); } else { - pPict->WriteUInt16( (sal_uInt16)0x0021 ); + pPict->WriteUInt16( 0x0021 ); WritePoint(rNewPt); } aDstPenPosition=rNewPt; @@ -651,20 +651,20 @@ void PictWriter::WriteOpcode_Text(const Point & rPoint, const OUString& rString, if (bDstTextPositionValid==false || dh<0 || dh>255 || dv<0 || dv>255 || bDelta==false) { - pPict->WriteUInt16( (sal_uInt16)0x0028 ); + pPict->WriteUInt16( 0x0028 ); WritePoint(rPoint); } else if (dv==0) { - pPict->WriteUInt16( (sal_uInt16)0x0029 ).WriteUChar( dh ); + pPict->WriteUInt16( 0x0029 ).WriteUChar( dh ); } else if (dh==0) { - pPict->WriteUInt16( (sal_uInt16)0x002a ).WriteUChar( dv ); + pPict->WriteUInt16( 0x002a ).WriteUChar( dv ); } else { - pPict->WriteUInt16( (sal_uInt16)0x002b ).WriteUChar( dh ).WriteUChar( dv ); + pPict->WriteUInt16( 0x002b ).WriteUChar( dh ).WriteUChar( dv ); } WriteString( rString ); @@ -694,12 +694,12 @@ void PictWriter::WriteOpcode_FontName(const vcl::Font & rFont) if ( nFontNameLen ) { nDataLen = 3 + nFontNameLen; - pPict->WriteUInt16( (sal_uInt16)0x002c ).WriteUInt16( nDataLen ).WriteUInt16( nFontId ); + pPict->WriteUInt16( 0x002c ).WriteUInt16( nDataLen ).WriteUInt16( nFontId ); WriteString( rFont.GetName() ); if ( ( nFontNameLen & 1 ) == 0 ) pPict->WriteUChar( 0 ); } - pPict->WriteUInt16( (sal_uInt16)0x0003 ).WriteUInt16( nFontId ); + pPict->WriteUInt16( 0x0003 ).WriteUInt16( nFontId ); aDstFontName=rFont.GetName(); nDstFontNameId=nFontId; bDstFontNameValid=true; @@ -711,8 +711,8 @@ void PictWriter::WriteOpcode_ClipRect( const Rectangle& rRect ) Rectangle aRect( MapRectangle( rRect ) ); ++aRect.Bottom(); ++aRect.Right(); - pPict ->WriteUInt16( (sal_uInt16)1 ) // opcode 1 - .WriteUInt16( (sal_uInt16)10 ) // data size + pPict ->WriteUInt16( 1 ) // opcode 1 + .WriteUInt16( 10 ) // data size .WriteInt16( aRect.Top() ).WriteInt16( aRect.Left() ) .WriteInt16( aRect.Bottom() ).WriteInt16( aRect.Right() ); aClipRect = aRect; @@ -904,7 +904,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nDstRowBytes = nWidth * 4; // writing Opcode and BaseAddr (?): - pPict->WriteUInt16( (sal_uInt16)0x009a ).WriteUInt32( (sal_uInt32)0x000000ff ); + pPict->WriteUInt16( 0x009a ).WriteUInt32( (sal_uInt32)0x000000ff ); // Normally we want to produce packing type 4 (run length encoding // for 32-bit pixels). But if RowBytes<8 is true, generally all data is @@ -917,36 +917,36 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nPackType = 4; // writing PixMap-Structure: - pPict->WriteUInt16( (sal_uInt16)(nDstRowBytes|0x8000) ) // Bytes per row and the fact that it's a 'PixMap' - .WriteUInt16( (sal_uInt16)0x0000 ) // Y1-position of the bitmap in the source - .WriteUInt16( (sal_uInt16)0x0000 ) // X1-position of the bitmap in the source - .WriteUInt16( (sal_uInt16)nHeight ) // Y2-position of the bitmap in the source - .WriteUInt16( (sal_uInt16)nWidth ) // X2-position of the bitmap in the source - .WriteUInt16( (sal_uInt16)0x0000 ) // Version - .WriteUInt16( (sal_uInt16)nPackType ) // Packing type + pPict->WriteUInt16( (nDstRowBytes|0x8000) ) // Bytes per row and the fact that it's a 'PixMap' + .WriteUInt16( 0x0000 ) // Y1-position of the bitmap in the source + .WriteUInt16( 0x0000 ) // X1-position of the bitmap in the source + .WriteUInt16( nHeight ) // Y2-position of the bitmap in the source + .WriteUInt16( nWidth ) // X2-position of the bitmap in the source + .WriteUInt16( 0x0000 ) // Version + .WriteUInt16( nPackType ) // Packing type .WriteUInt32( (sal_uInt32) 0x00000000 ) // Packing size (?) .WriteUInt32( (sal_uInt32) 0x00480000 ) // H-Res .WriteUInt32( (sal_uInt32) 0x00480000 ) // V-Res - .WriteUInt16( (sal_uInt16)0x0010 ) // Pixel type (?) - .WriteUInt16( (sal_uInt16)0x0020 ) // Pixel size: 32 bit - .WriteUInt16( (sal_uInt16)0x0004 ) // CmpCount: 4 components - .WriteUInt16( (sal_uInt16)0x0008 ) // CmpSize: 8 bits + .WriteUInt16( 0x0010 ) // Pixel type (?) + .WriteUInt16( 0x0020 ) // Pixel size: 32 bit + .WriteUInt16( 0x0004 ) // CmpCount: 4 components + .WriteUInt16( 0x0008 ) // CmpSize: 8 bits .WriteUInt32( (sal_uInt32) 0x00000000 ) // PlaneBytes (?) .WriteUInt32( (sal_uInt32) 0x00000000 ) // (?) .WriteUInt32( (sal_uInt32) 0x00000000 ); // (?) // Source-Rectangle schreiben: - pPict->WriteUInt16( (sal_uInt16)0x0000 ) // Y1-position on the bitmap - .WriteUInt16( (sal_uInt16)0x0000 ) // X1-position on the bitmap - .WriteUInt16( (sal_uInt16)nHeight ) // Y2-position on the bitmap - .WriteUInt16( (sal_uInt16)nWidth ); // X2-position on the bitmap + pPict->WriteUInt16( 0x0000 ) // Y1-position on the bitmap + .WriteUInt16( 0x0000 ) // X1-position on the bitmap + .WriteUInt16( nHeight ) // Y2-position on the bitmap + .WriteUInt16( nWidth ); // X2-position on the bitmap // writing the Destination-Rectangle: WritePoint( rPoint ); WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) ); // writing the Transfer mode: - pPict->WriteUInt16( (sal_uInt16)0x0000 ); // (?) + pPict->WriteUInt16( 0x0000 ); // (?) // remember position of the Map-data in the target: nDstMapPos=pPict->Tell(); @@ -988,7 +988,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, // ByteCount (that's the size of the packed row) is at first 0 (will be corrected later): if ( nDstRowBytes > 250 ) - pPict->WriteUInt16( (sal_uInt16)0 ); + pPict->WriteUInt16( 0 ); else pPict->WriteUChar( 0 ); @@ -1089,7 +1089,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nSrcRowBytes = ( nDstRowBytes + 3 ) & 0xfffffffc; // writing Opcode: - pPict->WriteUInt16( (sal_uInt16)0x0098 ); + pPict->WriteUInt16( 0x0098 ); // Normally we want to produce packing type 0 (default packing). // But if RowBytes<8 is true, generally all data is unpacked even if packing @@ -1101,45 +1101,45 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nPackType = 0; // write PixMap-Structure: - pPict->WriteUInt16( (sal_uInt16)(nDstRowBytes|0x8000) ) // Bytes per row and the fact that it's a 'PixMap' - .WriteUInt16( (sal_uInt16)0x0000 ) // Y1-position of the bitmap in the source - .WriteUInt16( (sal_uInt16)0x0000 ) // X1-position of the bitmap in the source - .WriteUInt16( (sal_uInt16)nHeight ) // Y2-position of the bitmap in the source - .WriteUInt16( (sal_uInt16)nWidth ) // X2-position of the bitmap in the source - .WriteUInt16( (sal_uInt16)0x0000 ) // Version - .WriteUInt16( (sal_uInt16)nPackType ) // Packing type + pPict->WriteUInt16( (nDstRowBytes|0x8000) ) // Bytes per row and the fact that it's a 'PixMap' + .WriteUInt16( 0x0000 ) // Y1-position of the bitmap in the source + .WriteUInt16( 0x0000 ) // X1-position of the bitmap in the source + .WriteUInt16( nHeight ) // Y2-position of the bitmap in the source + .WriteUInt16( nWidth ) // X2-position of the bitmap in the source + .WriteUInt16( 0x0000 ) // Version + .WriteUInt16( nPackType ) // Packing type .WriteUInt32( (sal_uInt32) 0x00000000 ) // Packing size (?) .WriteUInt32( (sal_uInt32) 0x00480000 ) // H-Res .WriteUInt32( (sal_uInt32) 0x00480000 ) // V-Res - .WriteUInt16( (sal_uInt16)0x0000 ) // Pixel type (?) - .WriteUInt16( (sal_uInt16)nBitsPerPixel ) // Pixel size - .WriteUInt16( (sal_uInt16)0x0001 ) // CmpCount: 1 component - .WriteUInt16( (sal_uInt16)nBitsPerPixel ) // CmpSize + .WriteUInt16( 0x0000 ) // Pixel type (?) + .WriteUInt16( nBitsPerPixel ) // Pixel size + .WriteUInt16( 0x0001 ) // CmpCount: 1 component + .WriteUInt16( nBitsPerPixel ) // CmpSize .WriteUInt32( (sal_uInt32) 0x00000000 ) // PlaneBytes (?) .WriteUInt32( (sal_uInt32) 0x00000000 ) // (?) .WriteUInt32( (sal_uInt32) 0x00000000 ); // (?) // writing and reading the palette: nColTabSize = pAcc->GetPaletteEntryCount(); - pPict->WriteUInt32( (sal_uInt32)0 ).WriteUInt16( (sal_uInt16)0x8000 ).WriteUInt16( (sal_uInt16)( nColTabSize - 1 ) ); + pPict->WriteUInt32( (sal_uInt32)0 ).WriteUInt16( 0x8000 ).WriteUInt16( ( nColTabSize - 1 ) ); for ( i = 0; i < nColTabSize; i++ ) { nRed = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetRed(); nGreen = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetGreen(); nBlue = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetBlue(); - pPict->WriteUInt16( (sal_uInt16)0 ).WriteUChar( nRed ).WriteUChar( nRed ).WriteUChar( nGreen ).WriteUChar( nGreen ).WriteUChar( nBlue ).WriteUChar( nBlue ); + pPict->WriteUInt16( 0 ).WriteUChar( nRed ).WriteUChar( nRed ).WriteUChar( nGreen ).WriteUChar( nGreen ).WriteUChar( nBlue ).WriteUChar( nBlue ); } // writing Source-Rectangle: - pPict->WriteUInt16( (sal_uInt16)0 ).WriteUInt16( (sal_uInt16)0 ).WriteUInt16( (sal_uInt16)nHeight ).WriteUInt16( (sal_uInt16)nWidth ); + pPict->WriteUInt16( 0 ).WriteUInt16( 0 ).WriteUInt16( nHeight ).WriteUInt16( nWidth ); // writing Destination-Rectangle: WritePoint( rPoint ); WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) ); // writing Transfer mode: - pPict->WriteUInt16( (sal_uInt16)0 ); // (?) + pPict->WriteUInt16( 0 ); // (?) // allocate memory for a row: boost::scoped_array<sal_uInt8> pPix(new sal_uInt8[ nSrcRowBytes ]); @@ -1183,7 +1183,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, // ByteCount (this is the size of the packed line) initialized with 0 (will be corrected later): if ( nDstRowBytes > 250 ) - pPict->WriteUInt16( (sal_uInt16)0 ); + pPict->WriteUInt16( 0 ); else pPict->WriteUChar( 0 ); @@ -1272,7 +1272,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, void PictWriter::WriteOpcode_EndOfFile() { - pPict->WriteUInt16( (sal_uInt16)0x00ff ); + pPict->WriteUInt16( 0x00ff ); } @@ -2053,8 +2053,8 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) if ( pAt->aClipRect != aClipRect ) { Rectangle aRect( pAt->aClipRect ); - pPict ->WriteUInt16( (sal_uInt16)1 ) // opcode 1 - .WriteUInt16( (sal_uInt16)10 ) // data size + pPict ->WriteUInt16( 1 ) // opcode 1 + .WriteUInt16( 10 ) // data size .WriteInt16( aRect.Top() ).WriteInt16( aRect.Left() ) .WriteInt16( aRect.Bottom() ).WriteInt16( aRect.Right() ); } @@ -2143,7 +2143,7 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF) for (i=0;i<128;i++) pPict->WriteUInt32( (sal_uInt32)0 ); // Lo-16-Bits of the file size without the 512 bytes trash: - pPict->WriteUInt16( (sal_uInt16)0 ); // gets corrected later on by UpdateHeader() + pPict->WriteUInt16( 0 ); // gets corrected later on by UpdateHeader() // The Bounding-Rectangle (y1,x1,y2,x2 !): WriteRectangle( aRect ); @@ -2152,9 +2152,9 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF) pPict->WriteUInt32( (sal_uInt32)0x001102ff ); // Extended-Version-2-Header: - pPict->WriteUInt16( (sal_uInt16)0x0c00 ) // Opcode - .WriteUInt16( (sal_uInt16)0xfffe ) // Version (?) - .WriteUInt16( (sal_uInt16)0x0000 ) // Reserved + pPict->WriteUInt16( 0x0c00 ) // Opcode + .WriteUInt16( 0xfffe ) // Version (?) + .WriteUInt16( 0x0000 ) // Reserved .WriteUInt32( (sal_uInt32) 0x00480000 ) // hRes .WriteUInt32( (sal_uInt32) 0x00480000 ); WriteRectangle( aRect ); @@ -2174,7 +2174,7 @@ void PictWriter::UpdateHeader() // correct the Lo-16-Bits of the file size without the 512 bytes trash: nPos=pPict->Tell(); pPict->Seek(512); - pPict->WriteUInt16( (sal_uInt16)((nPos-512)&0x0000ffff) ); + pPict->WriteUInt16( ((nPos-512)&0x0000ffff) ); pPict->Seek(nPos); } diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 35e5f391242d..6ad502568636 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -378,7 +378,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter rTargetStream.WriteUInt32( (sal_uInt32)0xC6D3D0C5 ); nStreamPosition = rTargetStream.Tell(); rTargetStream.WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ) - .WriteUInt32( nStreamPosition + 26 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt16( (sal_uInt16)0xffff ); + .WriteUInt32( nStreamPosition + 26 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt16( 0xffff ); sal_uInt32 nErrCode; if ( mbGrayScale ) diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx index 031918bec64a..7e0c4354548c 100644 --- a/filter/source/graphicfilter/etiff/etiff.cxx +++ b/filter/source/graphicfilter/etiff/etiff.cxx @@ -279,7 +279,7 @@ bool TIFFWriter::ImplWriteHeader( bool bMultiPage ) // (OFS8) TIFF image file directory (IFD) mnCurrentTagCountPos = m_rOStm.Tell(); - m_rOStm.WriteUInt16( (sal_uInt16)0 ); // the number of tagentrys is to insert later + m_rOStm.WriteUInt16( 0 ); // the number of tagentrys is to insert later sal_uInt32 nSubFileFlags = 0; if ( bMultiPage ) @@ -350,17 +350,17 @@ void TIFFWriter::ImplWritePalette() for ( i = 0; i < mnColors; i++ ) { const BitmapColor& rColor = mpAcc->GetPaletteColor( i ); - m_rOStm.WriteUInt16( (sal_uInt16)( rColor.GetRed() << 8 ) ); + m_rOStm.WriteUInt16( ( rColor.GetRed() << 8 ) ); } for ( i = 0; i < mnColors; i++ ) { const BitmapColor& rColor = mpAcc->GetPaletteColor( i ); - m_rOStm.WriteUInt16( (sal_uInt16)( rColor.GetGreen() << 8 ) ); + m_rOStm.WriteUInt16( ( rColor.GetGreen() << 8 ) ); } for ( i = 0; i < mnColors; i++ ) { const BitmapColor& rColor = mpAcc->GetPaletteColor( i ); - m_rOStm.WriteUInt16( (sal_uInt16)( rColor.GetBlue() << 8 ) ); + m_rOStm.WriteUInt16( ( rColor.GetBlue() << 8 ) ); } } diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 5c01273bac08..37258d7bf838 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -2211,7 +2211,7 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen) } // write (Windows-)BITMAPINFOHEADER: (p->pBMP)->WriteUInt32( (sal_uInt32)40 ).WriteUInt32( p->nWidth ).WriteUInt32( p->nHeight ); - (p->pBMP)->WriteUInt16( (sal_uInt16)1 ).WriteUInt16( p->nBitsPerPixel ); + (p->pBMP)->WriteUInt16( 1 ).WriteUInt16( p->nBitsPerPixel ); (p->pBMP)->WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ); (p->pBMP)->WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ); // write color table: diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 7728e1ed163f..f4a297dd3cfa 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -302,7 +302,7 @@ extern "C" int SAL_CALL EscherPropSortFunc( const void* p1, const void* p2 ) void EscherPropertyContainer::Commit( SvStream& rSt, sal_uInt16 nVersion, sal_uInt16 nRecType ) { - rSt.WriteUInt16( (sal_uInt16)( ( nCountCount << 4 ) | ( nVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( nCountSize ); + rSt.WriteUInt16( ( ( nCountCount << 4 ) | ( nVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( nCountSize ); if ( nSortCount ) { qsort( pSortStruct, nSortCount, sizeof( EscherPropSortStruct ), EscherPropSortFunc ); @@ -3113,7 +3113,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT std::vector< EnhancedCustomShapeEquation >::const_iterator aEnd ( aEquations.end() ); while( aIter != aEnd ) { - aOut.WriteUInt16( (sal_uInt16)aIter->nOperation ) + aOut.WriteUInt16( aIter->nOperation ) .WriteInt16( aIter->nPara[ 0 ] ) .WriteInt16( aIter->nPara[ 1 ] ) .WriteInt16( aIter->nPara[ 2 ] ); @@ -4179,7 +4179,7 @@ void EscherBlibEntry::WriteBlibEntry( SvStream& rSt, bool bWritePictureOffset, s } rSt.Write( &mnIdentifier[ 0 ], 16 ); - rSt.WriteUInt16( (sal_uInt16)0 ) + rSt.WriteUInt16( 0 ) .WriteUInt32( (sal_uInt32)( mnSize + mnSizeExtra ) ) .WriteUInt32( mnRefCount ) .WriteUInt32( nPictureOffset ) @@ -4462,13 +4462,13 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin .WriteUInt32( (sal_uInt32)0 ); nAtomSize = rPicOutStrm.Tell(); if ( eBlibType == PNG ) - rPicOutStrm.WriteUInt16( (sal_uInt16)0x0606 ); + rPicOutStrm.WriteUInt16( 0x0606 ); else if ( eBlibType == WMF ) - rPicOutStrm.WriteUInt16( (sal_uInt16)0x0403 ); + rPicOutStrm.WriteUInt16( 0x0403 ); else if ( eBlibType == EMF ) - rPicOutStrm.WriteUInt16( (sal_uInt16)0x0402 ); + rPicOutStrm.WriteUInt16( 0x0402 ); else if ( eBlibType == PEG ) - rPicOutStrm.WriteUInt16( (sal_uInt16)0x0505 ); + rPicOutStrm.WriteUInt16( 0x0505 ); } // fdo#69607 do not compress WMF files if we are in OOXML export @@ -4556,7 +4556,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin .WriteUInt32( nWidth ) .WriteUInt32( nHeight ) .WriteUInt32( p_EscherBlibEntry->mnSize ) - .WriteUInt16( (sal_uInt16)0xfe00 ); // compression Flags + .WriteUInt16( 0xfe00 ); // compression Flags rPicOutStrm.Write( pGraphicAry, p_EscherBlibEntry->mnSize ); } } @@ -4887,8 +4887,8 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm ) if ( nCount ) { sal_uInt32 nRecHdPos, nCurrentPos, nSize; - rStrm .WriteUInt16( (sal_uInt16)( ( nCount << 4 ) | 0xf ) ) // open an ESCHER_SolverContainer - .WriteUInt16( (sal_uInt16)ESCHER_SolverContainer ) + rStrm .WriteUInt16( ( ( nCount << 4 ) | 0xf ) ) // open an ESCHER_SolverContainer + .WriteUInt16( ESCHER_SolverContainer ) .WriteUInt32( (sal_uInt32)0 ); nRecHdPos = rStrm.Tell() - 4; @@ -5244,7 +5244,7 @@ bool EscherEx::InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ) void EscherEx::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance ) { - mpOutStrm->WriteUInt16( (sal_uInt16)( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( nEscherContainer ).WriteUInt32( (sal_uInt32)0 ); + mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( nEscherContainer ).WriteUInt32( (sal_uInt32)0 ); mOffsets.push_back( mpOutStrm->Tell() - 4 ); mRecTypes.push_back( nEscherContainer ); switch( nEscherContainer ) @@ -5347,13 +5347,13 @@ void EscherEx::EndAtom( sal_uInt16 nRecType, int nRecVersion, int nRecInstance ) sal_uInt32 nOldPos = mpOutStrm->Tell(); mpOutStrm->Seek( mnCountOfs ); sal_uInt32 nSize = nOldPos - mnCountOfs; - mpOutStrm->WriteUInt16( (sal_uInt16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( (sal_uInt32)( nSize - 8 ) ); mpOutStrm->Seek( nOldPos ); } void EscherEx::AddAtom( sal_uInt32 nAtomSize, sal_uInt16 nRecType, int nRecVersion, int nRecInstance ) { - mpOutStrm->WriteUInt16( (sal_uInt16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( nAtomSize ); + mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( nAtomSize ); } void EscherEx::AddChildAnchor( const Rectangle& rRect ) |