diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-25 20:19:30 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-26 15:27:17 +0200 |
commit | 5cefde06ea9f4347b5d2747e0d2825c3c710aa83 (patch) | |
tree | 7f24ac5f1fe1749ea8c0135c73de80745b1c7508 | |
parent | 04fd62096fca2c0b917ac6172104399e65933585 (diff) |
remove unnecessary casts in calls to SvStream.WriteUInt32
left over from our conversion of the SvStream output operators
to more specific methods
Change-Id: I1d848f19f82783e6eabf2da37dbde78fe36ea1e0
41 files changed, 436 insertions, 436 deletions
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index 95694c09ae0b..d4be5e76167f 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -322,7 +322,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer ) for( i = 0; i < nStrings && SbiGood( r ); i++ ) { - r.WriteUInt32( (sal_uInt32) pStringOff[ i ] ); + r.WriteUInt32( pStringOff[ i ] ); } // Then the String-Block boost::scoped_array<char> pByteStrings(new char[ nStringSize ]); @@ -332,7 +332,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer ) OString aStr(OUStringToOString(OUString(pStrings + nOff), eCharSet)); memcpy( pByteStrings.get() + nOff, aStr.getStr(), (aStr.getLength() + 1) * sizeof( char ) ); } - r.WriteUInt32( (sal_uInt32) nStringSize ); + r.WriteUInt32( nStringSize ); r.Write( pByteStrings.get(), nStringSize ); pByteStrings.reset(); diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx index 7ec9c00edf9a..89cb73564f65 100644 --- a/basic/source/sbx/sbxbase.cxx +++ b/basic/source/sbx/sbxbase.cxx @@ -259,16 +259,16 @@ bool SbxBase::Store( SvStream& rStrm ) { if( ( nFlags & SBX_DONTSTORE ) == SBX_NONE ) { - rStrm.WriteUInt32( (sal_uInt32) GetCreator() ) + rStrm.WriteUInt32( GetCreator() ) .WriteUInt16( GetSbxId() ) .WriteUInt16( GetFlags() ) .WriteUInt16( GetVersion() ); sal_Size nOldPos = rStrm.Tell(); - rStrm.WriteUInt32( (sal_uInt32) 0L ); + rStrm.WriteUInt32( 0L ); bool bRes = StoreData( rStrm ); sal_Size nNewPos = rStrm.Tell(); rStrm.Seek( nOldPos ); - rStrm.WriteUInt32( (sal_uInt32) ( nNewPos - nOldPos ) ); + rStrm.WriteUInt32( ( nNewPos - nOldPos ) ); rStrm.Seek( nNewPos ); if( rStrm.GetError() != SVSTREAM_OK ) bRes = false; @@ -383,7 +383,7 @@ bool SbxInfo::StoreData( SvStream& rStrm ) const RTL_TEXTENCODING_ASCII_US); rStrm.WriteUInt16( i->eType ) .WriteUInt16( i->nFlags ) - .WriteUInt32( (sal_uInt32) i->nUserData ); + .WriteUInt32( i->nUserData ); } return true; } diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 70c308d147bc..4ff8e9e810e3 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -683,14 +683,14 @@ bool SbxObject::StoreData( SvStream& rStrm ) const write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aClassName, RTL_TEXTENCODING_ASCII_US); write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aDfltProp, RTL_TEXTENCODING_ASCII_US); sal_Size nPos = rStrm.Tell(); - rStrm.WriteUInt32( (sal_uInt32) 0L ); + rStrm.WriteUInt32( 0L ); if( !StorePrivateData( rStrm ) ) { return false; } sal_Size nNew = rStrm.Tell(); rStrm.Seek( nPos ); - rStrm.WriteUInt32( (sal_uInt32) ( nNew - nPos ) ); + rStrm.WriteUInt32( ( nNew - nPos ) ); rStrm.Seek( nNew ); if( !pMethods->Store( rStrm ) ) { diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 1fe032f1a278..b05afff3334d 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -1633,7 +1633,7 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) case SbxUINT: { sal_uInt8 n = SAL_TYPES_SIZEOFINT; - r.WriteUChar( n ).WriteUInt32( (sal_uInt32)aData.nUInt ); + r.WriteUChar( n ).WriteUInt32( aData.nUInt ); break; } case SbxEMPTY: diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 75503ab2a763..01d5f3461861 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -609,7 +609,7 @@ bool SbxVariable::StoreData( SvStream& rStrm ) const } write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, maName, RTL_TEXTENCODING_ASCII_US); - rStrm.WriteUInt32( (sal_uInt32)nUserData ); + rStrm.WriteUInt32( nUserData ); if( pInfo.Is() ) { rStrm.WriteUChar( 2 ); // Version 2: with UserData! diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index ab6a1ebf7e2a..7d3f500b72bd 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1221,7 +1221,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) (*m_pFileStream).WriteUChar( aDate.GetMonth() ); (*m_pFileStream).WriteUChar( aDate.GetDay() ); - (*m_pFileStream).WriteUInt32( (sal_uInt32)0 ); // number of data records + (*m_pFileStream).WriteUInt32( 0 ); // number of data records (*m_pFileStream).WriteUInt16( ((m_pColumns->getCount()+1) * 32 + 1) ); // header information, // pColumns contains always an additional column (*m_pFileStream).WriteUInt16( 0 ); // record length will be determined later diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 0c8d3019fbce..493ccd54f68e 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -680,9 +680,9 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const { const ODbaseIndex& rIndex = rPage.GetIndex(); if (!rIndex.isUnique() || rPage.IsLeaf()) - rStream.WriteUInt32( (sal_uInt32)aKey.nRecord ); // key + rStream.WriteUInt32( aKey.nRecord ); // key else - rStream.WriteUInt32( (sal_uInt32)0 ); // key + rStream.WriteUInt32( 0 ); // key if (rIndex.getHeader().db_keytype) // double { diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 0dd0deb9a64a..315a332cd9e1 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -702,7 +702,7 @@ SvStream& SvxLRSpaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) con // From 6.0 onwards, do not write Magic numbers... DBG_ASSERT( rStrm.GetVersion() <= SOFFICE_FILEFORMAT_50, "Change File format SvxLRSpaceItem!" ); - rStrm.WriteUInt32( (sal_uInt32) BULLETLR_MARKER ); + rStrm.WriteUInt32( BULLETLR_MARKER ); rStrm.WriteInt16( nSaveFI ); if( 0x80 & nAutoFirst ) diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 8d7dc6dcc341..eb056b885dbe 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -596,24 +596,24 @@ bool Sane::Start( BitmapTransporter& rBitmap ) // write bitmap stream header aConverter.WriteChar( 'B' ).WriteChar( 'M' ); - aConverter.WriteUInt32( (sal_uInt32) 0 ); - aConverter.WriteUInt32( (sal_uInt32) 0 ); - aConverter.WriteUInt32( (sal_uInt32) 60 ); + aConverter.WriteUInt32( 0 ); + aConverter.WriteUInt32( 0 ); + aConverter.WriteUInt32( 60 ); // write BITMAPINFOHEADER - aConverter.WriteUInt32( (sal_uInt32)40 ); - aConverter.WriteUInt32( (sal_uInt32)0 ); // fill in width later - aConverter.WriteUInt32( (sal_uInt32)0 ); // fill in height later + aConverter.WriteUInt32( 40 ); + aConverter.WriteUInt32( 0 ); // fill in width later + aConverter.WriteUInt32( 0 ); // fill in height later aConverter.WriteUInt16( 1 ); // create header for 24 bits // correct later if necessary aConverter.WriteUInt16( 24 ); - aConverter.WriteUInt32( (sal_uInt32)0 ); - aConverter.WriteUInt32( (sal_uInt32)0 ); - aConverter.WriteUInt32( (sal_uInt32)0 ); - aConverter.WriteUInt32( (sal_uInt32)0 ); - aConverter.WriteUInt32( (sal_uInt32)0 ); - aConverter.WriteUInt32( (sal_uInt32)0 ); + aConverter.WriteUInt32( 0 ); + aConverter.WriteUInt32( 0 ); + aConverter.WriteUInt32( 0 ); + aConverter.WriteUInt32( 0 ); + aConverter.WriteUInt32( 0 ); + aConverter.WriteUInt32( 0 ); for( nStream=0; nStream < 3 && bSuccess ; nStream++ ) { @@ -754,11 +754,11 @@ bool Sane::Start( BitmapTransporter& rBitmap ) #endif aConverter.Seek( 18 ); - aConverter.WriteUInt32( (sal_uInt32)nWidth ); - aConverter.WriteUInt32( (sal_uInt32)nHeight ); + aConverter.WriteUInt32( nWidth ); + aConverter.WriteUInt32( nHeight ); aConverter.Seek( 38 ); - aConverter.WriteUInt32( (sal_uInt32)(1000*nWidth/nWidthMM) ); - aConverter.WriteUInt32( (sal_uInt32)(1000*nHeight/nHeightMM) ); + aConverter.WriteUInt32( (1000*nWidth/nWidthMM) ); + aConverter.WriteUInt32( (1000*nHeight/nHeightMM) ); bWidthSet = true; } aConverter.Seek(60); @@ -766,7 +766,7 @@ bool Sane::Start( BitmapTransporter& rBitmap ) if( eType == FrameStyle_BW ) { aConverter.Seek( 10 ); - aConverter.WriteUInt32( (sal_uInt32)64 ); + aConverter.WriteUInt32( 64 ); aConverter.Seek( 28 ); aConverter.WriteUInt16( 1 ); aConverter.Seek( 54 ); @@ -774,13 +774,13 @@ bool Sane::Start( BitmapTransporter& rBitmap ) aConverter.WriteUInt16( 0xffff ); aConverter.WriteUChar( 0xff ); aConverter.WriteUChar( 0 ); - aConverter.WriteUInt32( (sal_uInt32)0 ); + aConverter.WriteUInt32( 0 ); aConverter.Seek( 64 ); } else if( eType == FrameStyle_Gray ) { aConverter.Seek( 10 ); - aConverter.WriteUInt32( (sal_uInt32)1084 ); + aConverter.WriteUInt32( 1084 ); aConverter.Seek( 28 ); aConverter.WriteUInt16( 8 ); aConverter.Seek( 54 ); @@ -873,7 +873,7 @@ bool Sane::Start( BitmapTransporter& rBitmap ) int nPos = aConverter.Tell(); aConverter.Seek( 2 ); - aConverter.WriteUInt32( (sal_uInt32) nPos+1 ); + aConverter.WriteUInt32( nPos+1 ); aConverter.Seek( 0 ); rBitmap.unlock(); diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index 75310809d866..de866c4dac6d 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -159,7 +159,7 @@ void Writer::storeTo( Reference< XOutputStream > &xOutStream ) sal_uInt32 nSizePos = aHeader.Tell(); - aHeader.WriteUInt32( (sal_uInt32)0 ); + aHeader.WriteUInt32( 0 ); Rectangle aDocRect( 0, 0, static_cast<long>(mnDocWidth*mnDocXScale), static_cast<long>(mnDocHeight*mnDocYScale) ); @@ -174,7 +174,7 @@ void Writer::storeTo( Reference< XOutputStream > &xOutStream ) const sal_uInt32 nSize = aHeader.Tell() + mpFontsStream->Tell() + mpMovieStream->Tell(); aHeader.Seek( nSizePos ); - aHeader.WriteUInt32( (sal_uInt32)nSize ); + aHeader.WriteUInt32( nSize ); ImplCopySvStreamToXOutputStream( aHeader, xOutStream ); ImplCopySvStreamToXOutputStream( *mpFontsStream, xOutStream ); diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx index 73c5c53d6bdc..07e2193174a8 100644 --- a/filter/source/graphicfilter/egif/egif.cxx +++ b/filter/source/graphicfilter/egif/egif.cxx @@ -377,8 +377,8 @@ void GIFWriter::WriteLogSizeExtension( const Size& rSize100 ) m_rGIF.Write( "STARDIV 5.0", 11 ); m_rGIF.WriteUChar( 0x09 ); m_rGIF.WriteUChar( 0x01 ); - m_rGIF.WriteUInt32( (sal_uInt32) rSize100.Width() ); - m_rGIF.WriteUInt32( (sal_uInt32) rSize100.Height() ); + m_rGIF.WriteUInt32( rSize100.Width() ); + m_rGIF.WriteUInt32( rSize100.Height() ); m_rGIF.WriteUChar( 0x00 ); } } diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index d93246141aff..e6b7fc371c63 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -873,12 +873,12 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) Size aUnitsPerDecimeter=OutputDevice::LogicToLogic(Size(10,10),MapMode(MAP_CM),aPictureMapMode); pMET->WriteUChar( 0xf6 ).WriteUChar( 0x28 ).WriteUChar( 0x40 ).WriteUChar( 0x00 ) .WriteUChar( 0x05 ).WriteUChar( 0x01 ) - .WriteUInt32( (sal_uInt32)(aUnitsPerDecimeter.Width()) ) - .WriteUInt32( (sal_uInt32)(aUnitsPerDecimeter.Height()) ) - .WriteUInt32( (sal_uInt32)0 ) - .WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)aPictureRect.GetWidth() ) - .WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)aPictureRect.GetHeight() ) - .WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ); + .WriteUInt32( (aUnitsPerDecimeter.Width()) ) + .WriteUInt32( (aUnitsPerDecimeter.Height()) ) + .WriteUInt32( 0 ) + .WriteUInt32( 0 ).WriteUInt32( aPictureRect.GetWidth() ) + .WriteUInt32( 0 ).WriteUInt32( aPictureRect.GetHeight() ) + .WriteUInt32( 0 ).WriteUInt32( 0 ); // 0 0x21 Set Current Defaults // 1 Length of following data @@ -905,8 +905,8 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) // 6-n M11, M12, M21, M22, M41, M42 Matrix elements pMET->WriteUChar( 0x21 ).WriteUChar( 0x1c ).WriteUChar( 0x07 ).WriteUChar( 0xcc ) .WriteUChar( 0x0c ).WriteUChar( 0x8f ) - .WriteUInt32( (sal_uInt32)0x00010000 ).WriteUInt32( (sal_uInt32)0x00000000 ).WriteUInt32( (sal_uInt32)0x00000000 ) - .WriteUInt32( (sal_uInt32)0x00010000 ).WriteUInt32( (sal_uInt32)0x00000000 ).WriteUInt32( (sal_uInt32)0x00000000 ); + .WriteUInt32( 0x00010000 ).WriteUInt32( 0x00000000 ).WriteUInt32( 0x00000000 ) + .WriteUInt32( 0x00010000 ).WriteUInt32( 0x00000000 ).WriteUInt32( 0x00000000 ); // 0 0x21 Set Current Defaults // 1 Length of following data @@ -1157,9 +1157,9 @@ void METWriter::METBitBlt(Point aPt, Size aSize, const Size& rBmpSizePixel) pMET->WriteUChar( 0x02 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ); WritePoint(Point(aPt.X(),aPt.Y()+aSize.Height())); WritePoint(Point(aPt.X()+aSize.Width(),aPt.Y())); - pMET->WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ) - .WriteUInt32( (sal_uInt32)(rBmpSizePixel.Width()) ) - .WriteUInt32( (sal_uInt32)(rBmpSizePixel.Height()) ); + pMET->WriteUInt32( 0 ).WriteUInt32( 0 ) + .WriteUInt32( (rBmpSizePixel.Width()) ) + .WriteUInt32( (rBmpSizePixel.Height()) ); } void METWriter::METSetAndPushLineInfo( const LineInfo& rLineInfo ) @@ -1212,7 +1212,7 @@ void METWriter::METPopLineInfo( const LineInfo& rLineInfo ) .WriteUChar( 6 ) .WriteUChar( 0 ) // Flags .WriteUChar( 0 ) - .WriteUInt32( (sal_uInt32)1 ); + .WriteUInt32( 1 ); if ( rLineInfo.GetStyle() != LINE_SOLID ) { @@ -2374,7 +2374,7 @@ void METWriter::WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF) pMET->WriteUChar( 0x0c ).WriteUChar( 0x02 ).WriteUChar( 0x84 ).WriteUChar( 0x00 ); WriteFieldId(nId); pMET->WriteUChar( 0x07 ).WriteUChar( 0x22 ).WriteUChar( 0x10 ); - pMET->WriteUInt32( (sal_uInt32)nId ); + pMET->WriteUInt32( nId ); nId++; } @@ -2412,10 +2412,10 @@ void METWriter::WriteGraphicsObject(const GDIMetaFile * pMTF) nNumberOfDataFields++; // now at first we write the head of the segment: - pMET->WriteUChar( 0x70 ).WriteUChar( 0x0e ).WriteUInt32( (sal_uInt32)0 ); + pMET->WriteUChar( 0x70 ).WriteUChar( 0x0e ).WriteUInt32( 0 ); pMET->WriteUChar( 0x70 ).WriteUChar( 0x10 ); // Flags pMET->WriteUInt16( 0 ); // Lo-Word of the length of the segment data (Big Endian) - pMET->WriteUInt32( (sal_uInt32)0 ); // Reserved + pMET->WriteUInt32( 0 ); // Reserved 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 diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index e429966df865..559cddd91cf1 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -904,7 +904,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nDstRowBytes = nWidth * 4; // writing Opcode and BaseAddr (?): - pPict->WriteUInt16( 0x009a ).WriteUInt32( (sal_uInt32)0x000000ff ); + pPict->WriteUInt16( 0x009a ).WriteUInt32( 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 @@ -924,16 +924,16 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, .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 + .WriteUInt32( 0x00000000 ) // Packing size (?) + .WriteUInt32( 0x00480000 ) // H-Res + .WriteUInt32( 0x00480000 ) // V-Res .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 ); // (?) + .WriteUInt32( 0x00000000 ) // PlaneBytes (?) + .WriteUInt32( 0x00000000 ) // (?) + .WriteUInt32( 0x00000000 ); // (?) // Source-Rectangle schreiben: pPict->WriteUInt16( 0x0000 ) // Y1-position on the bitmap @@ -1108,20 +1108,20 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, .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 + .WriteUInt32( 0x00000000 ) // Packing size (?) + .WriteUInt32( 0x00480000 ) // H-Res + .WriteUInt32( 0x00480000 ) // V-Res .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 ); // (?) + .WriteUInt32( 0x00000000 ) // PlaneBytes (?) + .WriteUInt32( 0x00000000 ) // (?) + .WriteUInt32( 0x00000000 ); // (?) // writing and reading the palette: nColTabSize = pAcc->GetPaletteEntryCount(); - pPict->WriteUInt32( (sal_uInt32)0 ).WriteUInt16( 0x8000 ).WriteUInt16( ( nColTabSize - 1 ) ); + pPict->WriteUInt32( 0 ).WriteUInt16( 0x8000 ).WriteUInt16( ( nColTabSize - 1 ) ); for ( i = 0; i < nColTabSize; i++ ) { @@ -2140,7 +2140,7 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF) Rectangle aRect( aPoint, aSize ); // 512 Bytes "trash" at the beginning: - for (i=0;i<128;i++) pPict->WriteUInt32( (sal_uInt32)0 ); + for (i=0;i<128;i++) pPict->WriteUInt32( 0 ); // Lo-16-Bits of the file size without the 512 bytes trash: pPict->WriteUInt16( 0 ); // gets corrected later on by UpdateHeader() @@ -2149,16 +2149,16 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF) WriteRectangle( aRect ); // Version 2: - pPict->WriteUInt32( (sal_uInt32)0x001102ff ); + pPict->WriteUInt32( 0x001102ff ); // Extended-Version-2-Header: pPict->WriteUInt16( 0x0c00 ) // Opcode .WriteUInt16( 0xfffe ) // Version (?) .WriteUInt16( 0x0000 ) // Reserved - .WriteUInt32( (sal_uInt32) 0x00480000 ) // hRes - .WriteUInt32( (sal_uInt32) 0x00480000 ); + .WriteUInt32( 0x00480000 ) // hRes + .WriteUInt32( 0x00480000 ); WriteRectangle( aRect ); - pPict->WriteUInt32( (sal_uInt32)0x00000000 ); // Reserved + pPict->WriteUInt32( 0x00000000 ); // Reserved // many import filters demand the declaration // of a clipping area at the beginning diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 6ad502568636..52b52892ed9b 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -375,10 +375,10 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter if ( mnPreview & EPS_PREVIEW_TIFF ) { - rTargetStream.WriteUInt32( (sal_uInt32)0xC6D3D0C5 ); + rTargetStream.WriteUInt32( 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( 0xffff ); + rTargetStream.WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ) + .WriteUInt32( nStreamPosition + 26 ).WriteUInt32( 0 ).WriteUInt16( 0xffff ); sal_uInt32 nErrCode; if ( mbGrayScale ) diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx index 8b230668faf5..2bf66dbf1bca 100644 --- a/filter/source/graphicfilter/eras/eras.cxx +++ b/filter/source/graphicfilter/eras/eras.cxx @@ -148,17 +148,17 @@ bool RASWriter::ImplWriteHeader() } if ( mbStatus && mnWidth && mnHeight && mnDepth ) { - m_rOStm.WriteUInt32( (sal_uInt32)0x59a66a95 ).WriteUInt32( (sal_uInt32)mnWidth ).WriteUInt32( (sal_uInt32)mnHeight ) - .WriteUInt32( (sal_uInt32)mnDepth ) - .WriteUInt32( (sal_uInt32)(( ( ( ( mnWidth * mnDepth ) + 15 ) >> 4 ) << 1 ) * mnHeight) ) - .WriteUInt32( (sal_uInt32)2 ); + m_rOStm.WriteUInt32( 0x59a66a95 ).WriteUInt32( mnWidth ).WriteUInt32( mnHeight ) + .WriteUInt32( mnDepth ) + .WriteUInt32( (( ( ( ( mnWidth * mnDepth ) + 15 ) >> 4 ) << 1 ) * mnHeight) ) + .WriteUInt32( 2 ); if ( mnDepth > 8 ) - m_rOStm.WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ); + m_rOStm.WriteUInt32( 0 ).WriteUInt32( 0 ); else { - m_rOStm.WriteUInt32( (sal_uInt32)1 ).WriteUInt32( (sal_uInt32)( mnColors * 3 ) ); + m_rOStm.WriteUInt32( 1 ).WriteUInt32( ( mnColors * 3 ) ); } } else mbStatus = false; diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx index 7e0c4354548c..8d9cc0f406ce 100644 --- a/filter/source/graphicfilter/etiff/etiff.cxx +++ b/filter/source/graphicfilter/etiff/etiff.cxx @@ -177,9 +177,9 @@ bool TIFFWriter::WriteTIFF( const Graphic& rGraphic, FilterConfigItem* pFilterCo // we will use the BIG Endian Mode // TIFF header m_rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); - m_rOStm.WriteUInt32( (sal_uInt32)0x4d4d002a ); // TIFF identifier + m_rOStm.WriteUInt32( 0x4d4d002a ); // TIFF identifier mnLatestIfdPos = m_rOStm.Tell(); - m_rOStm.WriteUInt32( (sal_uInt32)0 ); + m_rOStm.WriteUInt32( 0 ); Animation aAnimation; Bitmap aBmp; @@ -274,7 +274,7 @@ bool TIFFWriter::ImplWriteHeader( bool bMultiPage ) { sal_uInt32 nCurrentPos = m_rOStm.Tell(); m_rOStm.Seek( mnLatestIfdPos ); - m_rOStm.WriteUInt32( (sal_uInt32)( nCurrentPos - mnStreamOfs ) ); // offset to the IFD + m_rOStm.WriteUInt32( ( nCurrentPos - mnStreamOfs ) ); // offset to the IFD m_rOStm.Seek( nCurrentPos ); // (OFS8) TIFF image file directory (IFD) @@ -329,7 +329,7 @@ bool TIFFWriter::ImplWriteHeader( bool bMultiPage ) // and last we write zero to close the num dir entries list mnLatestIfdPos = m_rOStm.Tell(); - m_rOStm.WriteUInt32( (sal_uInt32)0 ); // there are no more IFD + m_rOStm.WriteUInt32( 0 ); // there are no more IFD } else mbStatus = false; @@ -478,9 +478,9 @@ void TIFFWriter::ImplWriteResolution( sal_uLong nStreamPos, sal_uInt32 nResoluti { sal_uLong nCurrentPos = m_rOStm.Tell(); m_rOStm.Seek( nStreamPos + 8 ); - m_rOStm.WriteUInt32( (sal_uInt32)nCurrentPos - mnStreamOfs ); + m_rOStm.WriteUInt32( nCurrentPos - mnStreamOfs ); m_rOStm.Seek( nCurrentPos ); - m_rOStm.WriteUInt32( (sal_uInt32)1 ); + m_rOStm.WriteUInt32( 1 ); m_rOStm.WriteUInt32( nResolutionUnit ); } diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 37258d7bf838..d79aad38072f 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -2210,10 +2210,10 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen) return; } // write (Windows-)BITMAPINFOHEADER: - (p->pBMP)->WriteUInt32( (sal_uInt32)40 ).WriteUInt32( p->nWidth ).WriteUInt32( p->nHeight ); + (p->pBMP)->WriteUInt32( 40 ).WriteUInt32( p->nWidth ).WriteUInt32( p->nHeight ); (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 ); + (p->pBMP)->WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ); + (p->pBMP)->WriteUInt32( 0 ).WriteUInt32( 0 ); // write color table: if (p->nBitsPerPixel<=8) { sal_uInt16 i, nColTabSize=1<<(p->nBitsPerPixel); diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 522e9b669775..cac923aacc8f 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -100,7 +100,7 @@ using namespace ::com::sun::star; EscherExContainer::EscherExContainer( SvStream& rSt, const sal_uInt16 nRecType, const sal_uInt16 nInstance ) : rStrm ( rSt ) { - rStrm.WriteUInt32( (sal_uInt32)( ( 0xf | ( nInstance << 4 ) ) | ( nRecType << 16 ) ) ).WriteUInt32( (sal_uInt32)0 ); + rStrm.WriteUInt32( ( ( 0xf | ( nInstance << 4 ) ) | ( nRecType << 16 ) ) ).WriteUInt32( 0 ); nContPos = rStrm.Tell(); } EscherExContainer::~EscherExContainer() @@ -118,7 +118,7 @@ EscherExContainer::~EscherExContainer() EscherExAtom::EscherExAtom( SvStream& rSt, const sal_uInt16 nRecType, const sal_uInt16 nInstance, const sal_uInt8 nVersion ) : rStrm ( rSt ) { - rStrm.WriteUInt32( (sal_uInt32)( ( nVersion | ( nInstance << 4 ) ) | ( nRecType << 16 ) ) ).WriteUInt32( (sal_uInt32)0 ); + rStrm.WriteUInt32( ( ( nVersion | ( nInstance << 4 ) ) | ( nRecType << 16 ) ) ).WriteUInt32( 0 ); nContPos = rStrm.Tell(); } EscherExAtom::~EscherExAtom() @@ -4164,8 +4164,8 @@ void EscherBlibEntry::WriteBlibEntry( SvStream& rSt, bool bWritePictureOffset, s { sal_uInt32 nPictureOffset = ( bWritePictureOffset ) ? mnPictureOffset : 0; - rSt.WriteUInt32( (sal_uInt32)( ( ESCHER_BSE << 16 ) | ( ( (sal_uInt16)meBlibType << 4 ) | 2 ) ) ) - .WriteUInt32( (sal_uInt32)( 36 + nResize ) ) + rSt.WriteUInt32( ( ( ESCHER_BSE << 16 ) | ( ( (sal_uInt16)meBlibType << 4 ) | 2 ) ) ) + .WriteUInt32( ( 36 + nResize ) ) .WriteUChar( meBlibType ); switch ( meBlibType ) @@ -4180,10 +4180,10 @@ void EscherBlibEntry::WriteBlibEntry( SvStream& rSt, bool bWritePictureOffset, s rSt.Write( &mnIdentifier[ 0 ], 16 ); rSt.WriteUInt16( 0 ) - .WriteUInt32( (sal_uInt32)( mnSize + mnSizeExtra ) ) + .WriteUInt32( ( mnSize + mnSizeExtra ) ) .WriteUInt32( mnRefCount ) .WriteUInt32( nPictureOffset ) - .WriteUInt32( (sal_uInt32)0 ); + .WriteUInt32( 0 ); } EscherBlibEntry::~EscherBlibEntry() @@ -4265,8 +4265,8 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM sal_uInt32 nSize = GetBlibStoreContainerSize( pMergePicStreamBSE ); if ( nSize ) { - rSt.WriteUInt32( (sal_uInt32)( ( ESCHER_BstoreContainer << 16 ) | 0x1f ) ) - .WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + rSt.WriteUInt32( ( ( ESCHER_BstoreContainer << 16 ) | 0x1f ) ) + .WriteUInt32( ( nSize - 8 ) ); if ( pMergePicStreamBSE ) { @@ -4458,8 +4458,8 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin if ( mnFlags & _E_GRAPH_PROV_USE_INSTANCES ) { - rPicOutStrm.WriteUInt32( (sal_uInt32)( 0x7f90000 | (sal_uInt16)( mnBlibEntrys << 4 ) ) ) - .WriteUInt32( (sal_uInt32)0 ); + rPicOutStrm.WriteUInt32( ( 0x7f90000 | (sal_uInt16)( mnBlibEntrys << 4 ) ) ) + .WriteUInt32( 0 ); nAtomSize = rPicOutStrm.Tell(); if ( eBlibType == PNG ) rPicOutStrm.WriteUInt16( 0x0606 ); @@ -4498,7 +4498,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin //nInstance = ( eBlibType == PNG ) ? 0xf01e6e00 : 0xf01d46a0; - rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( (sal_uInt32)( p_EscherBlibEntry->mnSize + nExtra ) ); + rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( ( p_EscherBlibEntry->mnSize + nExtra ) ); rPicOutStrm.Write( p_EscherBlibEntry->mnIdentifier, 16 ); rPicOutStrm.WriteUChar( 0xff ); rPicOutStrm.Write( pGraphicAry, p_EscherBlibEntry->mnSize ); @@ -4518,7 +4518,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin nExtra = eBlibType == WMF ? 0x42 : 0x32; // !EMF -> no change p_EscherBlibEntry->mnSizeExtra = nExtra + 8; nInstance = ( eBlibType == WMF ) ? 0xf01b2170 : 0xf01a3d40; // !EMF -> no change - rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( (sal_uInt32)( p_EscherBlibEntry->mnSize + nExtra ) ); + rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( ( p_EscherBlibEntry->mnSize + nExtra ) ); if ( eBlibType == WMF ) // !EMF -> no change rPicOutStrm.Write( p_EscherBlibEntry->mnIdentifier, 16 ); rPicOutStrm.Write( p_EscherBlibEntry->mnIdentifier, 16 ); @@ -4564,7 +4564,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin { sal_uInt32 nPos = rPicOutStrm.Tell(); rPicOutStrm.Seek( nAtomSize - 4 ); - rPicOutStrm.WriteUInt32( (sal_uInt32)( nPos - nAtomSize ) ); + rPicOutStrm.WriteUInt32( ( nPos - nAtomSize ) ); rPicOutStrm.Seek( nPos ); } nBlibId = ImplInsertBlib( p_EscherBlibEntry ), p_EscherBlibEntry = NULL; @@ -4889,7 +4889,7 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm ) sal_uInt32 nRecHdPos, nCurrentPos, nSize; rStrm .WriteUInt16( ( ( nCount << 4 ) | 0xf ) ) // open an ESCHER_SolverContainer .WriteUInt16( ESCHER_SolverContainer ) - .WriteUInt32( (sal_uInt32)0 ); + .WriteUInt32( 0 ); nRecHdPos = rStrm.Tell() - 4; @@ -4910,8 +4910,8 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm ) if ( aConnectorRule.nShapeB ) aConnectorRule.ncptiB = pPtr->GetConnectorRule( false ); } - rStrm .WriteUInt32( (sal_uInt32)( ( ESCHER_ConnectorRule << 16 ) | 1 ) ) // atom hd - .WriteUInt32( (sal_uInt32)24 ) + rStrm .WriteUInt32( ( ( ESCHER_ConnectorRule << 16 ) | 1 ) ) // atom hd + .WriteUInt32( 24 ) .WriteUInt32( aConnectorRule.nRuleId ) .WriteUInt32( aConnectorRule.nShapeA ) .WriteUInt32( aConnectorRule.nShapeB ) @@ -5162,7 +5162,7 @@ void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom ) if ( (nCurPos < nEndOfRecord) || ((nCurPos == nEndOfRecord) && (bContainer || bExpandEndOfAtom)) ) { mpOutStrm->SeekRel( -4 ); - mpOutStrm->WriteUInt32( (sal_uInt32)( nSize + nBytes ) ); + mpOutStrm->WriteUInt32( ( nSize + nBytes ) ); if ( !bContainer ) mpOutStrm->SeekRel( nSize ); } @@ -5244,7 +5244,7 @@ bool EscherEx::InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ) void EscherEx::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance ) { - mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( nEscherContainer ).WriteUInt32( (sal_uInt32)0 ); + mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( nEscherContainer ).WriteUInt32( 0 ); mOffsets.push_back( mpOutStrm->Tell() - 4 ); mRecTypes.push_back( nEscherContainer ); switch( nEscherContainer ) @@ -5272,8 +5272,8 @@ void EscherEx::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance ) mnCurrentDg = mxGlobal->GenerateDrawingId(); AddAtom( 8, ESCHER_Dg, 0, mnCurrentDg ); PtReplaceOrInsert( ESCHER_Persist_Dg | mnCurrentDg, mpOutStrm->Tell() ); - mpOutStrm->WriteUInt32( (sal_uInt32)0 ) // The number of shapes in this drawing - .WriteUInt32( (sal_uInt32)0 ); // The last MSOSPID given to an SP in this DG + mpOutStrm->WriteUInt32( 0 ) // The number of shapes in this drawing + .WriteUInt32( 0 ); // The last MSOSPID given to an SP in this DG } } } @@ -5339,7 +5339,7 @@ void EscherEx::CloseContainer() void EscherEx::BeginAtom() { mnCountOfs = mpOutStrm->Tell(); - mpOutStrm->WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ); // record header wird spaeter geschrieben + mpOutStrm->WriteUInt32( 0 ).WriteUInt32( 0 ); // record header wird spaeter geschrieben } void EscherEx::EndAtom( sal_uInt16 nRecType, int nRecVersion, int nRecInstance ) @@ -5347,7 +5347,7 @@ 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( ( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( ( nSize - 8 ) ); mpOutStrm->Seek( nOldPos ); } diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 9811a746f2ee..c2962de8e0a7 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -157,7 +157,7 @@ void Impl_OlePres::Write( SvStream & rStm ) rStm.WriteInt32( (nJobLen +4) ); // a TargetDevice that's always empty if( nJobLen ) rStm.Write( pJob, nJobLen ); - rStm.WriteUInt32( (sal_uInt32)nAspect ); + rStm.WriteUInt32( nAspect ); rStm.WriteInt32( -1 ); //L-Index always -1 rStm.WriteInt32( nAdvFlags ); rStm.WriteInt32( 0 ); //Compression @@ -196,7 +196,7 @@ void Impl_OlePres::Write( SvStream & rStm ) } sal_uLong nEndPos = rStm.Tell(); rStm.Seek( nPos ); - rStm.WriteUInt32( (sal_uInt32)(nEndPos - nPos - 4) ); + rStm.WriteUInt32( (nEndPos - nPos - 4) ); rStm.Seek( nEndPos ); } diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index ad185274017b..33ac3ac38a2e 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -129,7 +129,7 @@ void SvIdlDataBase::Save( SvStream & rStm, sal_uInt32 nFlags ) SvPersistStream aPStm( *IDLAPP->pClassMgr, &rStm ); aPStm.SetContextFlags( nFlags ); - aPStm.WriteUInt32( (sal_uInt32)DATABASE_SIGNATURE ); + aPStm.WriteUInt32( DATABASE_SIGNATURE ); aPStm.WriteUInt16( DATABASE_VER ); bool bOnlyStreamedObjs = false; diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 9fbf5a37a257..082b67a89655 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -177,8 +177,8 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ mpPptEscherEx->AddAtom( 24, EPP_SlideAtom, 2 ); mpStrm->WriteInt32( rLayout.nLayout ); mpStrm->Write( rLayout.nPlaceHolder, 8 ); // placeholderIDs (8 parts) - mpStrm->WriteUInt32( (sal_uInt32)(nMasterNum | 0x80000000) )// master ID (equals 0x80000000 on a master page) - .WriteUInt32( (sal_uInt32)nPageNum + 0x100 ) // notes ID (equals null if no notes are present) + mpStrm->WriteUInt32( (nMasterNum | 0x80000000) )// master ID (equals 0x80000000 on a master page) + .WriteUInt32( nPageNum + 0x100 ) // notes ID (equals null if no notes are present) .WriteUInt16( nMode ) .WriteUInt16( 0 ); // padword @@ -310,7 +310,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ mpPptEscherEx->CloseContainer(); // ESCHER_DgContainer mpPptEscherEx->CloseContainer(); // EPP_Drawing mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 1 ); - mpStrm->WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x808080 ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x99cc00 ).WriteUInt32( (sal_uInt32)0xcc3333 ).WriteUInt32( (sal_uInt32)0xffcccc ).WriteUInt32( (sal_uInt32)0xb2b2b2 ); + mpStrm->WriteUInt32( 0xffffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x808080 ).WriteUInt32( 0x000000 ).WriteUInt32( 0x99cc00 ).WriteUInt32( 0xcc3333 ).WriteUInt32( 0xffcccc ).WriteUInt32( 0xb2b2b2 ); SvMemoryStream aBinaryTagData10Atom; ImplExportComments( mXDrawPage, aBinaryTagData10Atom ); @@ -324,12 +324,12 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ { { EscherExAtom aMagic2( aBinaryTagData10Atom, 0x2eeb ); - aBinaryTagData10Atom.WriteUInt32( (sal_uInt32)0x01c45df9 ) - .WriteUInt32( (sal_uInt32)0xe1471b30 ); + aBinaryTagData10Atom.WriteUInt32( 0x01c45df9 ) + .WriteUInt32( 0xe1471b30 ); } { EscherExAtom aMagic( aBinaryTagData10Atom, 0x2b00 ); - aBinaryTagData10Atom.WriteUInt32( (sal_uInt32)0 ); + aBinaryTagData10Atom.WriteUInt32( 0 ); } aBinaryTagData10Atom.Write( amsofbtAnimGroup.GetData(), amsofbtAnimGroup.Tell() ); { @@ -343,9 +343,9 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ EscherExContainer aProgBinaryTag( *mpStrm, EPP_ProgBinaryTag ); { EscherExAtom aCString( *mpStrm, EPP_CString ); - mpStrm->WriteUInt32( (sal_uInt32)0x5f005f ) - .WriteUInt32( (sal_uInt32)0x50005f ) - .WriteUInt32( (sal_uInt32)0x540050 ) + mpStrm->WriteUInt32( 0x5f005f ) + .WriteUInt32( 0x50005f ) + .WriteUInt32( 0x540050 ) .WriteUInt16( 0x31 ) .WriteUInt16( 0x30 ); } @@ -364,25 +364,25 @@ void PPTWriter::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertyS mpPptEscherEx->AddAtom( 24, EPP_SlideAtom, 2 ); mpStrm->WriteInt32( EPP_LAYOUT_TITLEANDBODYSLIDE ) // slide layout -> title and body slide .WriteUChar( 1 ).WriteUChar( 2 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ) // placeholderID - .WriteUInt32( (sal_uInt32)0 ) // master ID (equals null at a master page) - .WriteUInt32( (sal_uInt32)0 ) // notes ID (equals null if no notes are present) + .WriteUInt32( 0 ) // master ID (equals null at a master page) + .WriteUInt32( 0 ) // notes ID (equals null if no notes are present) .WriteUInt16( 0 ) // Bit 1: Follow master objects, Bit 2: Follow master scheme, Bit 3: Follow master background .WriteUInt16( 0 ); // padword mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 6 ); - mpStrm->WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x808080 ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x99cc00 ).WriteUInt32( (sal_uInt32)0xcc3333 ).WriteUInt32( (sal_uInt32)0xffcccc ).WriteUInt32( (sal_uInt32)0xb2b2b2 ); + mpStrm->WriteUInt32( 0xffffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x808080 ).WriteUInt32( 0x000000 ).WriteUInt32( 0x99cc00 ).WriteUInt32( 0xcc3333 ).WriteUInt32( 0xffcccc ).WriteUInt32( 0xb2b2b2 ); mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 6 ); - mpStrm->WriteUInt32( (sal_uInt32)0xff0000 ).WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x00ffff ).WriteUInt32( (sal_uInt32)0x0099ff ).WriteUInt32( (sal_uInt32)0xffff00 ).WriteUInt32( (sal_uInt32)0x0000ff ).WriteUInt32( (sal_uInt32)0x969696 ); + mpStrm->WriteUInt32( 0xff0000 ).WriteUInt32( 0xffffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x00ffff ).WriteUInt32( 0x0099ff ).WriteUInt32( 0xffff00 ).WriteUInt32( 0x0000ff ).WriteUInt32( 0x969696 ); mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 6 ); - mpStrm->WriteUInt32( (sal_uInt32)0xccffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x336666 ).WriteUInt32( (sal_uInt32)0x008080 ).WriteUInt32( (sal_uInt32)0x339933 ).WriteUInt32( (sal_uInt32)0x000080 ).WriteUInt32( (sal_uInt32)0xcc3300 ).WriteUInt32( (sal_uInt32)0x66ccff ); + mpStrm->WriteUInt32( 0xccffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x336666 ).WriteUInt32( 0x008080 ).WriteUInt32( 0x339933 ).WriteUInt32( 0x000080 ).WriteUInt32( 0xcc3300 ).WriteUInt32( 0x66ccff ); mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 6 ); - mpStrm->WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x333333 ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0xdddddd ).WriteUInt32( (sal_uInt32)0x808080 ).WriteUInt32( (sal_uInt32)0x4d4d4d ).WriteUInt32( (sal_uInt32)0xeaeaea ); + mpStrm->WriteUInt32( 0xffffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x333333 ).WriteUInt32( 0x000000 ).WriteUInt32( 0xdddddd ).WriteUInt32( 0x808080 ).WriteUInt32( 0x4d4d4d ).WriteUInt32( 0xeaeaea ); mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 6 ); - mpStrm->WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x808080 ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x66ccff ).WriteUInt32( (sal_uInt32)0xff0000 ).WriteUInt32( (sal_uInt32)0xcc00cc ).WriteUInt32( (sal_uInt32)0xc0c0c0 ); + mpStrm->WriteUInt32( 0xffffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x808080 ).WriteUInt32( 0x000000 ).WriteUInt32( 0x66ccff ).WriteUInt32( 0xff0000 ).WriteUInt32( 0xcc00cc ).WriteUInt32( 0xc0c0c0 ); mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 6 ); - mpStrm->WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x808080 ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0xc0c0c0 ).WriteUInt32( (sal_uInt32)0xff6600 ).WriteUInt32( (sal_uInt32)0x0000ff ).WriteUInt32( (sal_uInt32)0x009900 ); + mpStrm->WriteUInt32( 0xffffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x808080 ).WriteUInt32( 0x000000 ).WriteUInt32( 0xc0c0c0 ).WriteUInt32( 0xff6600 ).WriteUInt32( 0x0000ff ).WriteUInt32( 0x009900 ); mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 6 ); - mpStrm->WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x808080 ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0xff9933 ).WriteUInt32( (sal_uInt32)0xccff99 ).WriteUInt32( (sal_uInt32)0xcc00cc ).WriteUInt32( (sal_uInt32)0xb2b2b2 ); + mpStrm->WriteUInt32( 0xffffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x808080 ).WriteUInt32( 0x000000 ).WriteUInt32( 0xff9933 ).WriteUInt32( 0xccff99 ).WriteUInt32( 0xcc00cc ).WriteUInt32( 0xb2b2b2 ); for ( int nInstance = EPP_TEXTTYPE_Title; nInstance <= EPP_TEXTTYPE_QuarterBody; nInstance++ ) { @@ -434,7 +434,7 @@ void PPTWriter::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertyS mpPptEscherEx->CloseContainer(); // ESCHER_DgContainer mpPptEscherEx->CloseContainer(); // EPP_Drawing mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 1 ); - mpStrm->WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x808080 ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x99cc00 ).WriteUInt32( (sal_uInt32)0xcc3333 ).WriteUInt32( (sal_uInt32)0xffcccc ).WriteUInt32( (sal_uInt32)0xb2b2b2 ); + mpStrm->WriteUInt32( 0xffffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x808080 ).WriteUInt32( 0x000000 ).WriteUInt32( 0x99cc00 ).WriteUInt32( 0xcc3333 ).WriteUInt32( 0xffcccc ).WriteUInt32( 0xb2b2b2 ); if ( aBuExMasterStream.Tell() ) { @@ -472,11 +472,11 @@ bool PPTWriter::ImplCreateCurrentUserStream() sal_uInt32 nSizeOfRecord = 0x14 + ( ( nLenOfUserName + 4 ) & ~ 3 ); mpCurUserStrm->WriteUInt16( 0 ).WriteUInt16( EPP_CurrentUserAtom ).WriteUInt32( nSizeOfRecord ); - mpCurUserStrm->WriteUInt32( (sal_uInt32)0x14 ) // Len - .WriteUInt32( (sal_uInt32)0xe391c05f ); // Magic + mpCurUserStrm->WriteUInt32( 0x14 ) // Len + .WriteUInt32( 0xe391c05f ); // Magic sal_uInt32 nEditPos = mpCurUserStrm->Tell(); - mpCurUserStrm->WriteUInt32( (sal_uInt32)0x0 ) // OffsetToCurrentEdit; + mpCurUserStrm->WriteUInt32( 0x0 ) // OffsetToCurrentEdit; .WriteUInt16( nLenOfUserName ) .WriteUInt16( 0x3f4 ) // DocFileVersion .WriteUChar( 3 ) // MajorVersion @@ -547,11 +547,11 @@ void PPTWriter::ImplWriteExtParaHeader( SvMemoryStream& rSt, sal_uInt32 nRef, sa { if ( rSt.Tell() ) { - aBuExOutlineStream.WriteUInt32( (sal_uInt32)( ( EPP_PST_ExtendedParagraphHeaderAtom << 16 ) + aBuExOutlineStream.WriteUInt32( ( ( EPP_PST_ExtendedParagraphHeaderAtom << 16 ) | ( nRef << 4 ) ) ) - .WriteUInt32( (sal_uInt32)8 ) - .WriteUInt32( (sal_uInt32)nSlideId ) - .WriteUInt32( (sal_uInt32)nInstance ); + .WriteUInt32( 8 ) + .WriteUInt32( nSlideId ) + .WriteUInt32( nInstance ); aBuExOutlineStream.Write( rSt.GetData(), rSt.Tell() ); } } @@ -688,8 +688,8 @@ bool PPTWriter::ImplCreateDocument() .WriteInt32( maNotesPageSize.Height ) // " " " Y .WriteInt32( 1 ).WriteInt32( 2 ); // the scale used when the Powerpoint document is embedded. the default is 1:2 mpPptEscherEx->InsertPersistOffset( EPP_MAINNOTESMASTER_PERSIST_KEY, mpStrm->Tell() ); - mpStrm->WriteUInt32( (sal_uInt32)0 ) // Reference to NotesMaster ( 0 if none ); - .WriteUInt32( (sal_uInt32)0 ) // Reference to HandoutMaster ( 0 if none ); + mpStrm->WriteUInt32( 0 ) // Reference to NotesMaster ( 0 if none ); + .WriteUInt32( 0 ) // Reference to HandoutMaster ( 0 if none ); .WriteInt16( 1 ) // Number of the first slide; .WriteUInt16( nSlideType ) // Size of the document slides ( default: EPP_SLIDESIZETYPEONSCREEN ) .WriteUChar( 0 ) // bool1 indicates if document was saved with embedded true type fonts @@ -701,13 +701,13 @@ bool PPTWriter::ImplCreateDocument() mpPptEscherEx->OpenContainer( EPP_HeadersFooters, 3 ); //Master footer (default) mpPptEscherEx->AddAtom( 4, EPP_HeadersFootersAtom ); - mpStrm->WriteUInt32( (sal_uInt32)0x25000d ); + mpStrm->WriteUInt32( 0x25000d ); if ( GetPageByIndex( 0, MASTER ) ) ImplCreateHeaderFooterStrings( *mpStrm, mXPagePropSet ); mpPptEscherEx->CloseContainer(); mpPptEscherEx->OpenContainer( EPP_HeadersFooters, 4 ); //NotesMaster footer (default) mpPptEscherEx->AddAtom( 4, EPP_HeadersFootersAtom ); - mpStrm->WriteUInt32( (sal_uInt32)0x3d000d ); + mpStrm->WriteUInt32( 0x3d000d ); if ( GetPageByIndex( 0, NOTICE ) ) ImplCreateHeaderFooterStrings( *mpStrm, mXPagePropSet ); mpPptEscherEx->CloseContainer(); @@ -718,11 +718,11 @@ bool PPTWriter::ImplCreateDocument() { mpPptEscherEx->AddAtom( 20, EPP_SlidePersistAtom ); mpPptEscherEx->InsertPersistOffset( EPP_MAINSLIDE_PERSIST_KEY | i, mpStrm->Tell() ); - mpStrm->WriteUInt32( (sal_uInt32)0 ) // psrReference - logical reference to the slide persist object ( EPP_MAINSLIDE_PERSIST_KEY ) - .WriteUInt32( (sal_uInt32)4 ) // flags - only bit 3 used, if set then slide contains shapes other than placeholders + mpStrm->WriteUInt32( 0 ) // psrReference - logical reference to the slide persist object ( EPP_MAINSLIDE_PERSIST_KEY ) + .WriteUInt32( 4 ) // flags - only bit 3 used, if set then slide contains shapes other than placeholders .WriteInt32( 0 ) // numberTexts - number of placeholder texts stored with the persist object. Allows to display outline view without loading the slide persist objects .WriteInt32( i + 0x100 ) // slideId - Unique slide identifier, used for OLE link monikers for example - .WriteUInt32( (sal_uInt32)0 ); // reserved, usually 0 + .WriteUInt32( 0 ); // reserved, usually 0 if ( !GetPageByIndex( i, NORMAL ) ) // very exciting: once again through all pages return false; @@ -743,11 +743,11 @@ bool PPTWriter::ImplCreateDocument() { mpPptEscherEx->AddAtom( 20, EPP_SlidePersistAtom ); mpPptEscherEx->InsertPersistOffset( EPP_MAINNOTES_PERSIST_KEY | i, mpStrm->Tell() ); - mpStrm->WriteUInt32( (sal_uInt32)0 ) - .WriteUInt32( (sal_uInt32)4 ) + mpStrm->WriteUInt32( 0 ) + .WriteUInt32( 4 ) .WriteInt32( 0 ) .WriteInt32( i + 0x100 ) - .WriteUInt32( (sal_uInt32)0 ); + .WriteUInt32( 0 ); } mpPptEscherEx->CloseContainer(); // EPP_SlideListWithText @@ -902,7 +902,7 @@ bool PPTWriter::ImplCreateDocument() if (pIter != maSlideNameList.end()) { sal_uInt32 nPageNumber = pIter - maSlideNameList.begin(); - mpStrm->WriteUInt32( (sal_uInt32)( nPageNumber + 0x100 ) ); // unique slide id + mpStrm->WriteUInt32( ( nPageNumber + 0x100 ) ); // unique slide id } } } @@ -931,18 +931,18 @@ bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm ) sal_uInt32 nCurrentOfs, nParaOfs, nParaCount = 0; nParaOfs = rStrm.Tell(); - rStrm.WriteUInt32( (sal_uInt32)0 ); // property size - rStrm.WriteUInt32( (sal_uInt32)0 ); // property count + rStrm.WriteUInt32( 0 ); // property size + rStrm.WriteUInt32( 0 ); // property count for ( std::vector<EPPTHyperlink>::const_iterator pIter = maHyperlink.begin(); pIter != maHyperlink.end(); ++pIter ) { nParaCount += 6; - rStrm .WriteUInt32( (sal_uInt32)3 ) // Type VT_I4 - .WriteUInt32( (sal_uInt32)7 ) // (VTI4 - Private1) - .WriteUInt32( (sal_uInt32)3 ) // Type VT_I4 - .WriteUInt32( (sal_uInt32)6 ) // (VTI4 - Private2) - .WriteUInt32( (sal_uInt32)3 ) // Type VT_I4 - .WriteUInt32( (sal_uInt32)0 ); // (VTI4 - Private3) + rStrm .WriteUInt32( 3 ) // Type VT_I4 + .WriteUInt32( 7 ) // (VTI4 - Private1) + .WriteUInt32( 3 ) // Type VT_I4 + .WriteUInt32( 6 ) // (VTI4 - Private2) + .WriteUInt32( 3 ) // Type VT_I4 + .WriteUInt32( 0 ); // (VTI4 - Private3) // INFO // HIWORD: = 0 : do not change anything @@ -963,15 +963,15 @@ bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm ) sal_uInt32 nInfo = 7; - rStrm .WriteUInt32( (sal_uInt32)3 ) // Type VT_I4 + rStrm .WriteUInt32( 3 ) // Type VT_I4 .WriteUInt32( nInfo ); // Info switch( pIter->nType & 0xff ) { case 1 : // click action to slidenumber { - rStrm.WriteUInt32( (sal_uInt32)0x1f ).WriteUInt32( (sal_uInt32)1 ).WriteUInt32( (sal_uInt32)0 ); // path - rStrm.WriteUInt32( (sal_uInt32)0x1f ).WriteUInt32( (sal_uInt32)( nUrlLen + 1 ) ); + rStrm.WriteUInt32( 0x1f ).WriteUInt32( 1 ).WriteUInt32( 0 ); // path + rStrm.WriteUInt32( 0x1f ).WriteUInt32( ( nUrlLen + 1 ) ); for ( sal_Int32 i = 0; i < nUrlLen; i++ ) { rStrm.WriteUInt16( rUrl[ i ] ); @@ -983,8 +983,8 @@ bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm ) { sal_Int32 i; - rStrm .WriteUInt32( (sal_uInt32)0x1f ) - .WriteUInt32( (sal_uInt32)( nUrlLen + 1 ) ); + rStrm .WriteUInt32( 0x1f ) + .WriteUInt32( ( nUrlLen + 1 ) ); for ( i = 0; i < nUrlLen; i++ ) { rStrm.WriteUInt16( rUrl[ i ] ); @@ -992,16 +992,16 @@ bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm ) if ( ! ( i & 1 ) ) rStrm.WriteUInt16( 0 ); rStrm .WriteUInt16( 0 ) - .WriteUInt32( (sal_uInt32)0x1f ) - .WriteUInt32( (sal_uInt32)1 ) - .WriteUInt32( (sal_uInt32)0 ); + .WriteUInt32( 0x1f ) + .WriteUInt32( 1 ) + .WriteUInt32( 0 ); } break; } } nCurrentOfs = rStrm.Tell(); rStrm.Seek( nParaOfs ); - rStrm.WriteUInt32( (sal_uInt32)( nCurrentOfs - ( nParaOfs + 4 ) ) ); + rStrm.WriteUInt32( ( nCurrentOfs - ( nParaOfs + 4 ) ) ); rStrm.WriteUInt32( nParaCount ); rStrm.Seek( nCurrentOfs ); return true; @@ -1014,8 +1014,8 @@ bool PPTWriter::ImplCreateMainNotes() mpPptEscherEx->PtReplaceOrInsert( EPP_Persist_MainNotes, mpStrm->Tell() ); mpPptEscherEx->OpenContainer( EPP_Notes ); mpPptEscherEx->AddAtom( 8, EPP_NotesAtom, 1 ); - mpStrm->WriteUInt32( (sal_uInt32)0x80000001 ) // Number that identifies this slide - .WriteUInt32( (sal_uInt32)0 ); // follow nothing + mpStrm->WriteUInt32( 0x80000001 ) // Number that identifies this slide + .WriteUInt32( 0 ); // follow nothing mpPptEscherEx->OpenContainer( EPP_PPDrawing ); mpPptEscherEx->OpenContainer( ESCHER_DgContainer ); mpPptEscherEx->EnterGroup(0,0); @@ -1042,7 +1042,7 @@ bool PPTWriter::ImplCreateMainNotes() mpPptEscherEx->CloseContainer(); // ESCHER_DgContainer mpPptEscherEx->CloseContainer(); // EPP_Drawing mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 1 ); - mpStrm->WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x808080 ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x99cc00 ).WriteUInt32( (sal_uInt32)0xcc3333 ).WriteUInt32( (sal_uInt32)0xffcccc ).WriteUInt32( (sal_uInt32)0xb2b2b2 ); + mpStrm->WriteUInt32( 0xffffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x808080 ).WriteUInt32( 0x000000 ).WriteUInt32( 0x99cc00 ).WriteUInt32( 0xcc3333 ).WriteUInt32( 0xffcccc ).WriteUInt32( 0xb2b2b2 ); mpPptEscherEx->CloseContainer(); // EPP_Notes return true; } @@ -1137,7 +1137,7 @@ void PPTWriter::ImplWriteNotes( sal_uInt32 nPageNum ) mpPptEscherEx->PtReplaceOrInsert( EPP_Persist_Notes | nPageNum, mpStrm->Tell() ); mpPptEscherEx->OpenContainer( EPP_Notes ); mpPptEscherEx->AddAtom( 8, EPP_NotesAtom, 1 ); - mpStrm->WriteUInt32( (sal_uInt32)nPageNum + 0x100 ) + mpStrm->WriteUInt32( nPageNum + 0x100 ) .WriteUInt16( 3 ) // follow master .... .WriteUInt16( 0 ); @@ -1171,7 +1171,7 @@ void PPTWriter::ImplWriteNotes( sal_uInt32 nPageNum ) mpPptEscherEx->CloseContainer(); // ESCHER_DgContainer mpPptEscherEx->CloseContainer(); // EPP_Drawing mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 1 ); - mpStrm->WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x808080 ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x99cc00 ).WriteUInt32( (sal_uInt32)0xcc3333 ).WriteUInt32( (sal_uInt32)0xffcccc ).WriteUInt32( (sal_uInt32)0xb2b2b2 ); + mpStrm->WriteUInt32( 0xffffff ).WriteUInt32( 0x000000 ).WriteUInt32( 0x808080 ).WriteUInt32( 0x000000 ).WriteUInt32( 0x99cc00 ).WriteUInt32( 0xcc3333 ).WriteUInt32( 0xffcccc ).WriteUInt32( 0xb2b2b2 ); mpPptEscherEx->CloseContainer(); // EPP_Notes }; @@ -1286,15 +1286,15 @@ void PPTWriter::ImplWriteOLE( ) // create a dummy content stream, the dummy content is necessary for ppt, but not for // doc files, so we can't share code. SotStorageStreamRef xStm = xCleanStorage->OpenSotStream( aPersistStream, STREAM_STD_READWRITE ); - xStm->WriteUInt32( (sal_uInt32)0 ) // no ClipboardId - .WriteUInt32( (sal_uInt32)4 ) // no target device - .WriteUInt32( (sal_uInt32)1 ) // aspect ratio + xStm->WriteUInt32( 0 ) // no ClipboardId + .WriteUInt32( 4 ) // no target device + .WriteUInt32( 1 ) // aspect ratio .WriteInt32( -1 ) // L-Index - .WriteUInt32( (sal_uInt32)0 ) // Advanced Flags - .WriteUInt32( (sal_uInt32)0 ) // compression - .WriteUInt32( (sal_uInt32)0 ) // Size - .WriteUInt32( (sal_uInt32)0 ) // " - .WriteUInt32( (sal_uInt32)0 ); + .WriteUInt32( 0 ) // Advanced Flags + .WriteUInt32( 0 ) // compression + .WriteUInt32( 0 ) // Size + .WriteUInt32( 0 ) // " + .WriteUInt32( 0 ); pStrm = xCleanStorage->CreateMemoryStream(); } } @@ -1342,11 +1342,11 @@ bool PPTWriter::ImplWriteAtomEnding() sal_uInt32 i, nPos, nOfs, nPersistOfs = mpStrm->Tell(); sal_uInt32 nPersistEntrys = 0; - mpStrm->WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ); // skip record header and first entry + mpStrm->WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ); // skip record header and first entry // write document persist nPersistEntrys++; - mpStrm->WriteUInt32( (sal_uInt32)0 ); + mpStrm->WriteUInt32( 0 ); // write MasterPages persists for ( i = 0; i < mnMasterPages; i++ ) { @@ -1426,17 +1426,17 @@ bool PPTWriter::ImplWriteAtomEnding() nPos = mpStrm->Tell(); mpStrm->Seek( nPersistOfs ); mpPptEscherEx->AddAtom( ( nPersistEntrys + 1 ) << 2, EPP_PersistPtrIncrementalBlock ); // insert Record Header - mpStrm->WriteUInt32( (sal_uInt32)( ( nPersistEntrys << 20 ) | 1 ) ); + mpStrm->WriteUInt32( ( ( nPersistEntrys << 20 ) | 1 ) ); mpStrm->Seek( nPos ); - mpCurUserStrm->WriteUInt32( (sal_uInt32)nPos ); // set offset to current edit + mpCurUserStrm->WriteUInt32( nPos ); // set offset to current edit mpPptEscherEx->AddAtom( 28, EPP_UserEditAtom ); mpStrm->WriteInt32( 0x100 ) // last slide ID - .WriteUInt32( (sal_uInt32)0x03000dbc ) // minor and major app version that did the save - .WriteUInt32( (sal_uInt32)0 ) // offset last save, 0 after a full save + .WriteUInt32( 0x03000dbc ) // minor and major app version that did the save + .WriteUInt32( 0 ) // offset last save, 0 after a full save .WriteUInt32( nPersistOfs ) // File offset to persist pointers for this save operation - .WriteUInt32( (sal_uInt32)1 ) // Persist reference to the document persist object - .WriteUInt32( (sal_uInt32)nPersistEntrys ) // max persists written, Seed value for persist object id management + .WriteUInt32( 1 ) // Persist reference to the document persist object + .WriteUInt32( nPersistEntrys ) // max persists written, Seed value for persist object id management .WriteInt16( EPP_LastViewTypeSlideView ) // last view type .WriteInt16( 0x12 ); // padword diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 7ee29aa384c4..bca9fc82b774 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -154,14 +154,14 @@ sal_uInt32 PPTWriter::ImplVBAInfoContainer( SvStream* pStrm ) sal_uInt32 nSize = 28; if ( pStrm ) { - pStrm->WriteUInt32( (sal_uInt32)( 0x1f | ( EPP_VBAInfo << 16 ) ) ) - .WriteUInt32( (sal_uInt32)( nSize - 8 ) ) - .WriteUInt32( (sal_uInt32)( 2 | ( EPP_VBAInfoAtom << 16 ) ) ) - .WriteUInt32( (sal_uInt32)12 ); + pStrm->WriteUInt32( ( 0x1f | ( EPP_VBAInfo << 16 ) ) ) + .WriteUInt32( ( nSize - 8 ) ) + .WriteUInt32( ( 2 | ( EPP_VBAInfoAtom << 16 ) ) ) + .WriteUInt32( 12 ); mpPptEscherEx->InsertPersistOffset( EPP_Persist_VBAInfoAtom, pStrm->Tell() ); - pStrm->WriteUInt32( (sal_uInt32)0 ) - .WriteUInt32( (sal_uInt32)0 ) - .WriteUInt32( (sal_uInt32)1 ); + pStrm->WriteUInt32( 0 ) + .WriteUInt32( 0 ) + .WriteUInt32( 1 ); } return nSize; } @@ -193,11 +193,11 @@ sal_uInt32 PPTWriter::ImplSlideViewInfoContainer( sal_uInt32 nInstance, SvStream nPosition1 = 0xb40; nPosition2 = 0x870; } - pStrm->WriteUInt32( (sal_uInt32)( 0xf | ( EPP_SlideViewInfo << 16 ) | ( nInstance << 4 ) ) ) - .WriteUInt32( (sal_uInt32)( nSize - 8 ) ) - .WriteUInt32( (sal_uInt32)( EPP_SlideViewInfoAtom << 16 ) ).WriteUInt32( (sal_uInt32)3 ) + pStrm->WriteUInt32( ( 0xf | ( EPP_SlideViewInfo << 16 ) | ( nInstance << 4 ) ) ) + .WriteUInt32( ( nSize - 8 ) ) + .WriteUInt32( ( EPP_SlideViewInfoAtom << 16 ) ).WriteUInt32( 3 ) .WriteUChar( bShowGuides ).WriteUChar( bSnapToGrid ).WriteUChar( bSnapToShape ) - .WriteUInt32( (sal_uInt32)( EPP_ViewInfoAtom << 16 ) ).WriteUInt32( (sal_uInt32)52 ) + .WriteUInt32( ( EPP_ViewInfoAtom << 16 ) ).WriteUInt32( 52 ) .WriteInt32( nScaling ).WriteInt32( 100 ).WriteInt32( nScaling ).WriteInt32( 100 ) // scaling atom - Keeps the current scale .WriteInt32( nScaling ).WriteInt32( 100 ).WriteInt32( nScaling ).WriteInt32( 100 ) // scaling atom - Keeps the previous scale .WriteInt32( 0x17ac ).WriteInt32( nMasterCoordinate )// Origin - Keeps the origin in master coordinates @@ -205,10 +205,10 @@ sal_uInt32 PPTWriter::ImplSlideViewInfoContainer( sal_uInt32 nInstance, SvStream .WriteUChar( 1 ) // Bool1 varScale - Set if zoom to fit is set .WriteUChar( 0 ) // bool1 draftMode - Not used .WriteUInt16( 0 ) // padword - .WriteUInt32( (sal_uInt32)( ( 7 << 4 ) | ( EPP_GuideAtom << 16 ) ) ).WriteUInt32( (sal_uInt32)8 ) - .WriteUInt32( (sal_uInt32)0 ) // Type of the guide. If the guide is horizontal this value is zero. If it's vertical, it's one. + .WriteUInt32( ( ( 7 << 4 ) | ( EPP_GuideAtom << 16 ) ) ).WriteUInt32( 8 ) + .WriteUInt32( 0 ) // Type of the guide. If the guide is horizontal this value is zero. If it's vertical, it's one. .WriteInt32( nPosition1 ) // Position of the guide in master coordinates. X coordinate if it's vertical, and Y coordinate if it's horizontal. - .WriteUInt32( (sal_uInt32)( ( 7 << 4 ) | ( EPP_GuideAtom << 16 ) ) ).WriteUInt32( (sal_uInt32)8 ) + .WriteUInt32( ( ( 7 << 4 ) | ( EPP_GuideAtom << 16 ) ) ).WriteUInt32( 8 ) .WriteInt32( 1 ) // Type of the guide. If the guide is horizontal this value is zero. If it's vertical, it's one. .WriteInt32( nPosition2 ); // Position of the guide in master coordinates. X coordinate if it's vertical, and Y coordinate if it's horizontal. } @@ -220,8 +220,8 @@ sal_uInt32 PPTWriter::ImplOutlineViewInfoContainer( SvStream* pStrm ) sal_uInt32 nSize = 68; if ( pStrm ) { - pStrm->WriteUInt32( (sal_uInt32)( 0xf | ( EPP_OutlineViewInfo << 16 ) ) ).WriteUInt32( (sal_uInt32)( nSize - 8 ) ) - .WriteUInt32( (sal_uInt32)( EPP_ViewInfoAtom << 16 ) ).WriteUInt32( (sal_uInt32)52 ) + pStrm->WriteUInt32( ( 0xf | ( EPP_OutlineViewInfo << 16 ) ) ).WriteUInt32( ( nSize - 8 ) ) + .WriteUInt32( ( EPP_ViewInfoAtom << 16 ) ).WriteUInt32( 52 ) .WriteInt32( 170 ).WriteInt32( 200 ).WriteInt32( 170 ).WriteInt32( 200 ) // scaling atom - Keeps the current scale .WriteInt32( 170 ).WriteInt32( 200 ).WriteInt32( 170 ).WriteInt32( 200 ) // scaling atom - Keeps the previous scale .WriteInt32( 0x17ac ).WriteInt32( 0xdda ) // Origin - Keeps the origin in master coordinates @@ -247,15 +247,15 @@ sal_uInt32 PPTWriter::ImplProgBinaryTag( SvStream* pStrm ) if ( pStrm ) { - pStrm->WriteUInt32( (sal_uInt32)( EPP_BinaryTagData << 16 ) ).WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + pStrm->WriteUInt32( ( EPP_BinaryTagData << 16 ) ).WriteUInt32( ( nSize - 8 ) ); if ( nPictureStreamSize ) { - pStrm->WriteUInt32( (sal_uInt32)( 0xf | ( EPP_PST_ExtendedBuGraContainer << 16 ) ) ).WriteUInt32( nPictureStreamSize ); + pStrm->WriteUInt32( ( 0xf | ( EPP_PST_ExtendedBuGraContainer << 16 ) ) ).WriteUInt32( nPictureStreamSize ); pStrm->Write( aBuExPictureStream.GetData(), nPictureStreamSize ); } if ( nOutlineStreamSize ) { - pStrm->WriteUInt32( (sal_uInt32)( 0xf | ( EPP_PST_ExtendedPresRuleContainer << 16 ) ) ).WriteUInt32( nOutlineStreamSize ); + pStrm->WriteUInt32( ( 0xf | ( EPP_PST_ExtendedPresRuleContainer << 16 ) ) ).WriteUInt32( nOutlineStreamSize ); pStrm->Write( aBuExOutlineStream.GetData(), nOutlineStreamSize ); } } @@ -267,16 +267,16 @@ sal_uInt32 PPTWriter::ImplProgBinaryTagContainer( SvStream* pStrm, SvMemoryStrea sal_uInt32 nSize = 8 + 8 + 14; if ( pStrm ) { - pStrm->WriteUInt32( (sal_uInt32)( 0xf | ( EPP_ProgBinaryTag << 16 ) ) ).WriteUInt32( (sal_uInt32)0 ) - .WriteUInt32( (sal_uInt32)( EPP_CString << 16 ) ).WriteUInt32( (sal_uInt32)14 ) - .WriteUInt32( (sal_uInt32)0x5f005f ).WriteUInt32( (sal_uInt32)0x50005f ) - .WriteUInt32( (sal_uInt32)0x540050 ).WriteUInt16( 0x39 ); + pStrm->WriteUInt32( ( 0xf | ( EPP_ProgBinaryTag << 16 ) ) ).WriteUInt32( 0 ) + .WriteUInt32( ( EPP_CString << 16 ) ).WriteUInt32( 14 ) + .WriteUInt32( 0x5f005f ).WriteUInt32( 0x50005f ) + .WriteUInt32( 0x540050 ).WriteUInt16( 0x39 ); } if ( pStrm && pBinTagStrm ) { sal_uInt32 nLen = pBinTagStrm->Tell(); nSize += nLen + 8; - pStrm->WriteUInt32( (sal_uInt32)( EPP_BinaryTagData << 16 ) ).WriteUInt32( nLen ); + pStrm->WriteUInt32( ( EPP_BinaryTagData << 16 ) ).WriteUInt32( nLen ); pStrm->Write( pBinTagStrm->GetData(), nLen ); } else @@ -285,7 +285,7 @@ sal_uInt32 PPTWriter::ImplProgBinaryTagContainer( SvStream* pStrm, SvMemoryStrea if ( pStrm ) { pStrm->SeekRel( - ( (sal_Int32)nSize - 4 ) ); - pStrm->WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + pStrm->WriteUInt32( ( nSize - 8 ) ); pStrm->SeekRel( nSize - 8 ); } return nSize; @@ -299,13 +299,13 @@ sal_uInt32 PPTWriter::ImplProgTagContainer( SvStream* pStrm, SvMemoryStream* pBi nSize = 8; if ( pStrm ) { - pStrm->WriteUInt32( (sal_uInt32)( 0xf | ( EPP_ProgTags << 16 ) ) ).WriteUInt32( (sal_uInt32)0 ); + pStrm->WriteUInt32( ( 0xf | ( EPP_ProgTags << 16 ) ) ).WriteUInt32( 0 ); } nSize += ImplProgBinaryTagContainer( pStrm, pBinTagStrm ); if ( pStrm ) { pStrm->SeekRel( - ( (sal_Int32)nSize - 4 ) ); - pStrm->WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + pStrm->WriteUInt32( ( nSize - 8 ) ); pStrm->SeekRel( nSize - 8 ); } } @@ -317,7 +317,7 @@ sal_uInt32 PPTWriter::ImplDocumentListContainer( SvStream* pStrm ) sal_uInt32 nSize = 8; if ( pStrm ) { - pStrm->WriteUInt32( (sal_uInt32)( ( EPP_List << 16 ) | 0xf ) ).WriteUInt32( (sal_uInt32)0 ); + pStrm->WriteUInt32( ( ( EPP_List << 16 ) | 0xf ) ).WriteUInt32( 0 ); } nSize += ImplVBAInfoContainer( pStrm ); @@ -329,7 +329,7 @@ sal_uInt32 PPTWriter::ImplDocumentListContainer( SvStream* pStrm ) if ( pStrm ) { pStrm->SeekRel( - ( (sal_Int32)nSize - 4 ) ); - pStrm->WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + pStrm->WriteUInt32( ( nSize - 8 ) ); pStrm->SeekRel( nSize - 8 ); } return nSize; @@ -340,17 +340,17 @@ sal_uInt32 PPTWriter::ImplMasterSlideListContainer( SvStream* pStrm ) sal_uInt32 i, nSize = 28 * mnMasterPages + 8; if ( pStrm ) { - pStrm->WriteUInt32( (sal_uInt32)( 0x1f | ( EPP_SlideListWithText << 16 ) ) ).WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + pStrm->WriteUInt32( ( 0x1f | ( EPP_SlideListWithText << 16 ) ) ).WriteUInt32( ( nSize - 8 ) ); for ( i = 0; i < mnMasterPages; i++ ) { - pStrm->WriteUInt32( (sal_uInt32)( EPP_SlidePersistAtom << 16 ) ).WriteUInt32( (sal_uInt32)20 ); + pStrm->WriteUInt32( ( EPP_SlidePersistAtom << 16 ) ).WriteUInt32( 20 ); mpPptEscherEx->InsertPersistOffset( EPP_MAINMASTER_PERSIST_KEY | i, pStrm->Tell() ); - pStrm->WriteUInt32( (sal_uInt32)0 ) // psrReference - logical reference to the slide persist object ( EPP_MAINMASTER_PERSIST_KEY ) - .WriteUInt32( (sal_uInt32)0 ) // flags - only bit 3 used, if set then slide contains shapes other than placeholders + pStrm->WriteUInt32( 0 ) // psrReference - logical reference to the slide persist object ( EPP_MAINMASTER_PERSIST_KEY ) + .WriteUInt32( 0 ) // flags - only bit 3 used, if set then slide contains shapes other than placeholders .WriteInt32( 0 ) // numberTexts - number of placeholder texts stored with the persist object. Allows to display outline view without loading the slide persist objects .WriteInt32( ( 0x80000000 | i ) ) // slideId - Unique slide identifier, used for OLE link monikers for example - .WriteUInt32( (sal_uInt32)0 ); // reserved, usually 0 + .WriteUInt32( 0 ); // reserved, usually 0 } } return nSize; @@ -375,11 +375,11 @@ sal_uInt32 PPTWriter::ImplInsertBookmarkURL( const OUString& rBookmarkURL, const mpExEmbed->WriteUInt16( 0xf ) .WriteUInt16( EPP_ExHyperlink ) - .WriteUInt32( (sal_uInt32)0 ); + .WriteUInt32( 0 ); sal_uInt32 nHyperSize, nHyperStart = mpExEmbed->Tell(); mpExEmbed->WriteUInt16( 0 ) .WriteUInt16( EPP_ExHyperlinkAtom ) - .WriteUInt32( (sal_uInt32)4 ) + .WriteUInt32( 4 ) .WriteUInt32( nHyperId ); PPTWriter::WriteCString( *mpExEmbed, rStringVer0, 0 ); @@ -446,25 +446,25 @@ bool PPTWriter::ImplCloseDocument() { mpStrm->WriteUInt16( 0xf ) .WriteUInt16( EPP_ExObjList ) - .WriteUInt32( (sal_uInt32)( nExEmbedSize + 12 ) ) + .WriteUInt32( ( nExEmbedSize + 12 ) ) .WriteUInt16( 0 ) .WriteUInt16( EPP_ExObjListAtom ) - .WriteUInt32( (sal_uInt32)4 ) - .WriteUInt32( (sal_uInt32)mnExEmbed ); + .WriteUInt32( 4 ) + .WriteUInt32( mnExEmbed ); mpPptEscherEx->InsertPersistOffset( EPP_Persist_ExObj, mpStrm->Tell() ); mpStrm->Write( mpExEmbed->GetData(), nExEmbedSize ); } // CREATE ENVIRONMENT - mpStrm->WriteUInt16( 0xf ).WriteUInt16( EPP_Environment ).WriteUInt32( (sal_uInt32)nEnvironment ); + mpStrm->WriteUInt16( 0xf ).WriteUInt16( EPP_Environment ).WriteUInt32( nEnvironment ); // Open Container ( EPP_SrKinsoku ) - mpStrm->WriteUInt16( 0x2f ).WriteUInt16( EPP_SrKinsoku ).WriteUInt32( (sal_uInt32)12 ); + mpStrm->WriteUInt16( 0x2f ).WriteUInt16( EPP_SrKinsoku ).WriteUInt32( 12 ); mpPptEscherEx->AddAtom( 4, EPP_SrKinsokuAtom, 0, 3 ); mpStrm->WriteInt32( 0 ); // SrKinsoku Level 0 // Open Container ( EPP_FontCollection ) - mpStrm->WriteUInt16( 0xf ).WriteUInt16( EPP_FontCollection ).WriteUInt32( (sal_uInt32)maFontCollection.GetCount() * 76 ); + mpStrm->WriteUInt16( 0xf ).WriteUInt16( EPP_FontCollection ).WriteUInt32( maFontCollection.GetCount() * 76 ); for ( sal_uInt32 i = 0; i < maFontCollection.GetCount(); i++ ) { @@ -531,7 +531,7 @@ bool PPTWriter::ImplCloseDocument() } mpStyleSheet->WriteTxCFStyleAtom( *mpStrm ); // create style that is used for new standard objects mpPptEscherEx->AddAtom( 10, EPP_TxSIStyleAtom ); - mpStrm->WriteUInt32( (sal_uInt32)7 ) // ? + mpStrm->WriteUInt32( 7 ) // ? .WriteInt16( 2 ) // ? .WriteUChar( 9 ) // ? .WriteUChar( 8 ) // ? @@ -740,7 +740,7 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj ) rOut.WriteUInt32( nCharCount ) .WriteUInt16( nDepth ) // Level - .WriteUInt32( (sal_uInt32)nPropertyFlags ); // Paragraph Attribut Set + .WriteUInt32( nPropertyFlags ); // Paragraph Attribut Set if ( nPropertyFlags & 0xf ) rOut.WriteInt16( nBulletFlags ); @@ -968,7 +968,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj ) if ( nPropertyFlags & 0x00020000 ) rOut.WriteUInt16( ( rPortion.mnCharHeight ) ); if ( nPropertyFlags & 0x00040000 ) - rOut.WriteUInt32( (sal_uInt32)nCharColor ); + rOut.WriteUInt32( nCharColor ); if ( nPropertyFlags & 0x00080000 ) rOut.WriteInt16( rPortion.mnCharEscapement ); } @@ -1067,7 +1067,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u { PPTExParaSheet& rParaSheet = mpStyleSheet->GetParaSheet( nTextInstance ); - rOut.WriteUInt32( (sal_uInt32)( ( EPP_TextHeaderAtom << 16 ) | ( nAtomInstance << 4 ) ) ).WriteUInt32( (sal_uInt32)4 ) + rOut.WriteUInt32( ( ( EPP_TextHeaderAtom << 16 ) | ( nAtomInstance << 4 ) ) ).WriteUInt32( 4 ) .WriteInt32( nTextInstance ); if ( mbEmptyPresObj ) @@ -1087,12 +1087,12 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u sal_uInt32 nSize, nPos = rOut.Tell(); - rOut.WriteUInt32( (sal_uInt32)( EPP_StyleTextPropAtom << 16 ) ).WriteUInt32( (sal_uInt32)0 ); + rOut.WriteUInt32( ( EPP_StyleTextPropAtom << 16 ) ).WriteUInt32( 0 ); ImplWriteParagraphs( rOut, aTextObj ); ImplWritePortions( rOut, aTextObj ); nSize = rOut.Tell() - nPos; rOut.SeekRel( - ( (sal_Int32)nSize - 4 ) ); - rOut.WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + rOut.WriteUInt32( ( nSize - 8 ) ); rOut.SeekRel( nSize - 8 ); for ( sal_uInt32 i = 0; i < aTextObj.ParagraphCount(); ++i ) @@ -1110,16 +1110,16 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u case 1 : case 2 : { - rOut.WriteUInt32( (sal_uInt32)( EPP_DateTimeMCAtom << 16 ) ).WriteUInt32( (sal_uInt32)8 ) - .WriteUInt32( (sal_uInt32)( pFieldEntry->nFieldStartPos ) ) // TxtOffset to TxtField; + rOut.WriteUInt32( ( EPP_DateTimeMCAtom << 16 ) ).WriteUInt32( 8 ) + .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ) // TxtOffset to TxtField; .WriteUChar( ( pFieldEntry->nFieldType & 0xff ) ) // Type .WriteUChar( 0 ).WriteUInt16( 0 ); // PadBytes } break; case 3 : { - rOut.WriteUInt32( (sal_uInt32)( EPP_SlideNumberMCAtom << 16 ) ).WriteUInt32( (sal_uInt32 ) 4 ) - .WriteUInt32( (sal_uInt32)( pFieldEntry->nFieldStartPos ) ); + rOut.WriteUInt32( ( EPP_SlideNumberMCAtom << 16 ) ).WriteUInt32( (sal_uInt32 ) 4 ) + .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ); } break; case 4 : @@ -1162,9 +1162,9 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u else nHyperId = ImplInsertBookmarkURL( pFieldEntry->aFieldUrl, 2 | ( nHyperId << 8 ), aFile, aTarget, "", "" ); - rOut.WriteUInt32( (sal_uInt32)( ( EPP_InteractiveInfo << 16 ) | 0xf ) ).WriteUInt32( (sal_uInt32)24 ) - .WriteUInt32( (sal_uInt32)( EPP_InteractiveInfoAtom << 16 ) ).WriteUInt32( (sal_uInt32)16 ) - .WriteUInt32( (sal_uInt32)0 ) // soundref + rOut.WriteUInt32( ( ( EPP_InteractiveInfo << 16 ) | 0xf ) ).WriteUInt32( 24 ) + .WriteUInt32( ( EPP_InteractiveInfoAtom << 16 ) ).WriteUInt32( 16 ) + .WriteUInt32( 0 ) // soundref .WriteUInt32( nHyperId ) // hyperlink id .WriteUChar( 4 ) // hyperlink action .WriteUChar( 0 ) // ole verb @@ -1172,27 +1172,27 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u .WriteUChar( 0 ) // flags .WriteUChar( 8 ) // hyperlink type ? .WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ) - .WriteUInt32( (sal_uInt32)( EPP_TxInteractiveInfoAtom << 16 ) ).WriteUInt32( (sal_uInt32)8 ) - .WriteUInt32( (sal_uInt32)( pFieldEntry->nFieldStartPos ) ) - .WriteUInt32( (sal_uInt32)( pFieldEntry->nFieldEndPos ) ); + .WriteUInt32( ( EPP_TxInteractiveInfoAtom << 16 ) ).WriteUInt32( 8 ) + .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ) + .WriteUInt32( ( pFieldEntry->nFieldEndPos ) ); } break; case 5 : { - rOut.WriteUInt32( (sal_uInt32)( EPP_GenericDateMCAtom << 16 ) ).WriteUInt32( (sal_uInt32)4 ) - .WriteUInt32( (sal_uInt32)( pFieldEntry->nFieldStartPos ) ); + rOut.WriteUInt32( ( EPP_GenericDateMCAtom << 16 ) ).WriteUInt32( 4 ) + .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ); } break; case 6 : { - rOut.WriteUInt32( (sal_uInt32)( EPP_HeaderMCAtom << 16 ) ).WriteUInt32( (sal_uInt32 ) 4 ) - .WriteUInt32( (sal_uInt32)( pFieldEntry->nFieldStartPos ) ); + rOut.WriteUInt32( ( EPP_HeaderMCAtom << 16 ) ).WriteUInt32( (sal_uInt32 ) 4 ) + .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ); } break; case 7 : { - rOut.WriteUInt32( (sal_uInt32)( EPP_FooterMCAtom << 16 ) ).WriteUInt32( (sal_uInt32 ) 4 ) - .WriteUInt32( (sal_uInt32)( pFieldEntry->nFieldStartPos ) ); + rOut.WriteUInt32( ( EPP_FooterMCAtom << 16 ) ).WriteUInt32( (sal_uInt32 ) 4 ) + .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ); } break; default: @@ -1272,7 +1272,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u pRuleOut = pTextRule->pOut = new SvMemoryStream( 0x100, 0x100 ); sal_uInt32 nRulePos = pRuleOut->Tell(); - pRuleOut->WriteUInt32( (sal_uInt32)( EPP_TextRulerAtom << 16 ) ).WriteUInt32( (sal_uInt32)0 ); + pRuleOut->WriteUInt32( ( EPP_TextRulerAtom << 16 ) ).WriteUInt32( 0 ); pRuleOut->WriteUInt32( nTextRulerAtomFlags ); if ( nTextRulerAtomFlags & 4 ) { @@ -1310,7 +1310,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u } sal_uInt32 nBufSize = pRuleOut->Tell() - nRulePos; pRuleOut->SeekRel( - ( (sal_Int32)nBufSize - 4 ) ); - pRuleOut->WriteUInt32( (sal_uInt32)( nBufSize - 8 ) ); + pRuleOut->WriteUInt32( ( nBufSize - 8 ) ); pRuleOut->SeekRel( nBufSize - 8 ); } } @@ -1320,7 +1320,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u { sal_uInt32 nNumberingType = 0, nPos2 = rExtBuStr.Tell(); - rExtBuStr.WriteUInt32( (sal_uInt32)( EPP_PST_ExtendedParagraphAtom << 16 ) ).WriteUInt32( (sal_uInt32)0 ); + rExtBuStr.WriteUInt32( ( EPP_PST_ExtendedParagraphAtom << 16 ) ).WriteUInt32( 0 ); for ( sal_uInt32 i = 0; i < aTextObj.ParagraphCount(); ++i ) { @@ -1334,7 +1334,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u if ( pBulletPara->nNumberingType != SVX_NUM_BITMAP ) nBulletFlags = 0x3000000; } - rExtBuStr.WriteUInt32( (sal_uInt32)nBulletFlags ); + rExtBuStr.WriteUInt32( nBulletFlags ); if ( nBulletFlags & 0x800000 ) rExtBuStr.WriteUInt16( nBulletId ); @@ -1366,11 +1366,11 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u break; } - rExtBuStr.WriteUInt32( (sal_uInt32)nNumberingType ); + rExtBuStr.WriteUInt32( nNumberingType ); } if ( nBulletFlags & 0x2000000 ) rExtBuStr.WriteUInt16( pBulletPara->nStartWith ); - rExtBuStr.WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ); + rExtBuStr.WriteUInt32( 0 ).WriteUInt32( 0 ); } sal_uInt32 nBulletSize = ( rExtBuStr.Tell() - nPos2 ) - 8; rExtBuStr.SeekRel( - ( (sal_Int32)nBulletSize + 4 ) ); @@ -2033,27 +2033,27 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat sal_uInt32 nContainerSize = 24; if ( nAction == 2 ) nContainerSize += ( aFile.getLength() * 2 ) + 8; - rSt.WriteUInt32( (sal_uInt32)( ( EPP_InteractiveInfo << 16 ) | 0xf ) ).WriteUInt32( (sal_uInt32)nContainerSize ) - .WriteUInt32( (sal_uInt32)( EPP_InteractiveInfoAtom << 16 ) ).WriteUInt32( (sal_uInt32)16 ) + rSt.WriteUInt32( ( ( EPP_InteractiveInfo << 16 ) | 0xf ) ).WriteUInt32( nContainerSize ) + .WriteUInt32( ( EPP_InteractiveInfoAtom << 16 ) ).WriteUInt32( 16 ) .WriteUInt32( nSoundRef ) .WriteUInt32( nHyperLinkID ) .WriteUChar( nAction ) .WriteUChar( nOleVerb ) .WriteUChar( nJump ) .WriteUChar( nFlags ) - .WriteUInt32( (sal_uInt32)nHyperLinkType ); + .WriteUInt32( nHyperLinkType ); if ( nAction == 2 ) // run program Action { sal_Int32 nLen = aFile.getLength(); - rSt.WriteUInt32( (sal_uInt32)( ( EPP_CString << 16 ) | 0x20 ) ).WriteUInt32( (sal_uInt32)( nLen * 2 ) ); + rSt.WriteUInt32( ( ( EPP_CString << 16 ) | 0x20 ) ).WriteUInt32( ( nLen * 2 ) ); for ( sal_Int32 i = 0; i < nLen; i++ ) rSt.WriteUInt16( aFile[i] ); } - rSt.WriteUInt32( (sal_uInt32)( ( EPP_InteractiveInfo << 16 ) | 0x1f ) ).WriteUInt32( (sal_uInt32)24 ) // Mouse Over Action - .WriteUInt32( (sal_uInt32)( EPP_InteractiveInfo << 16 ) ).WriteUInt32( (sal_uInt32)16 ); - for ( int i = 0; i < 4; i++, rSt.WriteUInt32( (sal_uInt32)0 ) ) ; + rSt.WriteUInt32( ( ( EPP_InteractiveInfo << 16 ) | 0x1f ) ).WriteUInt32( 24 ) // Mouse Over Action + .WriteUInt32( ( EPP_InteractiveInfo << 16 ) ).WriteUInt32( 16 ); + for ( int i = 0; i < 4; i++, rSt.WriteUInt32( 0 ) ) ; } bool PPTWriter::ImplGetEffect( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rPropSet, @@ -2115,7 +2115,7 @@ bool PPTWriter::ImplCreatePresentationPlaceholder( const bool bMasterPage, const mpStrm->WriteInt16( maRect.Top() ).WriteInt16( maRect.Left() ).WriteInt16( maRect.Right() ).WriteInt16( maRect.Bottom() ); // oben, links, rechts, unten ???? mpPptEscherEx->OpenContainer( ESCHER_ClientData ); mpPptEscherEx->AddAtom( 8, EPP_OEPlaceholderAtom ); - mpStrm->WriteUInt32( (sal_uInt32)0 ) // PlacementID + mpStrm->WriteUInt32( 0 ) // PlacementID .WriteUChar( nPlaceHolderId ) // PlaceHolderID .WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) .WriteUInt16( 0 ); // padword @@ -2123,8 +2123,8 @@ bool PPTWriter::ImplCreatePresentationPlaceholder( const bool bMasterPage, const if ( aClientTextBox.Tell() ) { - mpStrm->WriteUInt32( (sal_uInt32)( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) - .WriteUInt32( (sal_uInt32)aClientTextBox.Tell() ); + mpStrm->WriteUInt32( ( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) + .WriteUInt32( aClientTextBox.Tell() ); mpStrm->Write( aClientTextBox.GetData(), aClientTextBox.Tell() ); } @@ -2471,8 +2471,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a catch( ::com::sun::star::uno::Exception& ) {} - mpExEmbed->WriteUInt32( (sal_uInt32)( 0xf | ( EPP_ExControl << 16 ) ) ) - .WriteUInt32( (sal_uInt32)0 ); // Size of this container + mpExEmbed->WriteUInt32( ( 0xf | ( EPP_ExControl << 16 ) ) ) + .WriteUInt32( 0 ); // Size of this container sal_uInt32 nSize, nOldPos = mpExEmbed->Tell(); @@ -2481,8 +2481,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a nPageId |= 0x80000000; else nPageId += 0x100; - mpExEmbed->WriteUInt32( (sal_uInt32)( EPP_ExControlAtom << 16 ) ) - .WriteUInt32( (sal_uInt32)4 ) + mpExEmbed->WriteUInt32( ( EPP_ExControlAtom << 16 ) ) + .WriteUInt32( 4 ) .WriteUInt32( nPageId ); PPTExOleObjEntry* pEntry = new PPTExOleObjEntry( OCX_CONTROL, mpExEmbed->Tell() ); pEntry->xControlModel = aXControlModel; @@ -2491,14 +2491,14 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a mnExEmbed++; - mpExEmbed->WriteUInt32( (sal_uInt32)( 1 | ( EPP_ExOleObjAtom << 16 ) ) ) - .WriteUInt32( (sal_uInt32)24 ) - .WriteUInt32( (sal_uInt32)nAspect ) - .WriteUInt32( (sal_uInt32)2 ) - .WriteUInt32( (sal_uInt32)mnExEmbed ) - .WriteUInt32( (sal_uInt32)0 ) - .WriteUInt32( (sal_uInt32)4 ) // index to the persist table - .WriteUInt32( (sal_uInt32)0x0012de00 ); + mpExEmbed->WriteUInt32( ( 1 | ( EPP_ExOleObjAtom << 16 ) ) ) + .WriteUInt32( 24 ) + .WriteUInt32( nAspect ) + .WriteUInt32( 2 ) + .WriteUInt32( mnExEmbed ) + .WriteUInt32( 0 ) + .WriteUInt32( 4 ) // index to the persist table + .WriteUInt32( 0x0012de00 ); ::com::sun::star::awt::Size aSize; OUString aControlName; @@ -2813,14 +2813,14 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a mpStrm->WriteInt16( maRect.Top() ).WriteInt16( maRect.Left() ).WriteInt16( maRect.Right() ).WriteInt16( maRect.Bottom() ); // top, left, right, bottom ???? mpPptEscherEx->OpenContainer( ESCHER_ClientData ); mpPptEscherEx->AddAtom( 8, EPP_OEPlaceholderAtom ); - mpStrm->WriteUInt32( (sal_uInt32)0 ) // PlacementID + mpStrm->WriteUInt32( 0 ) // PlacementID .WriteUChar( EPP_PLACEHOLDER_MASTERTITLE ) // PlaceHolderID .WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) .WriteUInt16( 0 ); // padword mpPptEscherEx->CloseContainer(); // ESCHER_ClientData mpPptEscherEx->OpenContainer( ESCHER_ClientTextbox ); mpPptEscherEx->AddAtom( 4, EPP_TextHeaderAtom ); - mpStrm->WriteUInt32( (sal_uInt32)EPP_TEXTTYPE_Title ); + mpStrm->WriteUInt32( EPP_TEXTTYPE_Title ); mpPptEscherEx->AddAtom( mnTextSize << 1, EPP_TextCharsAtom ); const sal_Unicode* pString = aUString.getStr(); for ( sal_uInt32 i = 0; i < mnTextSize; i++ ) @@ -2831,9 +2831,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a mpStrm->WriteUInt16( nChar ); } mpPptEscherEx->AddAtom( 6, EPP_BaseTextPropAtom ); - mpStrm->WriteUInt32( (sal_uInt32)( mnTextSize + 1 ) ).WriteUInt16( 0 ); + mpStrm->WriteUInt32( ( mnTextSize + 1 ) ).WriteUInt16( 0 ); mpPptEscherEx->AddAtom( 10, EPP_TextSpecInfoAtom ); - mpStrm->WriteUInt32( (sal_uInt32)( mnTextSize + 1 ) ).WriteUInt32( (sal_uInt32)1 ).WriteUInt16( 0 ); + mpStrm->WriteUInt32( ( mnTextSize + 1 ) ).WriteUInt32( 1 ).WriteUInt16( 0 ); mpPptEscherEx->CloseContainer(); // ESCHER_ClientTextBox mpPptEscherEx->CloseContainer(); // ESCHER_SpContainer } @@ -2906,7 +2906,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a mpPptEscherEx->OpenContainer( ESCHER_ClientData ); mpPptEscherEx->AddAtom( 8, EPP_OEPlaceholderAtom ); sal_uInt8 PlaceHolderID = ( mType == "presentation.Subtitle") ? EPP_PLACEHOLDER_MASTERSUBTITLE:EPP_PLACEHOLDER_MASTERBODY; - mpStrm->WriteUInt32( (sal_uInt32)1 ) // PlacementID + mpStrm->WriteUInt32( 1 ) // PlacementID .WriteUChar( PlaceHolderID )/*(sal_uInt8)EPP_PLACEHOLDER_MASTERBODY */ // PlaceHolderID .WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) .WriteUInt16( 0 ); // padword @@ -2914,9 +2914,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a mpPptEscherEx->OpenContainer( ESCHER_ClientTextbox ); // printf mpPptEscherEx->AddAtom( 4, EPP_TextHeaderAtom ); if ( mType == "presentation.Subtitle") - mpStrm->WriteUInt32( (sal_uInt32)EPP_TEXTTYPE_CenterBody ); + mpStrm->WriteUInt32( EPP_TEXTTYPE_CenterBody ); else - mpStrm->WriteUInt32( (sal_uInt32)EPP_TEXTTYPE_Body ); + mpStrm->WriteUInt32( EPP_TEXTTYPE_Body ); mnTextSize = aTextObj.Count(); aTextObj.Write( mpStrm ); mpPptEscherEx->BeginAtom(); @@ -2933,7 +2933,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a } mpPptEscherEx->EndAtom( EPP_BaseTextPropAtom ); mpPptEscherEx->AddAtom( 10, EPP_TextSpecInfoAtom ); - mpStrm->WriteUInt32( (sal_uInt32)( mnTextSize ) ).WriteUInt32( (sal_uInt32)1 ).WriteUInt16( 0 ); + mpStrm->WriteUInt32( ( mnTextSize ) ).WriteUInt32( 1 ).WriteUInt16( 0 ); mpPptEscherEx->CloseContainer(); // ESCHER_ClientTextBox mpPptEscherEx->CloseContainer(); // ESCHER_SpContainer @@ -3006,14 +3006,14 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a } else { - mpExEmbed->WriteUInt32( (sal_uInt32)( 0xf | ( EPP_ExEmbed << 16 ) ) ) - .WriteUInt32( (sal_uInt32)0 ); // Size of this container + mpExEmbed->WriteUInt32( ( 0xf | ( EPP_ExEmbed << 16 ) ) ) + .WriteUInt32( 0 ); // Size of this container sal_uInt32 nSize, nOldPos = mpExEmbed->Tell(); - mpExEmbed->WriteUInt32( (sal_uInt32)( EPP_ExEmbedAtom << 16 ) ) - .WriteUInt32( (sal_uInt32)8 ) - .WriteUInt32( (sal_uInt32)0 ) // follow colorscheme : 0->do not follow + mpExEmbed->WriteUInt32( ( EPP_ExEmbedAtom << 16 ) ) + .WriteUInt32( 8 ) + .WriteUInt32( 0 ) // follow colorscheme : 0->do not follow // 1->follow collorscheme // 2->follow text and background scheme .WriteUChar( 1 ) // (bool)set if embedded server can not be locked @@ -3038,14 +3038,14 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a catch( ::com::sun::star::uno::Exception& ) {} - mpExEmbed->WriteUInt32( (sal_uInt32)( 1 | ( EPP_ExOleObjAtom << 16 ) ) ) - .WriteUInt32( (sal_uInt32)24 ) - .WriteUInt32( (sal_uInt32)nAspect ) // Aspect - .WriteUInt32( (sal_uInt32)0 ) - .WriteUInt32( (sal_uInt32)mnExEmbed ) // index to the persist table - .WriteUInt32( (sal_uInt32)0 ) // subtype - .WriteUInt32( (sal_uInt32)0 ) - .WriteUInt32( (sal_uInt32)0x0012b600 ); + mpExEmbed->WriteUInt32( ( 1 | ( EPP_ExOleObjAtom << 16 ) ) ) + .WriteUInt32( 24 ) + .WriteUInt32( nAspect ) // Aspect + .WriteUInt32( 0 ) + .WriteUInt32( mnExEmbed ) // index to the persist table + .WriteUInt32( 0 ) // subtype + .WriteUInt32( 0 ) + .WriteUInt32( 0x0012b600 ); nSize = mpExEmbed->Tell() - nOldPos; mpExEmbed->Seek( nOldPos - 4 ); @@ -3137,25 +3137,25 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a mpExEmbed->WriteUInt16( 0xf ) .WriteUInt16( EPP_ExMCIMovie ) // PPT_PST_ExAviMovie - .WriteUInt32( (sal_uInt32)0 ); + .WriteUInt32( 0 ); sal_uInt32 nSize, nStart = mpExEmbed->Tell(); mpExEmbed->WriteUInt16( 0 ) .WriteUInt16( EPP_ExObjRefAtom ) - .WriteUInt32( (sal_uInt32)4 ) + .WriteUInt32( 4 ) .WriteUInt32( nRefId ); mpExEmbed->WriteUInt16( 0xf ) .WriteUInt16( EPP_ExVideo ) - .WriteUInt32( (sal_uInt32)0 ); + .WriteUInt32( 0 ); mpExEmbed->WriteUInt16( 0 ) .WriteUInt16( EPP_ExMediaAtom ) - .WriteUInt32( (sal_uInt32)8 ) + .WriteUInt32( 8 ) .WriteUInt32( nRefId ) .WriteUInt16( 0 ) .WriteUInt16( 0x435 ); sal_uInt16 i, nStringLen = (sal_uInt16)aMediaURL.getLength(); - mpExEmbed->WriteUInt32( (sal_uInt32)( EPP_CString << 16 ) ).WriteUInt32( (sal_uInt32)( nStringLen * 2 ) ); + mpExEmbed->WriteUInt32( ( EPP_CString << 16 ) ).WriteUInt32( ( nStringLen * 2 ) ); for ( i = 0; i < nStringLen; i++ ) { sal_Unicode nChar = aMediaURL[ i ]; @@ -3173,20 +3173,20 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a pClientData = new SvMemoryStream( 0x200, 0x200 ); pClientData->WriteUInt16( 0 ) .WriteUInt16( EPP_ExObjRefAtom ) - .WriteUInt32( (sal_uInt32)4 ) + .WriteUInt32( 4 ) .WriteUInt32( nRefId ); // write EPP_InteractiveInfo container for no_action - pClientData->WriteUInt32( (sal_uInt32)( ( EPP_InteractiveInfo << 16 ) | 0xf ) ).WriteUInt32( (sal_uInt32)24 ); + pClientData->WriteUInt32( ( ( EPP_InteractiveInfo << 16 ) | 0xf ) ).WriteUInt32( 24 ); pClientData->WriteUInt16( 0 ) .WriteUInt16( EPP_InteractiveInfoAtom ) - .WriteUInt32( (sal_uInt32)16 ) - .WriteUInt32( (sal_uInt32) 0 ) - .WriteUInt32( (sal_uInt32) 0 ) + .WriteUInt32( 16 ) + .WriteUInt32( 0 ) + .WriteUInt32( 0 ) .WriteUChar( 6 ) .WriteUChar( 0 ) .WriteUChar( 0 ) .WriteUChar( 0 ) - .WriteUInt32( (sal_uInt32) 0 ); + .WriteUInt32( 0 ); } } } @@ -3248,7 +3248,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( !pClientData ) pClientData = new SvMemoryStream( 0x200, 0x200 ); - pClientData->WriteUInt32( (sal_uInt32)( EPP_OEPlaceholderAtom << 16 ) ).WriteUInt32( (sal_uInt32)8 ) + pClientData->WriteUInt32( ( EPP_OEPlaceholderAtom << 16 ) ).WriteUInt32( 8 ) .WriteInt32( nPlacementID ) // PlacementID .WriteUChar( nPlaceHolderAtom ) // PlaceHolderID .WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) @@ -3259,7 +3259,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( !pClientData ) pClientData = new SvMemoryStream( 0x200, 0x200 ); - pClientData->WriteUInt32( (sal_uInt32)( EPP_ExObjRefAtom << 16 ) ).WriteUInt32( (sal_uInt32)4 ) + pClientData->WriteUInt32( ( EPP_ExObjRefAtom << 16 ) ).WriteUInt32( 4 ) .WriteUInt32( nOlePictureId ); nOlePictureId = 0; } @@ -3367,8 +3367,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( !pClientTextBox ) pClientTextBox = new SvMemoryStream( 12 ); - pClientTextBox->WriteUInt32( (sal_uInt32)( EPP_TextHeaderAtom << 16 ) ).WriteUInt32( (sal_uInt32)4 ) - .WriteUInt32( (sal_uInt32)7 ); + pClientTextBox->WriteUInt32( ( EPP_TextHeaderAtom << 16 ) ).WriteUInt32( 4 ) + .WriteUInt32( 7 ); } } } @@ -3386,16 +3386,16 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( pClientData ) { - mpStrm->WriteUInt32( (sal_uInt32)( ( ESCHER_ClientData << 16 ) | 0xf ) ) - .WriteUInt32( (sal_uInt32)pClientData->Tell() ); + mpStrm->WriteUInt32( ( ( ESCHER_ClientData << 16 ) | 0xf ) ) + .WriteUInt32( pClientData->Tell() ); mpStrm->Write( pClientData->GetData(), pClientData->Tell() ); delete pClientData, pClientData = NULL; } if ( pClientTextBox ) { - mpStrm->WriteUInt32( (sal_uInt32)( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) - .WriteUInt32( (sal_uInt32)pClientTextBox->Tell() ); + mpStrm->WriteUInt32( ( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) + .WriteUInt32( pClientTextBox->Tell() ); mpStrm->Write( pClientTextBox->GetData(), pClientTextBox->Tell() ); delete pClientTextBox, pClientTextBox = NULL; @@ -3459,8 +3459,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a else mpPptEscherEx->AddClientAnchor( maRect ); - mpStrm->WriteUInt32( (sal_uInt32)( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) - .WriteUInt32( (sal_uInt32)pClientTextBox->Tell() ); + mpStrm->WriteUInt32( ( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) + .WriteUInt32( pClientTextBox->Tell() ); mpStrm->Write( pClientTextBox->GetData(), pClientTextBox->Tell() ); delete pClientTextBox, pClientTextBox = NULL; @@ -3561,8 +3561,8 @@ void PPTWriter::WriteCString( SvStream& rSt, const OUString& rString, sal_uInt32 sal_Int32 nLen = rString.getLength(); if ( nLen ) { - rSt.WriteUInt32( (sal_uInt32)( ( nInstance << 4 ) | ( EPP_CString << 16 ) ) ) - .WriteUInt32( (sal_uInt32)( nLen << 1 ) ); + rSt.WriteUInt32( ( ( nInstance << 4 ) | ( EPP_CString << 16 ) ) ) + .WriteUInt32( ( nLen << 1 ) ); for ( sal_Int32 i = 0; i < nLen; i++ ) rSt.WriteUInt16( rString[i] ); } @@ -3692,8 +3692,8 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc { SvMemoryStream* pClientData = new SvMemoryStream( 0x200, 0x200 ); ImplProgTagContainer( pClientData, &aExtBu ); - mpStrm->WriteUInt32( (sal_uInt32)( ( ESCHER_ClientData << 16 ) | 0xf ) ) - .WriteUInt32( (sal_uInt32)pClientData->Tell() ); + mpStrm->WriteUInt32( ( ( ESCHER_ClientData << 16 ) | 0xf ) ) + .WriteUInt32( pClientData->Tell() ); mpStrm->Write( pClientData->GetData(), pClientData->Tell() ); delete pClientData, pClientData = NULL; @@ -3706,8 +3706,8 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc .WriteInt32( nRight ) .WriteInt32( nBottom ); - mpStrm->WriteUInt32( (sal_uInt32)( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) - .WriteUInt32( (sal_uInt32)aClientTextBox.Tell() ); + mpStrm->WriteUInt32( ( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) + .WriteUInt32( aClientTextBox.Tell() ); mpStrm->Write( aClientTextBox.GetData(), aClientTextBox.Tell() ); mpPptEscherEx->CloseContainer(); @@ -3841,12 +3841,12 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc void TextObjBinary::Write( SvStream* pStrm ) { sal_uInt32 nSize, nPos = pStrm->Tell(); - pStrm->WriteUInt32( (sal_uInt32)( EPP_TextCharsAtom << 16 ) ).WriteUInt32( (sal_uInt32)0 ); + pStrm->WriteUInt32( ( EPP_TextCharsAtom << 16 ) ).WriteUInt32( 0 ); for ( sal_uInt32 i = 0; i < ParagraphCount(); ++i ) GetParagraph(i)->Write( pStrm ); nSize = pStrm->Tell() - nPos; pStrm->SeekRel( - ( (sal_Int32)nSize - 4 ) ); - pStrm->WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + pStrm->WriteUInt32( ( nSize - 8 ) ); pStrm->SeekRel( nSize - 8 ); } diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx index a796dd688daf..b2c36388eb94 100644 --- a/sd/source/filter/eppt/escherex.cxx +++ b/sd/source/filter/eppt/escherex.cxx @@ -34,8 +34,8 @@ sal_uInt32 PptEscherEx::DrawingGroupContainerSize() void PptEscherEx::WriteDrawingGroupContainer( SvStream& rSt ) { sal_uInt32 nSize = DrawingGroupContainerSize(); - rSt.WriteUInt32( (sal_uInt32)( 0xf | ( 1035 << 16 ) ) ) // EPP_PPDrawingGroup - .WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + rSt.WriteUInt32( ( 0xf | ( 1035 << 16 ) ) ) // EPP_PPDrawingGroup + .WriteUInt32( ( nSize - 8 ) ); ImplWriteDggContainer( rSt ); } @@ -57,8 +57,8 @@ void PptEscherEx::ImplWriteDggContainer( SvStream& rSt ) sal_uInt32 nSize = ImplDggContainerSize(); if ( nSize ) { - rSt.WriteUInt32( (sal_uInt32)( 0xf | ( ESCHER_DggContainer << 16 ) ) ) - .WriteUInt32( (sal_uInt32)( nSize - 8 ) ); + rSt.WriteUInt32( ( 0xf | ( ESCHER_DggContainer << 16 ) ) ) + .WriteUInt32( ( nSize - 8 ) ); mxGlobal->SetDggContainer(); mxGlobal->WriteDggAtom( rSt ); @@ -83,14 +83,14 @@ void PptEscherEx::ImplWriteOptAtom( SvStream& rSt ) sal_uInt32 nSize = ImplOptAtomSize(); if ( nSize ) { - rSt.WriteUInt32( (sal_uInt32)( ( ESCHER_OPT << 16 ) | ( ESCHER_OPT_COUNT << 4 ) | 0x3 ) ) - .WriteUInt32( (sal_uInt32)( nSize - 8 ) ) - .WriteUInt16( ESCHER_Prop_fillColor ) .WriteUInt32( (sal_uInt32)0xffb800 ) - .WriteUInt16( ESCHER_Prop_fillBackColor ) .WriteUInt32( (sal_uInt32)0 ) - .WriteUInt16( ESCHER_Prop_fNoFillHitTest ) .WriteUInt32( (sal_uInt32)0x00100010 ) - .WriteUInt16( ESCHER_Prop_lineColor ) .WriteUInt32( (sal_uInt32)0x8000001 ) - .WriteUInt16( ESCHER_Prop_fNoLineDrawDash ) .WriteUInt32( (sal_uInt32)0x00080008 ) - .WriteUInt16( ESCHER_Prop_shadowColor ) .WriteUInt32( (sal_uInt32)0x8000002 ); + rSt.WriteUInt32( ( ( ESCHER_OPT << 16 ) | ( ESCHER_OPT_COUNT << 4 ) | 0x3 ) ) + .WriteUInt32( ( nSize - 8 ) ) + .WriteUInt16( ESCHER_Prop_fillColor ) .WriteUInt32( 0xffb800 ) + .WriteUInt16( ESCHER_Prop_fillBackColor ) .WriteUInt32( 0 ) + .WriteUInt16( ESCHER_Prop_fNoFillHitTest ) .WriteUInt32( 0x00100010 ) + .WriteUInt16( ESCHER_Prop_lineColor ) .WriteUInt32( 0x8000001 ) + .WriteUInt16( ESCHER_Prop_fNoLineDrawDash ) .WriteUInt32( 0x00080008 ) + .WriteUInt16( ESCHER_Prop_shadowColor ) .WriteUInt32( 0x8000002 ); } } @@ -109,12 +109,12 @@ void PptEscherEx::ImplWriteSplitMenuColorsAtom( SvStream& rSt ) sal_uInt32 nSize = ImplSplitMenuColorsAtomSize(); if ( nSize ) { - rSt.WriteUInt32( (sal_uInt32)( ( ESCHER_SplitMenuColors << 16 ) | ( ESCHER_SPLIT_MENU_COLORS_COUNT << 4 ) ) ) - .WriteUInt32( (sal_uInt32)( nSize - 8 ) ) - .WriteUInt32( (sal_uInt32)0x08000004 ) - .WriteUInt32( (sal_uInt32)0x08000001 ) - .WriteUInt32( (sal_uInt32)0x08000002 ) - .WriteUInt32( (sal_uInt32)0x100000f7 ); + rSt.WriteUInt32( ( ( ESCHER_SplitMenuColors << 16 ) | ( ESCHER_SPLIT_MENU_COLORS_COUNT << 4 ) ) ) + .WriteUInt32( ( nSize - 8 ) ) + .WriteUInt32( 0x08000004 ) + .WriteUInt32( 0x08000001 ) + .WriteUInt32( 0x08000002 ) + .WriteUInt32( 0x100000f7 ); } } @@ -125,7 +125,7 @@ PptEscherEx::~PptEscherEx() void PptEscherEx::OpenContainer( sal_uInt16 n_EscherContainer, int nRecInstance ) { - mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( n_EscherContainer ).WriteUInt32( (sal_uInt32)0 ); + mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( n_EscherContainer ).WriteUInt32( 0 ); mOffsets.push_back( mpOutStrm->Tell() - 4 ); mRecTypes.push_back( n_EscherContainer ); @@ -139,8 +139,8 @@ void PptEscherEx::OpenContainer( sal_uInt16 n_EscherContainer, int nRecInstance mnCurrentDg = mxGlobal->GenerateDrawingId(); AddAtom( 8, ESCHER_Dg, 0, mnCurrentDg ); PtReplaceOrInsert( ESCHER_Persist_Dg | mnCurrentDg, mpOutStrm->Tell() ); - mpOutStrm->WriteUInt32( (sal_uInt32)0 ) // The number of shapes in this drawing - .WriteUInt32( (sal_uInt32)0 ); // The last MSOSPID given to an SP in this DG + mpOutStrm->WriteUInt32( 0 ) // The number of shapes in this drawing + .WriteUInt32( 0 ); // The last MSOSPID given to an SP in this DG } } break; @@ -253,7 +253,7 @@ sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClie sal_uInt32 nSize = pClientData->Tell(); if ( nSize ) { - mpOutStrm->WriteUInt32( (sal_uInt32)( ( ESCHER_ClientData << 16 ) | 0xf ) ) + mpOutStrm->WriteUInt32( ( ( ESCHER_ClientData << 16 ) | 0xf ) ) .WriteUInt32( nSize ); mpOutStrm->Write( pClientData->GetData(), nSize ); } diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index f9ed8b433d48..995a7566b905 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -1798,7 +1798,7 @@ void AnimationExporter::exportAnimateTargetElement( SvStream& rStrm, const Any a if ( bCreate2b01Atom ) { EscherExAtom a2b01Atom( rStrm, 0x2b01 ); - rStrm.WriteUInt32( (sal_uInt32)1 ); // ? + rStrm.WriteUInt32( 1 ); // ? } } } diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx index 25b39a914eaa..74a81f3cff11 100644 --- a/sd/source/filter/eppt/pptexsoundcollection.cxx +++ b/sd/source/filter/eppt/pptexsoundcollection.cxx @@ -97,14 +97,14 @@ void ExSoundEntry::Write( SvStream& rSt, sal_uInt32 nId ) const comphelper::getProcessComponentContext() ); // create SoundContainer - rSt.WriteUInt32( (sal_uInt32)( ( EPP_Sound << 16 ) | 0xf ) ).WriteUInt32( (sal_uInt32)( GetSize( nId ) - 8 ) ); + rSt.WriteUInt32( ( ( EPP_Sound << 16 ) | 0xf ) ).WriteUInt32( ( GetSize( nId ) - 8 ) ); OUString aSoundName( ImplGetName() ); sal_Int32 i, nSoundNameLen = aSoundName.getLength(); if ( nSoundNameLen ) { // name of sound ( instance 0 ) - rSt.WriteUInt32( (sal_uInt32)( EPP_CString << 16 ) ).WriteUInt32( (sal_uInt32)( nSoundNameLen * 2 ) ); + rSt.WriteUInt32( ( EPP_CString << 16 ) ).WriteUInt32( ( nSoundNameLen * 2 ) ); for ( i = 0; i < nSoundNameLen; ++i ) rSt.WriteUInt16( aSoundName[i] ); } @@ -113,18 +113,18 @@ void ExSoundEntry::Write( SvStream& rSt, sal_uInt32 nId ) const if ( nExtensionLen ) { // extension of sound ( instance 1 ) - rSt.WriteUInt32( (sal_uInt32)( ( EPP_CString << 16 ) | 16 ) ).WriteUInt32( (sal_uInt32)( nExtensionLen * 2 ) ); + rSt.WriteUInt32( ( ( EPP_CString << 16 ) | 16 ) ).WriteUInt32( ( nExtensionLen * 2 ) ); for ( i = 0; i < nExtensionLen; ++i ) rSt.WriteUInt16( aExtension[i] ); } // id of sound ( instance 2 ) OUString aId( OUString::number(nId ) ); sal_Int32 nIdLen = aId.getLength(); - rSt.WriteUInt32( (sal_uInt32)( ( EPP_CString << 16 ) | 32 ) ).WriteUInt32( (sal_uInt32)( nIdLen * 2 ) ); + rSt.WriteUInt32( ( ( EPP_CString << 16 ) | 32 ) ).WriteUInt32( ( nIdLen * 2 ) ); for ( i = 0; i < nIdLen; ++i ) rSt.WriteUInt16( aId[i] ); - rSt.WriteUInt32( (sal_uInt32)( EPP_SoundData << 16 ) ).WriteUInt32( (sal_uInt32)( nFileSize ) ); + rSt.WriteUInt32( ( EPP_SoundData << 16 ) ).WriteUInt32( ( nFileSize ) ); sal_uInt32 nBytesLeft = nFileSize; SvStream* pSourceFile = ::utl::UcbStreamHelper::CreateStream( aSoundURL, STREAM_READ ); if ( pSourceFile ) @@ -198,10 +198,10 @@ void ExSoundCollection::Write( SvStream& rSt ) const sal_uInt32 nSoundCount = maEntries.size(); // create SoundCollection Container - rSt.WriteUInt16( 0xf ).WriteUInt16( EPP_SoundCollection ).WriteUInt32( (sal_uInt32)( GetSize() - 8 ) ); + rSt.WriteUInt16( 0xf ).WriteUInt16( EPP_SoundCollection ).WriteUInt32( ( GetSize() - 8 ) ); // create SoundCollAtom ( reference to the next free SoundId ); - rSt.WriteUInt32( (sal_uInt32)( EPP_SoundCollAtom << 16 ) ).WriteUInt32( (sal_uInt32)4 ).WriteUInt32( nSoundCount ); + rSt.WriteUInt32( ( EPP_SoundCollAtom << 16 ) ).WriteUInt32( 4 ).WriteUInt32( nSoundCount ); boost::ptr_vector<ExSoundEntry>::const_iterator iter; for ( iter = maEntries.begin(); iter != maEntries.end(); ++iter, ++i) diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx index 9152d9e99a0c..1961326007b4 100644 --- a/sd/source/filter/eppt/pptx-stylesheet.cxx +++ b/sd/source/filter/eppt/pptx-stylesheet.cxx @@ -324,18 +324,18 @@ void PPTExParaSheet::Write( SvStream& rSt, PptEscherEx*, sal_uInt16 nLev, bool, SvStream& rOut = rBuProv.aBuExMasterStream; if ( !nLev ) { - rOut.WriteUInt32( (sal_uInt32)( ( EPP_PST_ExtendedParagraphMasterAtom << 16 ) | ( mnInstance << 4 ) ) ) - .WriteUInt32( (sal_uInt32)( 5 * 16 + 2 ) ) + rOut.WriteUInt32( ( ( EPP_PST_ExtendedParagraphMasterAtom << 16 ) | ( mnInstance << 4 ) ) ) + .WriteUInt32( ( 5 * 16 + 2 ) ) .WriteUInt16( 5 ); // depth } sal_uInt16 nBulletId = rLev.mnBulletId; if ( rLev.mnNumberingType != SVX_NUM_BITMAP ) nBulletId = 0xffff; - rOut.WriteUInt32( (sal_uInt32)0x03800000 ) + rOut.WriteUInt32( 0x03800000 ) .WriteUInt16( nBulletId ) - .WriteUInt32( (sal_uInt32)rLev.mnMappedNumType ) + .WriteUInt32( rLev.mnMappedNumType ) .WriteUInt16( rLev.mnBulletStart ) - .WriteUInt32( (sal_uInt32)0 ); + .WriteUInt32( 0 ); } sal_uInt32 nParaFlags = 0x3ffdff; @@ -483,7 +483,7 @@ void PPTExStyleSheet::WriteTxCFStyleAtom( SvStream& rSt ) sal_uInt32 nCharFlags = rCharStyle.mnFlags; nCharFlags &= CharAttr_Italic | CharAttr_Bold | CharAttr_Underline | CharAttr_Shadow; - rSt.WriteUInt32( (sal_uInt32)( EPP_TxCFStyleAtom << 16 ) ) // recordheader + rSt.WriteUInt32( ( EPP_TxCFStyleAtom << 16 ) ) // recordheader .WriteUInt32( SizeOfTxCFStyleAtom() - 8 ) .WriteUInt16( ( 0x80 | nCharFlags ) ) .WriteUInt16( nFlags ) diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index c6a5e8b2c318..0cb8bd76b080 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -3183,7 +3183,7 @@ OUString UCBStorage::CreateLinkFile( const OUString& rName ) SvStream* pStream = pTempFile->GetStream( STREAM_STD_READWRITE | STREAM_TRUNC ); // write header - pStream->WriteUInt32( ( sal_uInt32 ) 0x04034b50 ); + pStream->WriteUInt32( 0x04034b50 ); // assemble a new folder name in the destination folder INetURLObject aObj( rName ); diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index e3adb6f172c1..7055f2ba6dc5 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -1416,7 +1416,7 @@ bool SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem, if ( bDirect || !pPool->StoreSurrogate( rStream, &rItem ) ) { rStream.WriteUInt16( nItemVersion ); - rStream.WriteUInt32( (sal_uInt32) 0L ); // Room for length in bytes + rStream.WriteUInt32( 0L ); // Room for length in bytes sal_uLong nIStart = rStream.Tell(); rItem.Store(rStream, nItemVersion); sal_uLong nIEnd = rStream.Tell(); diff --git a/svtools/source/misc/imap3.cxx b/svtools/source/misc/imap3.cxx index 8cb3e8d2d556..90114cd4be05 100644 --- a/svtools/source/misc/imap3.cxx +++ b/svtools/source/misc/imap3.cxx @@ -70,7 +70,7 @@ IMapCompat::~IMapCompat() const sal_uLong nEndPos = pRWStm->Tell(); pRWStm->Seek( nCompatPos ); - pRWStm->WriteUInt32( (sal_uInt32) ( nEndPos - nTotalSize ) ); + pRWStm->WriteUInt32( ( nEndPos - nTotalSize ) ); pRWStm->Seek( nEndPos ); } else diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index dea0c106b485..72891609f1a9 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1361,7 +1361,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const const long nReservePos = rOStm.Tell(); boost::scoped_ptr<VersionCompat> pCompat(new VersionCompat( rOStm, STREAM_WRITE, 2 )); - rOStm.WriteUInt32( (sal_uInt32) GetId() ).WriteUChar( IsThemeNameFromResource() ); // From version 2 and up + rOStm.WriteUInt32( GetId() ).WriteUChar( IsThemeNameFromResource() ); // From version 2 and up pCompat.reset(); diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx index ba289978e3d2..d75ad8edb42e 100644 --- a/svx/source/items/hlnkitem.cxx +++ b/svx/source/items/hlnkitem.cxx @@ -42,10 +42,10 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ // UNICODE: rStrm << sTarget; rStrm.WriteUniOrByteString(sTarget, rStrm.GetStreamCharSet()); - rStrm.WriteUInt32( (sal_uInt32) eType ); + rStrm.WriteUInt32( eType ); // marker for versioninfo - rStrm.WriteUInt32( (sal_uInt32) HYPERLINKFF_MARKER ); + rStrm.WriteUInt32( HYPERLINKFF_MARKER ); // new data // UNICODE: rStrm << sIntName; diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index edba2e57b731..f37e4a4cd6e7 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -702,10 +702,10 @@ SvStream& XLineDashItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const { rOut.WriteInt32( aDash.GetDashStyle() ); rOut.WriteUInt16( aDash.GetDots() ); - rOut.WriteUInt32( (sal_uInt32) aDash.GetDotLen() ); + rOut.WriteUInt32( aDash.GetDotLen() ); rOut.WriteUInt16( aDash.GetDashes() ); - rOut.WriteUInt32( (sal_uInt32) aDash.GetDashLen() ); - rOut.WriteUInt32( (sal_uInt32) aDash.GetDistance() ); + rOut.WriteUInt32( aDash.GetDashLen() ); + rOut.WriteUInt32( aDash.GetDistance() ); } return rOut; diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 84d56ba21559..0a3ff4c2af78 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -1079,7 +1079,7 @@ bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType ) if( bWriteMode ) { aRecords.push_back( RecTypeSize(cType, nPos) ); - pStream->WriteUInt32( (sal_uInt32) 0 ); + pStream->WriteUInt32( 0 ); } else { diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 0121587b9c20..a9b5013ca474 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1505,7 +1505,7 @@ SwBasicEscherEx::~SwBasicEscherEx() void SwBasicEscherEx::WriteFrmExtraData(const SwFrmFmt&) { AddAtom(4, ESCHER_ClientAnchor); - GetStream().WriteUInt32( (sal_uInt32)0x80000000 ); + GetStream().WriteUInt32( 0x80000000 ); } void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId) @@ -1588,7 +1588,7 @@ sal_Int32 SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf) aPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0 ); aPropOpt.Commit( GetStream() ); AddAtom(4, ESCHER_ClientAnchor); - GetStream().WriteUInt32( (sal_uInt32)0x80000000 ); + GetStream().WriteUInt32( 0x80000000 ); CloseContainer(); return 0; @@ -2206,11 +2206,11 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt) sal_uInt16 nColorCount = 4; pStrm ->WriteUInt16( ( nColorCount << 4 ) ) // instance .WriteUInt16( ESCHER_SplitMenuColors ) // record type - .WriteUInt32( (sal_uInt32)( nColorCount * 4 ) ) // size - .WriteUInt32( (sal_uInt32)0x08000004 ) - .WriteUInt32( (sal_uInt32)0x08000001 ) - .WriteUInt32( (sal_uInt32)0x08000002 ) - .WriteUInt32( (sal_uInt32)0x100000f7 ); + .WriteUInt32( ( nColorCount * 4 ) ) // size + .WriteUInt32( 0x08000004 ) + .WriteUInt32( 0x08000001 ) + .WriteUInt32( 0x08000002 ) + .WriteUInt32( 0x100000f7 ); CloseContainer(); // ESCHER_DggContainer diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index ef495739fd33..a8d89f0ac326 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3854,7 +3854,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) if (type==2) { pDataStrm->WriteUInt16( 0xFFFF ); const int items=aListItems.size(); - pDataStrm->WriteUInt32( (sal_uInt32)items ); + pDataStrm->WriteUInt32( items ); for(int i=0;i<items;i++) { OUString item=aListItems[i]; SwWW8Writer::WriteString_xstz( *pDataStrm, item, false ); diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 923593a37ffe..369be8b4b5d2 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -167,7 +167,7 @@ void EMFWriter::ImplEndCommentRecord() { sal_Int32 nActPos = m_rStm.Tell(); m_rStm.Seek( mnRecordPos + 8 ); - m_rStm.WriteUInt32( (sal_uInt32)( nActPos - mnRecordPos - 0xc ) ); + m_rStm.WriteUInt32( ( nActPos - mnRecordPos - 0xc ) ); m_rStm.Seek( nActPos ); } ImplEndRecord(); @@ -196,8 +196,8 @@ void EMFWriter::ImplEndPlusRecord() sal_Int32 nActPos = m_rStm.Tell(); sal_Int32 nSize = nActPos - mnRecordPlusPos; m_rStm.Seek( mnRecordPlusPos + 4 ); - m_rStm.WriteUInt32( (sal_uInt32)( nSize ) ) // Size - .WriteUInt32( (sal_uInt32) ( nSize - 0xc ) ); // Data Size + m_rStm.WriteUInt32( ( nSize ) ) // Size + .WriteUInt32( ( nSize - 0xc ) ); // Data Size m_rStm.Seek( nActPos ); mbRecordPlusOpen = false; } @@ -276,7 +276,7 @@ void EMFWriter::ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_ { ImplBeginPlusRecord( EmfPlusFillPolygon, 0xC000 ); // Sets the color as well ImplWritePlusColor( maVDev.GetFillColor(), nTrans ); - m_rStm.WriteUInt32( (sal_uInt32) rPoly.GetSize() ); + m_rStm.WriteUInt32( rPoly.GetSize() ); for( sal_uInt16 i = 0; i < rPoly.GetSize(); i++ ) ImplWritePlusPoint( rPoly[ i ] ); ImplEndPlusRecord(); @@ -336,7 +336,7 @@ bool EMFWriter::WriteEMF(const GDIMetaFile& rMtf) ImplWriteRasterOp( ROP_OVERPAINT ); ImplBeginRecord( WIN_EMR_SETBKMODE ); - m_rStm.WriteUInt32( (sal_uInt32) 1 ); // TRANSPARENT + m_rStm.WriteUInt32( 1 ); // TRANSPARENT ImplEndRecord(); // write emf data @@ -345,22 +345,22 @@ bool EMFWriter::WriteEMF(const GDIMetaFile& rMtf) ImplWritePlusEOF(); ImplBeginRecord( WIN_EMR_EOF ); - m_rStm.WriteUInt32( (sal_uInt32)0 ) // nPalEntries - .WriteUInt32( (sal_uInt32)0x10 ) // offPalEntries - .WriteUInt32( (sal_uInt32)0x14 ); // nSizeLast + m_rStm.WriteUInt32( 0 ) // nPalEntries + .WriteUInt32( 0x10 ) // offPalEntries + .WriteUInt32( 0x14 ); // nSizeLast ImplEndRecord(); // write header const sal_uLong nEndPos = m_rStm.Tell(); m_rStm.Seek( nHeaderPos ); - m_rStm.WriteUInt32( (sal_uInt32) 0x00000001 ).WriteUInt32( (sal_uInt32) 108 ) //use [MS-EMF 2.2.11] HeaderExtension2 Object + m_rStm.WriteUInt32( 0x00000001 ).WriteUInt32( 108 ) //use [MS-EMF 2.2.11] HeaderExtension2 Object .WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( ( aMtfSizePix.Width() - 1 ) ).WriteInt32( ( aMtfSizePix.Height() - 1 ) ) .WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( ( aMtfSizeLog.Width() - 1 ) ).WriteInt32( ( aMtfSizeLog.Height() - 1 ) ) - .WriteUInt32( (sal_uInt32) 0x464d4520 ).WriteUInt32( (sal_uInt32) 0x10000 ).WriteUInt32( (sal_uInt32) ( nEndPos - nHeaderPos ) ) - .WriteUInt32( (sal_uInt32) mnRecordCount ).WriteUInt16( ( mnHandleCount + 1 ) ).WriteUInt16( 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ) + .WriteUInt32( 0x464d4520 ).WriteUInt32( 0x10000 ).WriteUInt32( ( nEndPos - nHeaderPos ) ) + .WriteUInt32( mnRecordCount ).WriteUInt16( ( mnHandleCount + 1 ) ).WriteUInt16( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ) .WriteInt32( aMtfSizePix.Width() ).WriteInt32( aMtfSizePix.Height() ) .WriteInt32( ( aMtfSizeLog.Width() / 100 ) ).WriteInt32( ( aMtfSizeLog.Height() / 100 ) ) - .WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ) + .WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ) .WriteInt32( ( aMtfSizeLog.Width() * 10 ) ).WriteInt32( ( aMtfSizeLog.Height() * 10 ) ); //use [MS-EMF 2.2.11] HeaderExtension2 Object m_rStm.Seek( nEndPos ); @@ -420,7 +420,7 @@ void EMFWriter::ImplEndRecord() nFillBytes += 3; // each record has to be dword aligned nFillBytes ^= 3; nFillBytes &= 3; - m_rStm.WriteUInt32( (sal_uInt32)( ( nActPos - mnRecordPos ) + nFillBytes ) ); + m_rStm.WriteUInt32( ( ( nActPos - mnRecordPos ) + nFillBytes ) ); m_rStm.Seek( nActPos ); while( nFillBytes-- ) m_rStm.WriteUChar( 0 ); @@ -567,13 +567,13 @@ void EMFWriter::ImplCheckTextAttr() m_rStm.WriteUInt16( 0 ); // dummy elfVersion, elfStyleSize, elfMatch, elfReserved - m_rStm.WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ) ; + m_rStm.WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ) ; // dummy elfVendorId - m_rStm.WriteUInt32( (sal_uInt32) 0 ); + m_rStm.WriteUInt32( 0 ); // dummy elfCulture - m_rStm.WriteUInt32( (sal_uInt32) 0 ); + m_rStm.WriteUInt32( 0 ); // dummy elfPanose m_rStm.WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ); @@ -678,7 +678,7 @@ void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, bool bClose ) ImplBeginRecord( bClose ? WIN_EMR_POLYGON : WIN_EMR_POLYLINE ); ImplWriteRect( rPoly.GetBoundRect() ); - m_rStm.WriteUInt32( (sal_uInt32) rPoly.GetSize() ); + m_rStm.WriteUInt32( rPoly.GetSize() ); for( sal_uInt16 i = 0; i < rPoly.GetSize(); i++ ) ImplWritePoint( rPoly[ i ] ); @@ -718,10 +718,10 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) ImplBeginRecord( WIN_EMR_POLYPOLYGON ); ImplWriteRect( rPolyPoly.GetBoundRect() ); - m_rStm.WriteUInt32( (sal_uInt32)nPolyCount ).WriteUInt32( nTotalPoints ); + m_rStm.WriteUInt32( nPolyCount ).WriteUInt32( nTotalPoints ); for( i = 0; i < nPolyCount; i++ ) - m_rStm.WriteUInt32( (sal_uInt32)rPolyPoly[ i ].GetSize() ); + m_rStm.WriteUInt32( rPolyPoly[ i ].GetSize() ); for( i = 0; i < nPolyCount; i++ ) { @@ -775,7 +775,7 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, bool bClosed ) for ( o = 0; o < nBezPoints; o++ ) aNewPoly[ o + 1 ] = rPoly[ n + o ]; ImplWriteRect( aNewPoly.GetBoundRect() ); - m_rStm.WriteUInt32( (sal_uInt32)nBezPoints ); + m_rStm.WriteUInt32( nBezPoints ); for( o = 1; o < aNewPoly.GetSize(); o++ ) ImplWritePoint( aNewPoly[ o ] ); ImplEndRecord(); @@ -795,7 +795,7 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, bool bClosed ) for ( o = 1; o <= nPoints; o++ ) aNewPoly[ o ] = rPoly[ n - 1 + o ]; ImplWriteRect( aNewPoly.GetBoundRect() ); - m_rStm.WriteUInt32( (sal_uInt32)( nPoints ) ); + m_rStm.WriteUInt32( ( nPoints ) ); for( o = 1; o < aNewPoly.GetSize(); o++ ) ImplWritePoint( aNewPoly[ o ] ); ImplEndRecord(); @@ -839,7 +839,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const sal_uLong nOffPos = m_rStm.Tell(); m_rStm.SeekRel( 16 ); - m_rStm.WriteUInt32( (sal_uInt32) 0 ).WriteInt32( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP ); + m_rStm.WriteUInt32( 0 ).WriteInt32( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP ); ImplWriteSize( rSz ); WriteDIB(rBmp, aMemStm, true, false); @@ -862,8 +862,8 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const sal_uLong nEndPos = m_rStm.Tell(); m_rStm.Seek( nOffPos ); - m_rStm.WriteUInt32( (sal_uInt32) 80 ).WriteUInt32( (sal_uInt32)( nHeaderSize + ( nPalCount << 2 ) ) ); - m_rStm.WriteUInt32( (sal_uInt32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) ).WriteUInt32( nImageSize ); + m_rStm.WriteUInt32( 80 ).WriteUInt32( ( nHeaderSize + ( nPalCount << 2 ) ) ); + m_rStm.WriteUInt32( ( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) ).WriteUInt32( nImageSize ); m_rStm.Seek( nEndPos ); ImplEndRecord(); @@ -910,12 +910,12 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, c ImplBeginRecord( WIN_EMR_EXTTEXTOUTW ); ImplWriteRect( Rectangle( rPos, Size( nNormWidth, maVDev.GetTextHeight() ) ) ); - m_rStm.WriteUInt32( (sal_uInt32)1 ); + m_rStm.WriteUInt32( 1 ); m_rStm.WriteInt32( 0 ).WriteInt32( 0 ); ImplWritePoint( rPos ); - m_rStm.WriteUInt32( (sal_uInt32) nLen ).WriteUInt32( (sal_uInt32) 76 ).WriteUInt32( (sal_uInt32) 2 ); + m_rStm.WriteUInt32( nLen ).WriteUInt32( 76 ).WriteUInt32( 2 ); m_rStm.WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( 0 ); - m_rStm.WriteUInt32( (sal_uInt32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) ) ); + m_rStm.WriteUInt32( ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) ) ); // write text for( i = 0; i < nLen; i++ ) diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index aced348b7bea..010a35efb54e 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -1193,10 +1193,10 @@ bool EnhWMFReader::ReadEnhWMF() aTmp.ObjectOwnsMemory( true ); aTmp.WriteUChar( 'B' ) .WriteUChar( 'M' ) - .WriteUInt32( (sal_uInt32)cbBitsSrc ) + .WriteUInt32( cbBitsSrc ) .WriteUInt16( 0 ) .WriteUInt16( 0 ) - .WriteUInt32( (sal_uInt32)cbBmiSrc + 14 ); + .WriteUInt32( cbBmiSrc + 14 ); pWMF->Seek( nStart + offBmiSrc ); pWMF->Read( pBuf + 14, cbBmiSrc ); pWMF->Seek( nStart + offBitsSrc ); @@ -1257,10 +1257,10 @@ bool EnhWMFReader::ReadEnhWMF() aTmp.ObjectOwnsMemory( true ); aTmp.WriteUChar( 'B' ) .WriteUChar( 'M' ) - .WriteUInt32( (sal_uInt32)cbBitsSrc ) + .WriteUInt32( cbBitsSrc ) .WriteUInt16( 0 ) .WriteUInt16( 0 ) - .WriteUInt32( (sal_uInt32)cbBmiSrc + 14 ); + .WriteUInt32( cbBmiSrc + 14 ); pWMF->Seek( nStart + offBmiSrc ); pWMF->Read( pBuf + 14, cbBmiSrc ); pWMF->Seek( nStart + offBitsSrc ); @@ -1327,10 +1327,10 @@ bool EnhWMFReader::ReadEnhWMF() aTmp.ObjectOwnsMemory( true ); aTmp.WriteUChar( 'B' ) .WriteUChar( 'M' ) - .WriteUInt32( (sal_uInt32)cbBitsSrc ) + .WriteUInt32( cbBitsSrc ) .WriteUInt16( 0 ) .WriteUInt16( 0 ) - .WriteUInt32( (sal_uInt32)cbBmiSrc + 14 ); + .WriteUInt32( cbBmiSrc + 14 ); pWMF->Seek( nStart + offBmiSrc ); pWMF->Read( pBuf + 14, cbBmiSrc ); pWMF->Seek( nStart + offBitsSrc ); @@ -1567,10 +1567,10 @@ bool EnhWMFReader::ReadEnhWMF() aTmp.ObjectOwnsMemory( true ); aTmp.WriteUChar( 'B' ) .WriteUChar( 'M' ) - .WriteUInt32( (sal_uInt32)cbBits ) + .WriteUInt32( cbBits ) .WriteUInt16( 0 ) .WriteUInt16( 0 ) - .WriteUInt32( (sal_uInt32)cbBmi + 14 ); + .WriteUInt32( cbBmi + 14 ); pWMF->Seek( nStart + offBmi ); pWMF->Read( pBuf + 14, cbBmi ); pWMF->Seek( nStart + offBits ); diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index fb0d4b9950a4..8538d932a63d 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -427,9 +427,9 @@ void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_In pWMF->WriteUInt16( W_MFCOMMENT ) .WriteUInt16( ( nLen + 14 ) ) // we will always have a fourteen byte escape header: .WriteUInt16( 0x4f4f ) // OO - .WriteUInt32( (sal_uInt32)0xa2c2a ) // evil magic number - .WriteUInt32( (sal_uInt32)nCheckSum ) // crc32 checksum about nEsc & pData - .WriteUInt32( (sal_uInt32)nEsc ); // escape number + .WriteUInt32( 0xa2c2a ) // evil magic number + .WriteUInt32( nCheckSum ) // crc32 checksum about nEsc & pData + .WriteUInt32( nEsc ); // escape number pWMF->Write( pData, nLen ); if ( nLen & 1 ) pWMF->WriteUChar( 0 ); // pad byte @@ -1664,9 +1664,9 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, bool bPlaceable ) pWMF->WriteUInt16( 0x0001 ) // type: file .WriteUInt16( 0x0009 ) // header length in words .WriteUInt16( 0x0300 ) // Version as BCD number - .WriteUInt32( (sal_uInt32) 0x00000000 ) // file length (without 1st header), is later corrected by UpdateHeader() + .WriteUInt32( 0x00000000 ) // file length (without 1st header), is later corrected by UpdateHeader() .WriteUInt16( MAXOBJECTHANDLES ) // maxmimum number of simultaneous objects - .WriteUInt32( (sal_uInt32) 0x00000000 ) // maximum record length, is later corrected by UpdateHeader() + .WriteUInt32( 0x00000000 ) // maximum record length, is later corrected by UpdateHeader() .WriteUInt16( 0x0000 ); // reserved } @@ -1893,11 +1893,11 @@ void WMFWriter::WriteEMFRecord( SvMemoryStream& rStream, sal_uInt32 nCurSize, sa WriteRecordHeader( 0, W_META_ESCAPE ); pWMF->WriteUInt16( W_MFCOMMENT ) // same as META_ESCAPE_ENHANCED_METAFILE .WriteUInt16( ( nCurSize + 34 ) ) // we will always have a 34 byte escape header: - .WriteUInt32( (sal_uInt32) 0x43464D57 ) // WMFC - .WriteUInt32( (sal_uInt32) 0x00000001 ) // Comment type - .WriteUInt32( (sal_uInt32) 0x00010000 ) // version + .WriteUInt32( 0x43464D57 ) // WMFC + .WriteUInt32( 0x00000001 ) // Comment type + .WriteUInt32( 0x00010000 ) // version .WriteUInt16( nCheckSum ) // check sum - .WriteUInt32( (sal_uInt32) 0 ) // flags = 0 + .WriteUInt32( 0 ) // flags = 0 .WriteUInt32( nRecCounts ) // total number of records .WriteUInt32( nCurSize ) // size of this record's data .WriteUInt32( nRemainingSize ) // remaining size of data in following records, missing in MSDN documentation diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx index 86f66d73c837..308f1fecd48d 100644 --- a/vcl/source/gdi/animate.cxx +++ b/vcl/source/gdi/animate.cxx @@ -708,7 +708,7 @@ SvStream& WriteAnimation( SvStream& rOStm, const Animation& rAnimation ) WriteDIBBitmapEx(rAnimation.GetBitmapEx(), rOStm); // Write identifier ( SDANIMA1 ) - rOStm.WriteUInt32( (sal_uInt32) 0x5344414e ).WriteUInt32( (sal_uInt32) 0x494d4931 ); + rOStm.WriteUInt32( 0x5344414e ).WriteUInt32( 0x494d4931 ); for( sal_uInt16 i = 0; i < nCount; i++ ) { @@ -723,7 +723,7 @@ SvStream& WriteAnimation( SvStream& rOStm, const Animation& rAnimation ) rOStm.WriteUInt16( ( ( ANIMATION_TIMEOUT_ON_CLICK == rAnimBmp.nWait ) ? 65535 : rAnimBmp.nWait ) ); rOStm.WriteUInt16( rAnimBmp.eDisposal ); rOStm.WriteUChar( rAnimBmp.bUserInput ); - rOStm.WriteUInt32( (sal_uInt32) rAnimation.mnLoopCount ); + rOStm.WriteUInt32( rAnimation.mnLoopCount ); rOStm.WriteUInt32( nDummy32 ); // Unused rOStm.WriteUInt32( nDummy32 ); // Unused rOStm.WriteUInt32( nDummy32 ); // Unused diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 92a91b65c53e..a37d5c21e3a0 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -1364,7 +1364,7 @@ bool ImplWriteDIBFileHeader(SvStream& rOStm, BitmapReadAccess& rAcc, bool bUseDI const sal_uInt32 nOffset(14 + (bUseDIBV5 ? DIBV5HEADERSIZE : DIBINFOHEADERSIZE) + nPalCount * 4UL); rOStm.WriteUInt16( 0x4D42 ); // 'MB' from BITMAPFILEHEADER - rOStm.WriteUInt32( (sal_uInt32)(nOffset + (rAcc.Height() * rAcc.GetScanlineSize())) ); + rOStm.WriteUInt32( (nOffset + (rAcc.Height() * rAcc.GetScanlineSize())) ); rOStm.WriteUInt16( 0 ); rOStm.WriteUInt16( 0 ); rOStm.WriteUInt32( nOffset ); @@ -1590,8 +1590,8 @@ bool WriteDIBBitmapEx( { if(ImplWriteDIB(rSource.GetBitmap(), 0, rOStm, true, true)) { - rOStm.WriteUInt32( (sal_uInt32)0x25091962 ); - rOStm.WriteUInt32( (sal_uInt32)0xACB20201 ); + rOStm.WriteUInt32( 0x25091962 ); + rOStm.WriteUInt32( 0xACB20201 ); rOStm.WriteUChar( rSource.eTransparent ); if(TRANSPARENT_BITMAP == rSource.eTransparent) diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index c8b842d93b6a..6d3d8a08a62c 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2859,7 +2859,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm ) rOStm.WriteUInt32( nStmCompressMode ); WriteMapMode( rOStm, aPrefMapMode ); WritePair( rOStm, aPrefSize ); - rOStm.WriteUInt32( (sal_uInt32) GetActionSize() ); + rOStm.WriteUInt32( GetActionSize() ); delete pCompat; |