diff options
43 files changed, 400 insertions, 400 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 2ae87f32f3e8..0da36032570a 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1707,7 +1707,7 @@ bool SbModule::StoreData( SvStream& rStrm ) const pImage->aOUSource = aOUSource; pImage->aComment = aComment; pImage->aName = GetName(); - rStrm.WriteUChar( (sal_uInt8) 1 ); + rStrm.WriteUChar( 1 ); // # PCode is saved only for legacy formats only // It should be noted that it probably isn't necessary // It would be better not to store the image ( more flexible with @@ -1724,7 +1724,7 @@ bool SbModule::StoreData( SvStream& rStrm ) const aImg.aOUSource = aOUSource; aImg.aComment = aComment; aImg.aName = GetName(); - rStrm.WriteUChar( (sal_uInt8) 1 ); + rStrm.WriteUChar( 1 ); return aImg.Save( rStrm ); } } @@ -1843,7 +1843,7 @@ bool SbModule::StoreBinaryData( SvStream& rStrm, sal_uInt16 nVer ) pImage->aComment = aComment; pImage->aName = GetName(); - rStrm.WriteUChar( (sal_uInt8) 1 ); + rStrm.WriteUChar( 1 ); if ( nVer ) bRet = pImage->Save( rStrm, B_EXT_IMG_VERSION ); else @@ -2075,7 +2075,7 @@ bool SbMethod::StoreData( SvStream& rStrm ) const .WriteInt16( (sal_Int16) nLine1 ) .WriteInt16( (sal_Int16) nLine2 ) .WriteInt16( (sal_Int16) nStart ) - .WriteUChar( (sal_uInt8) bInvalid ); + .WriteUChar( bInvalid ); return true; } diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 3dad7683bbe4..36602241f006 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -1605,14 +1605,14 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) { if( PTR_CAST(SbxValue,aData.pObj) != this ) { - r.WriteUChar( (sal_uInt8) 1 ); + r.WriteUChar( 1 ); return aData.pObj->Store( r ); } else - r.WriteUChar( (sal_uInt8) 2 ); + r.WriteUChar( 2 ); } else - r.WriteUChar( (sal_uInt8) 0 ); + r.WriteUChar( 0 ); break; case SbxCHAR: { diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 1bd8dfddb4ba..75503ab2a763 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -581,7 +581,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer ) bool SbxVariable::StoreData( SvStream& rStrm ) const { - rStrm.WriteUChar( (sal_uInt8) 0xFF ); // Marker + rStrm.WriteUChar( 0xFF ); // Marker bool bValStore; if( this->IsA( TYPE(SbxMethod) ) ) { @@ -612,12 +612,12 @@ bool SbxVariable::StoreData( SvStream& rStrm ) const rStrm.WriteUInt32( (sal_uInt32)nUserData ); if( pInfo.Is() ) { - rStrm.WriteUChar( (sal_uInt8) 2 ); // Version 2: with UserData! + rStrm.WriteUChar( 2 ); // Version 2: with UserData! pInfo->StoreData( rStrm ); } else { - rStrm.WriteUChar( (sal_uInt8) 0 ); + rStrm.WriteUChar( 0 ); } // Save private data only, if it is a SbxVariable if( GetClass() == SbxCLASS_VARIABLE ) diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index bdea870857be..393a2f7c52c2 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1215,12 +1215,12 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) memset(aBuffer,0,sizeof(aBuffer)); m_pFileStream->Seek(0L); - (*m_pFileStream).WriteUChar( (sal_uInt8) nDbaseType ); // dBase format - (*m_pFileStream).WriteUChar( (sal_uInt8) (aDate.GetYear() % 100) ); // current date + (*m_pFileStream).WriteUChar( nDbaseType ); // dBase format + (*m_pFileStream).WriteUChar( (aDate.GetYear() % 100) ); // current date - (*m_pFileStream).WriteUChar( (sal_uInt8) aDate.GetMonth() ); - (*m_pFileStream).WriteUChar( (sal_uInt8) aDate.GetDay() ); + (*m_pFileStream).WriteUChar( aDate.GetMonth() ); + (*m_pFileStream).WriteUChar( aDate.GetDay() ); (*m_pFileStream).WriteUInt32( (sal_uInt32)0 ); // number of data records (*m_pFileStream).WriteUInt16( (sal_uInt16)((m_pColumns->getCount()+1) * 32 + 1) ); // header information, // pColumns contains always an additional column @@ -1320,9 +1320,9 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) { throwInvalidColumnType(STR_INVALID_COLUMN_PRECISION, aName); } - (*m_pFileStream).WriteUChar( (sal_uInt8) std::min((unsigned)nPrecision, 255U) ); // field length + (*m_pFileStream).WriteUChar( std::min((unsigned)nPrecision, 255U) ); // field length nRecLength = nRecLength + (sal_uInt16)::std::min((sal_uInt16)nPrecision, (sal_uInt16)255UL); - (*m_pFileStream).WriteUChar( (sal_uInt8)0 ); // decimals + (*m_pFileStream).WriteUChar( 0 ); // decimals break; case 'F': case 'N': @@ -1334,41 +1334,41 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) } if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency will be treated separately { - (*m_pFileStream).WriteUChar( (sal_uInt8)10 ); // standard length - (*m_pFileStream).WriteUChar( (sal_uInt8)4 ); + (*m_pFileStream).WriteUChar( 10 ); // standard length + (*m_pFileStream).WriteUChar( 4 ); nRecLength += 10; } else { sal_Int32 nPrec = SvDbaseConverter::ConvertPrecisionToDbase(nPrecision,nScale); - (*m_pFileStream).WriteUChar( (sal_uInt8)( nPrec) ); - (*m_pFileStream).WriteUChar( (sal_uInt8)nScale ); + (*m_pFileStream).WriteUChar( ( nPrec) ); + (*m_pFileStream).WriteUChar( nScale ); nRecLength += (sal_uInt16)nPrec; } break; case 'L': - (*m_pFileStream).WriteUChar( (sal_uInt8)1 ); - (*m_pFileStream).WriteUChar( (sal_uInt8)0 ); + (*m_pFileStream).WriteUChar( 1 ); + (*m_pFileStream).WriteUChar( 0 ); ++nRecLength; break; case 'I': - (*m_pFileStream).WriteUChar( (sal_uInt8)4 ); - (*m_pFileStream).WriteUChar( (sal_uInt8)0 ); + (*m_pFileStream).WriteUChar( 4 ); + (*m_pFileStream).WriteUChar( 0 ); nRecLength += 4; break; case 'Y': case 'B': case 'T': case 'D': - (*m_pFileStream).WriteUChar( (sal_uInt8)8 ); - (*m_pFileStream).WriteUChar( (sal_uInt8)0 ); + (*m_pFileStream).WriteUChar( 8 ); + (*m_pFileStream).WriteUChar( 0 ); nRecLength += 8; break; case 'M': bCreateMemo = true; - (*m_pFileStream).WriteUChar( (sal_uInt8)10 ); - (*m_pFileStream).WriteUChar( (sal_uInt8)0 ); + (*m_pFileStream).WriteUChar( 10 ); + (*m_pFileStream).WriteUChar( 0 ); nRecLength += 10; if ( bBinary ) aBuffer[0] = 0x06; @@ -1380,7 +1380,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) aBuffer[0] = 0x00; } - (*m_pFileStream).WriteUChar( (sal_uInt8)FIELD_DESCRIPTOR_TERMINATOR ); // end of header + (*m_pFileStream).WriteUChar( FIELD_DESCRIPTOR_TERMINATOR ); // end of header (*m_pFileStream).WriteChar( (char)DBF_EOL ); m_pFileStream->Seek(10L); (*m_pFileStream).WriteUInt16( nRecLength ); // set record length afterwards @@ -1389,9 +1389,9 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) { m_pFileStream->Seek(0L); if (nDbaseType == VisualFoxPro) - (*m_pFileStream).WriteUChar( (sal_uInt8) FoxProMemo ); + (*m_pFileStream).WriteUChar( FoxProMemo ); else - (*m_pFileStream).WriteUChar( (sal_uInt8) dBaseIIIMemo ); + (*m_pFileStream).WriteUChar( dBaseIIIMemo ); } // if (bCreateMemo) } catch ( const Exception& e ) @@ -1632,7 +1632,7 @@ bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) } m_pFileStream->Seek(nFilePos); - (*m_pFileStream).WriteUChar( (sal_uInt8)'*' ); // mark the row in the table as deleted + (*m_pFileStream).WriteUChar( '*' ); // mark the row in the table as deleted m_pFileStream->Flush(); return true; } @@ -2099,27 +2099,27 @@ bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr) case MemodBaseIV: // dBase IV-Memofeld with length { if ( MemodBaseIV == m_aMemoHeader.db_typ ) - (*m_pMemoStream).WriteUChar( (sal_uInt8)0xFF ) - .WriteUChar( (sal_uInt8)0xFF ) - .WriteUChar( (sal_uInt8)0x08 ); + (*m_pMemoStream).WriteUChar( 0xFF ) + .WriteUChar( 0xFF ) + .WriteUChar( 0x08 ); else - (*m_pMemoStream).WriteUChar( (sal_uInt8)0x00 ) - .WriteUChar( (sal_uInt8)0x00 ) - .WriteUChar( (sal_uInt8)0x00 ); + (*m_pMemoStream).WriteUChar( 0x00 ) + .WriteUChar( 0x00 ) + .WriteUChar( 0x00 ); sal_uInt32 nWriteSize = nSize; if (m_aMemoHeader.db_typ == MemoFoxPro) { if ( bBinary ) - (*m_pMemoStream).WriteUChar( (sal_uInt8) 0x00 ); // Picture + (*m_pMemoStream).WriteUChar( 0x00 ); // Picture else - (*m_pMemoStream).WriteUChar( (sal_uInt8) 0x01 ); // Memo + (*m_pMemoStream).WriteUChar( 0x01 ); // Memo for (int i = 4; i > 0; nWriteSize >>= 8) nHeader[--i] = (sal_uInt8) (nWriteSize % 256); } else { - (*m_pMemoStream).WriteUChar( (sal_uInt8) 0x00 ); + (*m_pMemoStream).WriteUChar( 0x00 ); nWriteSize += 8; for (int i = 0; i < 4; nWriteSize >>= 8) nHeader[i++] = (sal_uInt8) (nWriteSize % 256); diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 65c18bb2a066..35bbc303641c 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -532,7 +532,7 @@ bool ORTFImportExport::Write() } m_pStream->WriteChar( '}' ).WriteCharPtr( SAL_NEWLINE_STRING ); - m_pStream->WriteUChar( (sal_uInt8) 0 ); + m_pStream->WriteUChar( 0 ); return ((*m_pStream).GetError() == SVSTREAM_OK); } diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx index d9ea20fbb9a9..8dce77f48885 100644 --- a/editeng/source/items/optitems.cxx +++ b/editeng/source/items/optitems.cxx @@ -155,8 +155,8 @@ SfxPoolItem* SfxHyphenRegionItem::Create(SvStream& rStrm, sal_uInt16 ) const SvStream& SfxHyphenRegionItem::Store( SvStream& rStrm, sal_uInt16 ) const { - rStrm.WriteUChar( (sal_uInt8) GetMinLead() ) - .WriteUChar( (sal_uInt8) GetMinTrail() ); + rStrm.WriteUChar( GetMinLead() ) + .WriteUChar( GetMinTrail() ); return rStrm; } diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 9791c806e572..56d29e297b30 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -1164,8 +1164,8 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const SvxTabStop& rTab = (*this)[ i ]; rStrm.WriteInt32( rTab.GetTabPos() ) .WriteSChar( (sal_Int8) rTab.GetAdjustment() ) - .WriteUChar( (unsigned char) rTab.GetDecimal() ) - .WriteUChar( (unsigned char) rTab.GetFill() ); + .WriteUChar( rTab.GetDecimal() ) + .WriteUChar( rTab.GetFill() ); } if ( bStoreDefTabs ) @@ -1174,8 +1174,8 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) SvxTabStop aSwTabStop(nNew, SVX_TAB_ADJUST_DEFAULT); rStrm.WriteInt32( aSwTabStop.GetTabPos() ) .WriteSChar( (sal_Int8) aSwTabStop.GetAdjustment() ) - .WriteUChar( (unsigned char) aSwTabStop.GetDecimal() ) - .WriteUChar( (unsigned char) aSwTabStop.GetFill() ); + .WriteUChar( aSwTabStop.GetDecimal() ) + .WriteUChar( aSwTabStop.GetFill() ); nNew += nDefDist; } diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index c47215ede3c5..78954f0c3420 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -372,8 +372,8 @@ SvStream& SvxFontItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) co { bool bToBats = IsStarSymbol( GetFamilyName() ); - rStrm.WriteUChar( (sal_uInt8) GetFamily() ).WriteUChar( (sal_uInt8) GetPitch() ) - .WriteUChar( (sal_uInt8)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet())) ); + rStrm.WriteUChar( GetFamily() ).WriteUChar( GetPitch() ) + .WriteUChar( (bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet())) ); OUString aStoreFamilyName( GetFamilyName() ); if( bToBats ) @@ -482,7 +482,7 @@ sal_uInt16 SvxPostureItem::GetValueCount() const SvStream& SvxPostureItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUChar( (sal_uInt8)GetValue() ); + rStrm.WriteUChar( GetValue() ); return rStrm; } @@ -637,7 +637,7 @@ SfxPoolItem* SvxWeightItem::Clone( SfxItemPool * ) const SvStream& SvxWeightItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUChar( (sal_uInt8)GetValue() ); + rStrm.WriteUChar( GetValue() ); return rStrm; } @@ -1258,7 +1258,7 @@ sal_uInt16 SvxTextLineItem::GetValueCount() const SvStream& SvxTextLineItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUChar( (sal_uInt8)GetValue() ); + rStrm.WriteUChar( GetValue() ); return rStrm; } @@ -1476,7 +1476,7 @@ SfxPoolItem* SvxCrossedOutItem::Clone( SfxItemPool * ) const SvStream& SvxCrossedOutItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUChar( (sal_uInt8)GetValue() ); + rStrm.WriteUChar( GetValue() ); return rStrm; } @@ -1563,7 +1563,7 @@ SfxPoolItem* SvxShadowedItem::Clone( SfxItemPool * ) const SvStream& SvxShadowedItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUChar( (sal_uInt8) GetValue() ); + rStrm.WriteUChar( GetValue() ); return rStrm; } @@ -1612,7 +1612,7 @@ SfxPoolItem* SvxAutoKernItem::Clone( SfxItemPool * ) const SvStream& SvxAutoKernItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUChar( (sal_uInt8) GetValue() ); + rStrm.WriteUChar( GetValue() ); return rStrm; } @@ -1982,7 +1982,7 @@ SfxPoolItem* SvxCharSetColorItem::Clone( SfxItemPool * ) const SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUChar( (sal_uInt8)GetSOStoreTextEncoding(GetCharSet()) ); + rStrm.WriteUChar( GetSOStoreTextEncoding(GetCharSet()) ); WriteColor( rStrm, GetValue() ); return rStrm; } @@ -2141,7 +2141,7 @@ SfxPoolItem* SvxCaseMapItem::Clone( SfxItemPool * ) const SvStream& SvxCaseMapItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUChar( (sal_uInt8) GetValue() ); + rStrm.WriteUChar( GetValue() ); return rStrm; } @@ -2270,7 +2270,7 @@ SvStream& SvxEscapementItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion* else if( DFLT_ESC_AUTO_SUB == _nEsc ) _nEsc = DFLT_ESC_SUB; } - rStrm.WriteUChar( (sal_uInt8) GetProp() ) + rStrm.WriteUChar( GetProp() ) .WriteInt16( (short) _nEsc ); return rStrm; } @@ -2652,7 +2652,7 @@ SfxPoolItem* SvxBlinkItem::Clone( SfxItemPool * ) const SvStream& SvxBlinkItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteUChar( (sal_uInt8) GetValue() ); + rStrm.WriteUChar( GetValue() ); return rStrm; } diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 9762d838492b..711456cecea3 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -772,8 +772,8 @@ bool Sane::Start( BitmapTransporter& rBitmap ) aConverter.Seek( 54 ); // write color table aConverter.WriteUInt16( (sal_uInt16)0xffff ); - aConverter.WriteUChar( (sal_uInt8)0xff ); - aConverter.WriteUChar( (sal_uInt8)0 ); + aConverter.WriteUChar( 0xff ); + aConverter.WriteUChar( 0 ); aConverter.WriteUInt32( (sal_uInt32)0 ); aConverter.Seek( 64 ); } @@ -787,10 +787,10 @@ bool Sane::Start( BitmapTransporter& rBitmap ) // write color table for( nLine = 0; nLine < 256; nLine++ ) { - aConverter.WriteUChar( (sal_uInt8)nLine ); - aConverter.WriteUChar( (sal_uInt8)nLine ); - aConverter.WriteUChar( (sal_uInt8)nLine ); - aConverter.WriteUChar( (sal_uInt8)0 ); + aConverter.WriteUChar( nLine ); + aConverter.WriteUChar( nLine ); + aConverter.WriteUChar( nLine ); + aConverter.WriteUChar( 0 ); } aConverter.Seek( 1084 ); } diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx index b11512aacaa0..0e6110c96a60 100644 --- a/filter/source/flash/swfwriter2.cxx +++ b/filter/source/flash/swfwriter2.cxx @@ -153,20 +153,20 @@ void Tag::write( SvStream &out ) sal_uInt16 nCode = ( mnTagId << 6 ) | ( bLarge ? 0x3f : _uInt16(nSz) ); - out.WriteUChar( (sal_uInt8)nCode ); - out.WriteUChar( (sal_uInt8)(nCode >> 8) ); + out.WriteUChar( nCode ); + out.WriteUChar( (nCode >> 8) ); if( bLarge ) { sal_uInt32 nTmp = nSz; - out.WriteUChar( (sal_uInt8)nTmp ); + out.WriteUChar( nTmp ); nTmp >>= 8; - out.WriteUChar( (sal_uInt8)nTmp ); + out.WriteUChar( nTmp ); nTmp >>= 8; - out.WriteUChar( (sal_uInt8)nTmp ); + out.WriteUChar( nTmp ); nTmp >>= 8; - out.WriteUChar( (sal_uInt8)nTmp ); + out.WriteUChar( nTmp ); } } @@ -198,15 +198,15 @@ void Tag::addI16( sal_Int16 nValue ) void Tag::addUI16( sal_uInt16 nValue ) { - WriteUChar( (sal_uInt8)nValue ); - WriteUChar( (sal_uInt8)(nValue >> 8) ); + WriteUChar( nValue ); + WriteUChar( (nValue >> 8) ); } void Tag::addUI8( sal_uInt8 nValue ) { - WriteUChar( (sal_uInt8)nValue ); + WriteUChar( nValue ); } diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx index fff040548a79..0dd214800265 100644 --- a/filter/source/graphicfilter/egif/egif.cxx +++ b/filter/source/graphicfilter/egif/egif.cxx @@ -316,8 +316,8 @@ void GIFWriter::WriteGlobalHeader( const Size& rSize ) m_rGIF.WriteUInt16( nWidth ); m_rGIF.WriteUInt16( nHeight ); m_rGIF.WriteUChar( cFlags ); - m_rGIF.WriteUChar( (sal_uInt8) 0x00 ); - m_rGIF.WriteUChar( (sal_uInt8) 0x00 ); + m_rGIF.WriteUChar( 0x00 ); + m_rGIF.WriteUChar( 0x00 ); // write dummy palette with two entries (black/white); // we do this only because of a bug in Photoshop, since those can't @@ -352,15 +352,15 @@ void GIFWriter::WriteLoopExtension( const Animation& rAnimation ) const sal_uInt8 cLoByte = (const sal_uInt8) nLoopCount; const sal_uInt8 cHiByte = (const sal_uInt8) ( nLoopCount >> 8 ); - m_rGIF.WriteUChar( (sal_uInt8) 0x21 ); - m_rGIF.WriteUChar( (sal_uInt8) 0xff ); - m_rGIF.WriteUChar( (sal_uInt8) 0x0b ); + m_rGIF.WriteUChar( 0x21 ); + m_rGIF.WriteUChar( 0xff ); + m_rGIF.WriteUChar( 0x0b ); m_rGIF.Write( "NETSCAPE2.0", 11 ); - m_rGIF.WriteUChar( (sal_uInt8) 0x03 ); - m_rGIF.WriteUChar( (sal_uInt8) 0x01 ); + m_rGIF.WriteUChar( 0x03 ); + m_rGIF.WriteUChar( 0x01 ); m_rGIF.WriteUChar( cLoByte ); m_rGIF.WriteUChar( cHiByte ); - m_rGIF.WriteUChar( (sal_uInt8) 0x00 ); + m_rGIF.WriteUChar( 0x00 ); } } @@ -371,15 +371,15 @@ void GIFWriter::WriteLogSizeExtension( const Size& rSize100 ) // writer PrefSize in 100th-mm as ApplicationExtension if( rSize100.Width() && rSize100.Height() ) { - m_rGIF.WriteUChar( (sal_uInt8) 0x21 ); - m_rGIF.WriteUChar( (sal_uInt8) 0xff ); - m_rGIF.WriteUChar( (sal_uInt8) 0x0b ); + m_rGIF.WriteUChar( 0x21 ); + m_rGIF.WriteUChar( 0xff ); + m_rGIF.WriteUChar( 0x0b ); m_rGIF.Write( "STARDIV 5.0", 11 ); - m_rGIF.WriteUChar( (sal_uInt8) 0x09 ); - m_rGIF.WriteUChar( (sal_uInt8) 0x01 ); + m_rGIF.WriteUChar( 0x09 ); + m_rGIF.WriteUChar( 0x01 ); m_rGIF.WriteUInt32( (sal_uInt32) rSize100.Width() ); m_rGIF.WriteUInt32( (sal_uInt32) rSize100.Height() ); - m_rGIF.WriteUChar( (sal_uInt8) 0x00 ); + m_rGIF.WriteUChar( 0x00 ); } } @@ -402,13 +402,13 @@ void GIFWriter::WriteImageExtension( long nTimer, Disposal eDisposal ) else if( eDisposal == DISPOSE_PREVIOUS ) cFlags |= ( 3 << 2 ); - m_rGIF.WriteUChar( (sal_uInt8) 0x21 ); - m_rGIF.WriteUChar( (sal_uInt8) 0xf9 ); - m_rGIF.WriteUChar( (sal_uInt8) 0x04 ); + m_rGIF.WriteUChar( 0x21 ); + m_rGIF.WriteUChar( 0xf9 ); + m_rGIF.WriteUChar( 0x04 ); m_rGIF.WriteUChar( cFlags ); m_rGIF.WriteUInt16( nDelay ); - m_rGIF.WriteUChar( (sal_uInt8) m_pAcc->GetBestPaletteIndex( BMP_COL_TRANS ) ); - m_rGIF.WriteUChar( (sal_uInt8) 0x00 ); + m_rGIF.WriteUChar( m_pAcc->GetBestPaletteIndex( BMP_COL_TRANS ) ); + m_rGIF.WriteUChar( 0x00 ); if( m_rGIF.GetError() ) bStatus = false; @@ -435,7 +435,7 @@ void GIFWriter::WriteLocalHeader() cFlags |= 0x80; // alles rausschreiben - m_rGIF.WriteUChar( (sal_uInt8) 0x2c ); + m_rGIF.WriteUChar( 0x2c ); m_rGIF.WriteUInt16( nPosX ); m_rGIF.WriteUInt16( nPosY ); m_rGIF.WriteUInt16( nWidth ); @@ -553,7 +553,7 @@ void GIFWriter::WriteTerminator() { if( bStatus ) { - m_rGIF.WriteUChar( (sal_uInt8) 0x3b ); + m_rGIF.WriteUChar( 0x3b ); if( m_rGIF.GetError() ) bStatus = false; diff --git a/filter/source/graphicfilter/egif/giflzwc.cxx b/filter/source/graphicfilter/egif/giflzwc.cxx index c686a6dfe91e..49d996a61fdb 100644 --- a/filter/source/graphicfilter/egif/giflzwc.cxx +++ b/filter/source/graphicfilter/egif/giflzwc.cxx @@ -92,7 +92,7 @@ GIFImageDataOutputStream::~GIFImageDataOutputStream() WriteBits(0,7); FlushBitsBufsFullBytes(); FlushBlockBuf(); - rStream.WriteUChar( (sal_uInt8)0 ); + rStream.WriteUChar( 0 ); delete[] pBlockBuf; } @@ -102,7 +102,7 @@ void GIFImageDataOutputStream::FlushBlockBuf() { if( nBlockBufSize ) { - rStream.WriteUChar( (sal_uInt8) nBlockBufSize ); + rStream.WriteUChar( nBlockBufSize ); rStream.Write( pBlockBuf,nBlockBufSize ); nBlockBufSize = 0; } diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index dac8c3176b82..a0d91f8b490e 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -302,8 +302,8 @@ void METWriter::WriteClipRect( const Rectangle& rRect ) METEndPath(); } WillWriteOrder(8); - pMET->WriteUChar( (sal_uInt8)0xb4 ).WriteUChar( (sal_uInt8)6 ) - .WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0 ).WriteUInt32( nPathId ); + pMET->WriteUChar( 0xb4 ).WriteUChar( 6 ) + .WriteUChar( 0x00 ).WriteUChar( 0 ).WriteUInt32( nPathId ); } void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF) @@ -343,7 +343,7 @@ void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF) void METWriter::WriteBigEndianShort(sal_uInt16 nWord) { - pMET->WriteUChar( (sal_uInt8)(nWord>>8) ).WriteUChar( (sal_uInt8)(nWord&0x00ff) ); + pMET->WriteUChar( (nWord>>8) ).WriteUChar( (nWord&0x00ff) ); } @@ -368,7 +368,7 @@ void METWriter::WriteFieldIntroducer(sal_uInt16 nFieldSize, sal_uInt16 nFieldTyp { nActualFieldStartPos=pMET->Tell(); WriteBigEndianShort(nFieldSize); - pMET->WriteUChar( (sal_uInt8)0xd3 ).WriteUInt16( nFieldType ).WriteUChar( nFlags ).WriteUInt16( nSegSeqNum ); + pMET->WriteUChar( 0xd3 ).WriteUInt16( nFieldType ).WriteUChar( nFlags ).WriteUInt16( nSegSeqNum ); } @@ -465,13 +465,13 @@ void METWriter::WriteChrSets() WriteBigEndianShort(0x0050); - pMET->WriteUChar( (sal_uInt8)0x0c ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x84 ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0xa4 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x01 ); - pMET->WriteUChar( (sal_uInt8)0x01 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0x0c ).WriteUChar( 0x02 ).WriteUChar( 0x84 ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0xa4 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x01 ); + pMET->WriteUChar( 0x01 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ); - pMET->WriteUChar( (sal_uInt8)0x04 ).WriteUChar( (sal_uInt8)0x24 ).WriteUChar( (sal_uInt8)0x05 ).WriteUChar( (sal_uInt8)pCS->nSet ); + pMET->WriteUChar( 0x04 ).WriteUChar( 0x24 ).WriteUChar( 0x05 ).WriteUChar( pCS->nSet ); - pMET->WriteUChar( (sal_uInt8)0x14 ).WriteUChar( (sal_uInt8)0x1f ); + pMET->WriteUChar( 0x14 ).WriteUChar( 0x1f ); switch (pCS->eWeight) { case WEIGHT_THIN: nbyte=1; break; @@ -486,16 +486,16 @@ void METWriter::WriteChrSets() default: nbyte=5; } pMET->WriteUChar( nbyte ); - pMET->WriteUChar( (sal_uInt8)0x05 ); - pMET->WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x0c ); + pMET->WriteUChar( 0x05 ); + pMET->WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x0c ); - pMET->WriteUChar( (sal_uInt8)0x06 ).WriteUChar( (sal_uInt8)0x20 ).WriteUChar( (sal_uInt8)0x03 ).WriteUChar( (sal_uInt8)0xd4 ); - pMET->WriteUChar( (sal_uInt8)0x03 ).WriteUChar( (sal_uInt8)0x52 ); + pMET->WriteUChar( 0x06 ).WriteUChar( 0x20 ).WriteUChar( 0x03 ).WriteUChar( 0xd4 ); + pMET->WriteUChar( 0x03 ).WriteUChar( 0x52 ); - pMET->WriteUChar( (sal_uInt8)0x24 ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x08 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0x24 ).WriteUChar( 0x02 ).WriteUChar( 0x08 ).WriteUChar( 0x00 ); OString n(OUStringToOString(pCS->aName, osl_getThreadTextEncoding())); for (i=0; i<32; i++) @@ -520,7 +520,7 @@ void METWriter::WriteColorAttributeTable(sal_uInt32 nFieldId, BitmapPalette* pPa //--- The Field 'Color Attribute Table': WriteFieldIntroducer(0,BlkColAtrMagic,0,0); - pMET->WriteUChar( nBasePartFlags ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( nBasePartLCTID ); // 'Base Part' + pMET->WriteUChar( nBasePartFlags ).WriteUChar( 0x00 ).WriteUChar( nBasePartLCTID ); // 'Base Part' if (pPalette!=NULL) { nIndex=0; @@ -528,18 +528,18 @@ void METWriter::WriteColorAttributeTable(sal_uInt32 nFieldId, BitmapPalette* pPa { nNumI=pPalette->GetEntryCount()-nIndex; if (nNumI>81) nNumI=81; - pMET->WriteUChar( (sal_uInt8)(11+nNumI*3) ); // length of the parameter - pMET->WriteUChar( (sal_uInt8)1 ).WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)1 ); // typ: element list, Reserved, Format: RGB - pMET->WriteUChar( (sal_uInt8)0 ); WriteBigEndianShort(nIndex); // start-Index (3 Bytes) - pMET->WriteUChar( (sal_uInt8)8 ).WriteUChar( (sal_uInt8)8 ).WriteUChar( (sal_uInt8)8 ); // Bits per component R,G,B - pMET->WriteUChar( (sal_uInt8)3 ); // number of bytes per entry + pMET->WriteUChar( (11+nNumI*3) ); // length of the parameter + pMET->WriteUChar( 1 ).WriteUChar( 0 ).WriteUChar( 1 ); // typ: element list, Reserved, Format: RGB + pMET->WriteUChar( 0 ); WriteBigEndianShort(nIndex); // start-Index (3 Bytes) + pMET->WriteUChar( 8 ).WriteUChar( 8 ).WriteUChar( 8 ); // Bits per component R,G,B + pMET->WriteUChar( 3 ); // number of bytes per entry for (i=0; i<nNumI; i++) { const BitmapColor& rCol = (*pPalette)[ nIndex ]; - pMET->WriteUChar( (sal_uInt8) rCol.GetRed() ); - pMET->WriteUChar( (sal_uInt8) rCol.GetGreen() ); - pMET->WriteUChar( (sal_uInt8) rCol.GetBlue() ); + pMET->WriteUChar( rCol.GetRed() ); + pMET->WriteUChar( rCol.GetGreen() ); + pMET->WriteUChar( rCol.GetBlue() ); nIndex++; } } @@ -547,8 +547,8 @@ void METWriter::WriteColorAttributeTable(sal_uInt32 nFieldId, BitmapPalette* pPa else { // 'Trible Generating' - pMET->WriteUChar( (sal_uInt8)0x0a ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x01 ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x08 ).WriteUChar( (sal_uInt8)0x08 ).WriteUChar( (sal_uInt8)0x08 ); + pMET->WriteUChar( 0x0a ).WriteUChar( 0x02 ).WriteUChar( 0x00 ).WriteUChar( 0x01 ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x08 ).WriteUChar( 0x08 ).WriteUChar( 0x08 ); } UpdateFieldSize(); @@ -626,9 +626,9 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap) //--- The Field 'Map Color Attribute Table': WriteFieldIntroducer(26,MapColAtrMagic,0,0); WriteBigEndianShort(0x0012); - pMET->WriteUChar( (sal_uInt8)0x0c ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x84 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0x0c ).WriteUChar( 0x02 ).WriteUChar( 0x84 ).WriteUChar( 0x00 ); WriteFieldId(nActColMapId); - pMET->WriteUChar( (sal_uInt8)0x04 ).WriteUChar( (sal_uInt8)0x24 ).WriteUChar( (sal_uInt8)0x07 ).WriteUChar( (sal_uInt8)0x01 ); + pMET->WriteUChar( 0x04 ).WriteUChar( 0x24 ).WriteUChar( 0x07 ).WriteUChar( 0x01 ); //--- The Field 'End Object Environment Group': WriteFieldIntroducer(16,EndObjEnvMagic,0,0); @@ -637,7 +637,7 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap) //--- The Field 'Image Data Descriptor': WriteFieldIntroducer(17,DscImgObjMagic,0,0); - pMET->WriteUChar( (sal_uInt8)0x01 ); // Unit of measure: tens of centimeters + pMET->WriteUChar( 0x01 ); // Unit of measure: tens of centimeters WriteBigEndianShort((sal_uInt16)nResX); WriteBigEndianShort((sal_uInt16)nResY); WriteBigEndianShort((sal_uInt16)nWidth); @@ -647,32 +647,32 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap) WriteFieldIntroducer(0,DatImgObjMagic,0,0); // Begin Segment: - pMET->WriteUChar( (sal_uInt8)0x70 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0x70 ).WriteUChar( 0x00 ); // Begin Image Content: - pMET->WriteUChar( (sal_uInt8)0x91 ).WriteUChar( (sal_uInt8)0x01 ).WriteUChar( (sal_uInt8)0xff ); + pMET->WriteUChar( 0x91 ).WriteUChar( 0x01 ).WriteUChar( 0xff ); // Image Size: - pMET->WriteUChar( (sal_uInt8)0x94 ).WriteUChar( (sal_uInt8)0x09 ).WriteUChar( (sal_uInt8)0x02 ); + pMET->WriteUChar( 0x94 ).WriteUChar( 0x09 ).WriteUChar( 0x02 ); pMET->WriteUInt16( (sal_uInt16) 0 ).WriteUInt16( (sal_uInt16) 0 ); WriteBigEndianShort((sal_uInt16)nHeight); WriteBigEndianShort((sal_uInt16)nWidth); // Image Encoding: - pMET->WriteUChar( (sal_uInt8)0x95 ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x03 ).WriteUChar( (sal_uInt8)0x03 ); + pMET->WriteUChar( 0x95 ).WriteUChar( 0x02 ).WriteUChar( 0x03 ).WriteUChar( 0x03 ); // Image IDE-Size: - pMET->WriteUChar( (sal_uInt8)0x96 ).WriteUChar( (sal_uInt8)0x01 ).WriteUChar( (sal_uInt8)nBitsPerPixel ); + pMET->WriteUChar( 0x96 ).WriteUChar( 0x01 ).WriteUChar( nBitsPerPixel ); if (nBitsPerPixel<=8) { // Image LUT-ID - pMET->WriteUChar( (sal_uInt8)0x97 ).WriteUChar( (sal_uInt8)0x01 ).WriteUChar( (sal_uInt8)0x01 ); + pMET->WriteUChar( 0x97 ).WriteUChar( 0x01 ).WriteUChar( 0x01 ); } else { // IDE Structure - pMET->WriteUChar( (sal_uInt8)0x9b ).WriteUChar( (sal_uInt8)0x08 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x01 ); - pMET->WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x08 ); - pMET->WriteUChar( (sal_uInt8)0x08 ).WriteUChar( (sal_uInt8)0x08 ); + pMET->WriteUChar( 0x9b ).WriteUChar( 0x08 ).WriteUChar( 0x00 ).WriteUChar( 0x01 ); + pMET->WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x08 ); + pMET->WriteUChar( 0x08 ).WriteUChar( 0x08 ); } boost::scoped_array<sal_uInt8> pBuf(new sal_uInt8[nBytesPerLine]); @@ -709,10 +709,10 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap) pBuf.reset(); // End Image Content: - pMET->WriteUChar( (sal_uInt8)0x93 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0x93 ).WriteUChar( 0x00 ); // End Segment: - pMET->WriteUChar( (sal_uInt8)0x71 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0x71 ).WriteUChar( 0x00 ); // finalize the last field 'Image Picture Data': UpdateFieldSize(); @@ -839,9 +839,9 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) // 8 Coordinate types in data // 0x04Intel16 // 0x05Intel32 - pMET->WriteUChar( (sal_uInt8)0xf7 ).WriteUChar( (sal_uInt8)0x07 ).WriteUChar( (sal_uInt8)0xb0 ).WriteUChar( (sal_uInt8)0x00 ) - .WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x23 ).WriteUChar( (sal_uInt8)0x01 ).WriteUChar( (sal_uInt8)0x01 ) - .WriteUChar( (sal_uInt8)0x05 ); + pMET->WriteUChar( 0xf7 ).WriteUChar( 0x07 ).WriteUChar( 0xb0 ).WriteUChar( 0x00 ) + .WriteUChar( 0x00 ).WriteUChar( 0x23 ).WriteUChar( 0x01 ).WriteUChar( 0x01 ) + .WriteUChar( 0x05 ); // 0 0xF6 Set Picture Descriptor // 1 Length of following data @@ -871,8 +871,8 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) // GPS Y bottom, Y top // GPS Z near, Z far Size aUnitsPerDecimeter=OutputDevice::LogicToLogic(Size(10,10),MapMode(MAP_CM),aPictureMapMode); - pMET->WriteUChar( (sal_uInt8)0xf6 ).WriteUChar( (sal_uInt8)0x28 ).WriteUChar( (sal_uInt8)0x40 ).WriteUChar( (sal_uInt8)0x00 ) - .WriteUChar( (sal_uInt8)0x05 ).WriteUChar( (sal_uInt8)0x01 ) + 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 ) @@ -893,9 +893,9 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) // 8 Geometrics // 0x04 Intel16 // 0x05 Intel32 - pMET->WriteUChar( (sal_uInt8)0x21 ).WriteUChar( (sal_uInt8)0x07 ).WriteUChar( (sal_uInt8)0x08 ).WriteUChar( (sal_uInt8)0xe0 ) - .WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x8f ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x05 ) - .WriteUChar( (sal_uInt8)0x05 ); + pMET->WriteUChar( 0x21 ).WriteUChar( 0x07 ).WriteUChar( 0x08 ).WriteUChar( 0xe0 ) + .WriteUChar( 0x00 ).WriteUChar( 0x8f ).WriteUChar( 0x00 ).WriteUChar( 0x05 ) + .WriteUChar( 0x05 ); // 0 0x21 Set Current Defaults // 1 Length of following data @@ -903,8 +903,8 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) // 3-4 Mask 0xCC0C // 5 Names 0x8F // 6-n M11, M12, M21, M22, M41, M42 Matrix elements - pMET->WriteUChar( (sal_uInt8)0x21 ).WriteUChar( (sal_uInt8)0x1c ).WriteUChar( (sal_uInt8)0x07 ).WriteUChar( (sal_uInt8)0xcc ) - .WriteUChar( (sal_uInt8)0x0c ).WriteUChar( (sal_uInt8)0x8f ) + 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 ); @@ -975,11 +975,11 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) // (1 byte) - Character mix // (1 byte) - Character background mix (G=2 or 4 depending on the Geometrics // parameter of Set Default Parameter Format) - pMET->WriteUChar( (sal_uInt8)0x21 ).WriteUChar( (sal_uInt8)0x10 ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x40 ) - .WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x8f ) - .WriteUChar( (sal_uInt8)0xaa ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ) - .WriteUChar( (sal_uInt8)0x44 ).WriteUChar( (sal_uInt8)0x04 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ) - .WriteUChar( (sal_uInt8)0xa8 ).WriteUChar( (sal_uInt8)0xaa ).WriteUChar( (sal_uInt8)0x40 ).WriteUChar( (sal_uInt8)0x44 ); + pMET->WriteUChar( 0x21 ).WriteUChar( 0x10 ).WriteUChar( 0x02 ).WriteUChar( 0x40 ) + .WriteUChar( 0x00 ).WriteUChar( 0x8f ) + .WriteUChar( 0xaa ).WriteUChar( 0x02 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ) + .WriteUChar( 0x44 ).WriteUChar( 0x04 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ) + .WriteUChar( 0xa8 ).WriteUChar( 0xaa ).WriteUChar( 0x40 ).WriteUChar( 0x44 ); // 0 0x21 Set Current Defaults // 1 Length of following data @@ -1009,10 +1009,10 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) // (1 byte) - Marker mix // (1 byte) - Marker background mix (G=2 or 4 depending on the Geometrics // parameter of Set Default Parameter Format) - pMET->WriteUChar( (sal_uInt8)0x21 ).WriteUChar( (sal_uInt8)0x0c ).WriteUChar( (sal_uInt8)0x03 ).WriteUChar( (sal_uInt8)0x40 ) - .WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x8f ) - .WriteUChar( (sal_uInt8)0x66 ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ) - .WriteUChar( (sal_uInt8)0x66 ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0x21 ).WriteUChar( 0x0c ).WriteUChar( 0x03 ).WriteUChar( 0x40 ) + .WriteUChar( 0x00 ).WriteUChar( 0x8f ) + .WriteUChar( 0x66 ).WriteUChar( 0x02 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ) + .WriteUChar( 0x66 ).WriteUChar( 0x02 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ); // 0 0x21 Set Current Defaults // 1 Length of following data @@ -1121,9 +1121,9 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) // 4-7 Bit-map handle // 8 Lcid if (nNumberOfBitmaps>0) { - pMET->WriteUChar( (sal_uInt8)0xe7 ).WriteUChar( (sal_uInt8)0x07 ).WriteUChar( (sal_uInt8)0x80 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0xe7 ).WriteUChar( 0x07 ).WriteUChar( 0x80 ).WriteUChar( 0x00 ); WriteBigEndianLong(nActBitmapId); - pMET->WriteUChar( (sal_uInt8)0xfe ); + pMET->WriteUChar( 0xfe ); } UpdateFieldSize(); @@ -1152,9 +1152,9 @@ void METWriter::WillWriteOrder(sal_uInt32 nNextOrderMaximumLength) void METWriter::METBitBlt(Point aPt, Size aSize, const Size& rBmpSizePixel) { WillWriteOrder(46); - pMET->WriteUChar( (sal_uInt8)0xd6 ).WriteUChar( (sal_uInt8)44 ).WriteUInt16( (sal_uInt16)0 ).WriteUInt16( (sal_uInt16) 0x00cc ); + pMET->WriteUChar( 0xd6 ).WriteUChar( 44 ).WriteUInt16( (sal_uInt16)0 ).WriteUInt16( (sal_uInt16) 0x00cc ); WriteBigEndianLong(nActBitmapId++); - pMET->WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ); + 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 ) @@ -1167,10 +1167,10 @@ void METWriter::METSetAndPushLineInfo( const LineInfo& rLineInfo ) sal_Int32 nWidth = OutputDevice::LogicToLogic( Size( rLineInfo.GetWidth(),0 ), aPictureMapMode, aTargetMapMode ).Width(); WillWriteOrder( 8 ); // set stroke linewidth - pMET ->WriteUChar( (sal_uInt8)0x15 ) - .WriteUChar( (sal_uInt8)6 ) - .WriteUChar( (sal_uInt8)0 ) // Flags - .WriteUChar( (sal_uInt8)0 ) + pMET ->WriteUChar( 0x15 ) + .WriteUChar( 6 ) + .WriteUChar( 0 ) // Flags + .WriteUChar( 0 ) .WriteInt32( nWidth ); if ( rLineInfo.GetStyle() != LINE_SOLID ) @@ -1201,83 +1201,83 @@ void METWriter::METSetAndPushLineInfo( const LineInfo& rLineInfo ) break; // not handled -Wall } WillWriteOrder( 2 ); - pMET->WriteUChar( (sal_uInt8)0x18 ).WriteUChar( nStyle ); // set LineType + pMET->WriteUChar( 0x18 ).WriteUChar( nStyle ); // set LineType } } void METWriter::METPopLineInfo( const LineInfo& rLineInfo ) { WillWriteOrder( 8 ); // set stroke linewidth - pMET ->WriteUChar( (sal_uInt8)0x15 ) - .WriteUChar( (sal_uInt8)6 ) - .WriteUChar( (sal_uInt8)0 ) // Flags - .WriteUChar( (sal_uInt8)0 ) + pMET ->WriteUChar( 0x15 ) + .WriteUChar( 6 ) + .WriteUChar( 0 ) // Flags + .WriteUChar( 0 ) .WriteUInt32( (sal_uInt32)1 ); if ( rLineInfo.GetStyle() != LINE_SOLID ) { WillWriteOrder( 2 ); - pMET->WriteUChar( (sal_uInt8)0x18 ).WriteUChar( (sal_uInt8)0 ); // set LineType + pMET->WriteUChar( 0x18 ).WriteUChar( 0 ); // set LineType } } void METWriter::METBeginArea(bool bBoundaryLine) { WillWriteOrder(2); - pMET->WriteUChar( (sal_uInt8)0x68 ); - if (bBoundaryLine) pMET->WriteUChar( (sal_uInt8)0xc0 ); - else pMET->WriteUChar( (sal_uInt8)0x80 ); + pMET->WriteUChar( 0x68 ); + if (bBoundaryLine) pMET->WriteUChar( 0xc0 ); + else pMET->WriteUChar( 0x80 ); } void METWriter::METEndArea() { WillWriteOrder(2); - pMET->WriteUChar( (sal_uInt8)0x60 ).WriteUChar( (sal_uInt8)0 ); + pMET->WriteUChar( 0x60 ).WriteUChar( 0 ); } void METWriter::METBeginPath(sal_uInt32 nPathId) { WillWriteOrder(8); - pMET->WriteUChar( (sal_uInt8)0xd0 ).WriteUChar( (sal_uInt8)6 ).WriteUInt16( (sal_uInt16) 0 ).WriteUInt32( nPathId ); + pMET->WriteUChar( 0xd0 ).WriteUChar( 6 ).WriteUInt16( (sal_uInt16) 0 ).WriteUInt32( nPathId ); } void METWriter::METEndPath() { WillWriteOrder(2); - pMET->WriteUChar( (sal_uInt8)0x7f ).WriteUChar( (sal_uInt8)0 ); + pMET->WriteUChar( 0x7f ).WriteUChar( 0 ); } void METWriter::METFillPath(sal_uInt32 nPathId) { WillWriteOrder(8); - pMET->WriteUChar( (sal_uInt8)0xd7 ).WriteUChar( (sal_uInt8)6 ) - .WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0 ).WriteUInt32( nPathId ); + pMET->WriteUChar( 0xd7 ).WriteUChar( 6 ) + .WriteUChar( 0x00 ).WriteUChar( 0 ).WriteUInt32( nPathId ); } void METWriter::METOutlinePath(sal_uInt32 nPathId) { WillWriteOrder(8); - pMET->WriteUChar( (sal_uInt8)0xd4 ).WriteUChar( (sal_uInt8)6 ) - .WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ).WriteUInt32( nPathId ); + pMET->WriteUChar( 0xd4 ).WriteUChar( 6 ) + .WriteUChar( 0 ).WriteUChar( 0 ).WriteUInt32( nPathId ); } void METWriter::METCloseFigure() { WillWriteOrder(2); - pMET->WriteUChar( (sal_uInt8)0x7d ).WriteUChar( (sal_uInt8)0 ); + pMET->WriteUChar( 0x7d ).WriteUChar( 0 ); } void METWriter::METMove(Point aPt) { WillWriteOrder(10); - pMET->WriteUChar( (sal_uInt8)0x21 ).WriteUChar( (sal_uInt8)8 ); + pMET->WriteUChar( 0x21 ).WriteUChar( 8 ); WritePoint(aPt); } @@ -1285,7 +1285,7 @@ void METWriter::METMove(Point aPt) void METWriter::METLine(Point aPt1, Point aPt2) { WillWriteOrder(18); - pMET->WriteUChar( (sal_uInt8)0xc1 ).WriteUChar( (sal_uInt8)16 ); + pMET->WriteUChar( 0xc1 ).WriteUChar( 16 ); WritePoint(aPt1); WritePoint(aPt2); } @@ -1302,13 +1302,13 @@ void METWriter::METLine(const Polygon & rPolygon) if (nOrderPoints>30) nOrderPoints=30; WillWriteOrder(nOrderPoints*8+2); if (bFirstOrder) { - pMET->WriteUChar( (sal_uInt8)0xc1 ); // Line at given pos + pMET->WriteUChar( 0xc1 ); // Line at given pos bFirstOrder=false; } else { - pMET->WriteUChar( (sal_uInt8)0x81 ); // Line at current pos + pMET->WriteUChar( 0x81 ); // Line at current pos } - pMET->WriteUChar( (sal_uInt8)(nOrderPoints*8) ); + pMET->WriteUChar( (nOrderPoints*8) ); for (j=0; j<nOrderPoints; j++) WritePoint(rPolygon.GetPoint(i++)); } } @@ -1328,7 +1328,7 @@ void METWriter::METLine(const PolyPolygon & rPolyPolygon) void METWriter::METLineAtCurPos(Point aPt) { WillWriteOrder(10); - pMET->WriteUChar( (sal_uInt8)0x81 ).WriteUChar( (sal_uInt8)8 ); + pMET->WriteUChar( 0x81 ).WriteUChar( 8 ); WritePoint(aPt); } @@ -1341,7 +1341,7 @@ void METWriter::METBox(bool bFill, bool bBoundary, if (bBoundary) nFlags|=0x20; WillWriteOrder(28); - pMET->WriteUChar( (sal_uInt8)0xc0 ).WriteUChar( (sal_uInt8)26 ).WriteUChar( nFlags ).WriteUChar( (sal_uInt8)0 ); + pMET->WriteUChar( 0xc0 ).WriteUChar( 26 ).WriteUChar( nFlags ).WriteUChar( 0 ); WritePoint(aRect.BottomLeft()); WritePoint(aRect.TopRight()); pMET->WriteUInt32( nHAxis ).WriteUInt32( nVAxis ); @@ -1351,7 +1351,7 @@ void METWriter::METBox(bool bFill, bool bBoundary, void METWriter::METFullArc(Point aCenter, double fMultiplier) { WillWriteOrder(14); - pMET->WriteUChar( (sal_uInt8)0xc7 ).WriteUChar( (sal_uInt8)12 ); + pMET->WriteUChar( 0xc7 ).WriteUChar( 12 ); WritePoint(aCenter); pMET->WriteInt32( (sal_Int32)(fMultiplier*65536.0+0.5) ); } @@ -1367,7 +1367,7 @@ void METWriter::METPartialArcAtCurPos(Point aCenter, double fMultiplier, while (fSweepAngle>360.0) fSweepAngle-=360.0; while (fSweepAngle<.00) fSweepAngle+=360.0; WillWriteOrder(22); - pMET->WriteUChar( (sal_uInt8)0xa3 ).WriteUChar( (sal_uInt8)20 ); + pMET->WriteUChar( 0xa3 ).WriteUChar( 20 ); WritePoint(aCenter); pMET->WriteInt32( (sal_Int32)(fMultiplier*65536.0+0.5) ); pMET->WriteInt32( (sal_Int32)(fStartAngle*65536.0+0.5) ); @@ -1381,18 +1381,18 @@ void METWriter::METChrStr( Point aPt, const OUString& aUniStr ) osl_getThreadTextEncoding())); sal_uInt16 nLen = aStr.getLength(); WillWriteOrder( 11 + nLen ); - pMET->WriteUChar( (sal_uInt8)0xc3 ).WriteUChar( (sal_uInt8)( 9 + nLen ) ); + pMET->WriteUChar( 0xc3 ).WriteUChar( ( 9 + nLen ) ); WritePoint(aPt); for (sal_uInt16 i = 0; i < nLen; ++i) pMET->WriteChar( aStr[i] ); - pMET->WriteUChar( (sal_uInt8)0 ); + pMET->WriteUChar( 0 ); } void METWriter::METSetArcParams(sal_Int32 nP, sal_Int32 nQ, sal_Int32 nR, sal_Int32 nS) { WillWriteOrder(18); - pMET->WriteUChar( (sal_uInt8)0x22 ).WriteUChar( (sal_uInt8)16 ).WriteInt32( nP ).WriteInt32( nQ ).WriteInt32( nR ).WriteInt32( nS ); + pMET->WriteUChar( 0x22 ).WriteUChar( 16 ).WriteInt32( nP ).WriteInt32( nQ ).WriteInt32( nR ).WriteInt32( nS ); } @@ -1402,10 +1402,10 @@ void METWriter::METSetColor(Color aColor) aMETColor=aColor; WillWriteOrder(6); - pMET->WriteUChar( (sal_uInt8)0xa6 ).WriteUChar( (sal_uInt8)4 ).WriteUChar( (sal_uInt8)0 ) - .WriteUChar( (sal_uInt8)(aColor.GetBlue()) ) - .WriteUChar( (sal_uInt8)(aColor.GetGreen()) ) - .WriteUChar( (sal_uInt8)(aColor.GetRed()) ); + pMET->WriteUChar( 0xa6 ).WriteUChar( 4 ).WriteUChar( 0 ) + .WriteUChar( (aColor.GetBlue()) ) + .WriteUChar( (aColor.GetGreen()) ) + .WriteUChar( (aColor.GetRed()) ); } @@ -1415,10 +1415,10 @@ void METWriter::METSetBackgroundColor(Color aColor) aMETBackgroundColor=aColor; WillWriteOrder(6); - pMET->WriteUChar( (sal_uInt8)0xa7 ).WriteUChar( (sal_uInt8)4 ).WriteUChar( (sal_uInt8)0 ) - .WriteUChar( (sal_uInt8)(aColor.GetBlue()) ) - .WriteUChar( (sal_uInt8)(aColor.GetGreen()) ) - .WriteUChar( (sal_uInt8)(aColor.GetRed()) ); + pMET->WriteUChar( 0xa7 ).WriteUChar( 4 ).WriteUChar( 0 ) + .WriteUChar( (aColor.GetBlue()) ) + .WriteUChar( (aColor.GetGreen()) ) + .WriteUChar( (aColor.GetRed()) ); } void METWriter::METSetMix(RasterOp eROP) @@ -1438,7 +1438,7 @@ void METWriter::METSetMix(RasterOp eROP) } WillWriteOrder(2); - pMET->WriteUChar( (sal_uInt8)0x0c ).WriteUChar( nMix ); + pMET->WriteUChar( 0x0c ).WriteUChar( nMix ); } @@ -1450,7 +1450,7 @@ void METWriter::METSetChrCellSize(Size aSize) aMETChrCellSize=aSize; WillWriteOrder(10); if (aSize.Width()==0) aSize.Width()=aSize.Height(); - pMET->WriteUChar( (sal_uInt8)0x33 ).WriteUChar( (sal_uInt8)8 ).WriteInt32( (sal_Int32)aSize.Width() ).WriteInt32( (sal_Int32)aSize.Height() ); + pMET->WriteUChar( 0x33 ).WriteUChar( 8 ).WriteInt32( (sal_Int32)aSize.Width() ).WriteInt32( (sal_Int32)aSize.Height() ); } @@ -1474,7 +1474,7 @@ void METWriter::METSetChrAngle(short nAngle) } WillWriteOrder(10); - pMET->WriteUChar( (sal_uInt8)0x34 ).WriteUChar( (sal_uInt8)8 ).WriteInt32( nax ).WriteInt32( nay ); + pMET->WriteUChar( 0x34 ).WriteUChar( 8 ).WriteInt32( nax ).WriteInt32( nay ); } @@ -1485,7 +1485,7 @@ void METWriter::METSetChrSet(sal_uInt8 nSet) nMETChrSet=nSet; WillWriteOrder(2); - pMET->WriteUChar( (sal_uInt8)0x38 ).WriteUChar( nSet ); + pMET->WriteUChar( 0x38 ).WriteUChar( nSet ); } @@ -2348,18 +2348,18 @@ void METWriter::WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF) //--- The Field 'Map Color Attribute Table': WriteFieldIntroducer(22,MapColAtrMagic,0,0); WriteBigEndianShort(0x000e); - pMET->WriteUChar( (sal_uInt8)0x0c ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x84 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0x0c ).WriteUChar( 0x02 ).WriteUChar( 0x84 ).WriteUChar( 0x00 ); WriteFieldId(4); //--- The first Field 'Map Coded Font': WriteFieldIntroducer(32,MapCodFntMagic,0,0); WriteBigEndianShort(0x0018); - pMET->WriteUChar( (sal_uInt8)0x0c ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x84 ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0xff ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0x04 ).WriteUChar( (sal_uInt8)0x24 ).WriteUChar( (sal_uInt8)0x05 ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0x06 ).WriteUChar( (sal_uInt8)0x20 ); - pMET->WriteUChar( (sal_uInt8)0x03 ).WriteUChar( (sal_uInt8)0x97 ).WriteUChar( (sal_uInt8)0x01 ).WriteUChar( (sal_uInt8)0xb5 ); + pMET->WriteUChar( 0x0c ).WriteUChar( 0x02 ).WriteUChar( 0x84 ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0xff ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0x04 ).WriteUChar( 0x24 ).WriteUChar( 0x05 ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0x06 ).WriteUChar( 0x20 ); + pMET->WriteUChar( 0x03 ).WriteUChar( 0x97 ).WriteUChar( 0x01 ).WriteUChar( 0xb5 ); //--- The additional Fields 'Map Coded Font': CreateChrSets(pMTF); @@ -2371,9 +2371,9 @@ void METWriter::WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF) { WriteFieldIntroducer(29,MapDatResMagic,0,0); WriteBigEndianShort(0x0015); - pMET->WriteUChar( (sal_uInt8)0x0c ).WriteUChar( (sal_uInt8)0x02 ).WriteUChar( (sal_uInt8)0x84 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0x0c ).WriteUChar( 0x02 ).WriteUChar( 0x84 ).WriteUChar( 0x00 ); WriteFieldId(nId); - pMET->WriteUChar( (sal_uInt8)0x07 ).WriteUChar( (sal_uInt8)0x22 ).WriteUChar( (sal_uInt8)0x10 ); + pMET->WriteUChar( 0x07 ).WriteUChar( 0x22 ).WriteUChar( 0x10 ); pMET->WriteUInt32( (sal_uInt32)nId ); nId++; } @@ -2412,8 +2412,8 @@ void METWriter::WriteGraphicsObject(const GDIMetaFile * pMTF) nNumberOfDataFields++; // now at first we write the head of the segment: - pMET->WriteUChar( (sal_uInt8)0x70 ).WriteUChar( (sal_uInt8)0x0e ).WriteUInt32( (sal_uInt32)0 ); - pMET->WriteUChar( (sal_uInt8)0x70 ).WriteUChar( (sal_uInt8)0x10 ); // Flags + pMET->WriteUChar( 0x70 ).WriteUChar( 0x0e ).WriteUInt32( (sal_uInt32)0 ); + pMET->WriteUChar( 0x70 ).WriteUChar( 0x10 ); // Flags pMET->WriteUInt16( (sal_uInt16)0 ); // Lo-Word of the length of the segment data (Big Endian) pMET->WriteUInt32( (sal_uInt32)0 ); // Reserved pMET->WriteUInt16( (sal_uInt16)0 ); // Hi-Word of the length of the segment (Big Endian) (Ohh Ohh OS2) @@ -2479,10 +2479,10 @@ void METWriter::WriteDocument(const GDIMetaFile * pMTF) //--- The Field 'Begin Document': WriteFieldIntroducer(0,BegDocumnMagic,0,0); WriteFieldId(1); - pMET->WriteUChar( (sal_uInt8)0x00 ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0x05 ).WriteUChar( (sal_uInt8)0x18 ).WriteUChar( (sal_uInt8)0x03 ).WriteUChar( (sal_uInt8)0x0c ).WriteUChar( (sal_uInt8)0x00 ); - pMET->WriteUChar( (sal_uInt8)0x06 ).WriteUChar( (sal_uInt8)0x01 ).WriteUChar( (sal_uInt8)0x03 ).WriteUChar( (sal_uInt8)0xd4 ).WriteUChar( (sal_uInt8)0x03 ).WriteUChar( (sal_uInt8)0x52 ); - pMET->WriteUChar( (sal_uInt8)0x03 ).WriteUChar( (sal_uInt8)0x65 ).WriteUChar( (sal_uInt8)0x00 ); + pMET->WriteUChar( 0x00 ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0x05 ).WriteUChar( 0x18 ).WriteUChar( 0x03 ).WriteUChar( 0x0c ).WriteUChar( 0x00 ); + pMET->WriteUChar( 0x06 ).WriteUChar( 0x01 ).WriteUChar( 0x03 ).WriteUChar( 0xd4 ).WriteUChar( 0x03 ).WriteUChar( 0x52 ); + pMET->WriteUChar( 0x03 ).WriteUChar( 0x65 ).WriteUChar( 0x00 ); UpdateFieldSize(); //--- The Content: diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx index f0b575ecb698..5919b9a18382 100644 --- a/filter/source/graphicfilter/epbm/epbm.cxx +++ b/filter/source/graphicfilter/epbm/epbm.cxx @@ -128,9 +128,9 @@ bool PBMWriter::ImplWriteHeader() m_rOStm.WriteCharPtr( "P1\x0a" ); ImplWriteNumber( mnWidth ); - m_rOStm.WriteUChar( (sal_uInt8)32 ); + m_rOStm.WriteUChar( 32 ); ImplWriteNumber( mnHeight ); - m_rOStm.WriteUChar( (sal_uInt8)10 ); + m_rOStm.WriteUChar( 10 ); } else mbStatus = false; return mbStatus; @@ -155,7 +155,7 @@ void PBMWriter::ImplWriteBody() m_rOStm.WriteUChar( nBYTE ); } if ( ( x & 7 ) != 0 ) - m_rOStm.WriteUChar( (sal_uInt8)( nBYTE << ( ( x ^ 7 ) + 1 ) ) ); + m_rOStm.WriteUChar( ( nBYTE << ( ( x ^ 7 ) + 1 ) ) ); } } else @@ -169,11 +169,11 @@ void PBMWriter::ImplWriteBody() if (!( --nxCount ) ) { nxCount = 69; - m_rOStm.WriteUChar( (sal_uInt8)10 ); + m_rOStm.WriteUChar( 10 ); } - m_rOStm.WriteUChar( (sal_uInt8)( ( mpAcc->GetPixelIndex( y, x ) ^ 1 ) + '0' ) ) ; + m_rOStm.WriteUChar( ( ( mpAcc->GetPixelIndex( y, x ) ^ 1 ) + '0' ) ) ; } - m_rOStm.WriteUChar( (sal_uInt8)10 ); + m_rOStm.WriteUChar( 10 ); } } } diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx index c1d31b401069..fcd65b891ed4 100644 --- a/filter/source/graphicfilter/epgm/epgm.cxx +++ b/filter/source/graphicfilter/epgm/epgm.cxx @@ -124,11 +124,11 @@ bool PGMWriter::ImplWriteHeader() m_rOStm.WriteCharPtr( "P2\x0a" ); ImplWriteNumber( mnWidth ); - m_rOStm.WriteUChar( (sal_uInt8)32 ); + m_rOStm.WriteUChar( 32 ); ImplWriteNumber( mnHeight ); - m_rOStm.WriteUChar( (sal_uInt8)32 ); + m_rOStm.WriteUChar( 32 ); ImplWriteNumber( 255 ); // max. gray value - m_rOStm.WriteUChar( (sal_uInt8)10 ); + m_rOStm.WriteUChar( 10 ); } else mbStatus = false; @@ -161,18 +161,18 @@ void PGMWriter::ImplWriteBody() if ( nCount < 0 ) { nCount = 69; - m_rOStm.WriteUChar( (sal_uInt8)10 ); + m_rOStm.WriteUChar( 10 ); } nDat = mpAcc->GetPixelIndex( y, x ); nNumb = nDat / 100; if ( nNumb ) { - m_rOStm.WriteUChar( (sal_uInt8)( nNumb + '0' ) ); + m_rOStm.WriteUChar( ( nNumb + '0' ) ); nDat -= ( nNumb * 100 ); nNumb = nDat / 10; - m_rOStm.WriteUChar( (sal_uInt8)( nNumb + '0' ) ); + m_rOStm.WriteUChar( ( nNumb + '0' ) ); nDat -= ( nNumb * 10 ); - m_rOStm.WriteUChar( (sal_uInt8)( nDat + '0' ) ); + m_rOStm.WriteUChar( ( nDat + '0' ) ); nCount -= 4; } else @@ -180,20 +180,20 @@ void PGMWriter::ImplWriteBody() nNumb = nDat / 10; if ( nNumb ) { - m_rOStm.WriteUChar( (sal_uInt8)( nNumb + '0' ) ); + m_rOStm.WriteUChar( ( nNumb + '0' ) ); nDat -= ( nNumb * 10 ); - m_rOStm.WriteUChar( (sal_uInt8)( nDat + '0' ) ); + m_rOStm.WriteUChar( ( nDat + '0' ) ); nCount -= 3; } else { - m_rOStm.WriteUChar( (sal_uInt8)( nDat + '0' ) ); + m_rOStm.WriteUChar( ( nDat + '0' ) ); nCount -= 2; } } - m_rOStm.WriteUChar( (sal_uInt8)' ' ); + m_rOStm.WriteUChar( ' ' ); } - m_rOStm.WriteUChar( (sal_uInt8)10 ); + m_rOStm.WriteUChar( 10 ); } } } diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index 9a44f45276be..e3606deaa34a 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -462,7 +462,7 @@ void PictWriter::WriteOpcode_TxFace(const vcl::Font & rFont) if (rFont.IsShadow()) nFace|=0x10; if (bDstTxFaceValid==false || nDstTxFace!=nFace) { - pPict->WriteUInt16( (sal_uInt16)0x0004 ).WriteUChar( nFace ).WriteUChar( (sal_uInt8)0 ); + pPict->WriteUInt16( (sal_uInt16)0x0004 ).WriteUChar( nFace ).WriteUChar( 0 ); nDstTxFace=nFace; bDstTxFaceValid=true; } @@ -656,20 +656,20 @@ void PictWriter::WriteOpcode_Text(const Point & rPoint, const OUString& rString, } else if (dv==0) { - pPict->WriteUInt16( (sal_uInt16)0x0029 ).WriteUChar( (sal_uInt8)dh ); + pPict->WriteUInt16( (sal_uInt16)0x0029 ).WriteUChar( dh ); } else if (dh==0) { - pPict->WriteUInt16( (sal_uInt16)0x002a ).WriteUChar( (sal_uInt8)dv ); + pPict->WriteUInt16( (sal_uInt16)0x002a ).WriteUChar( dv ); } else { - pPict->WriteUInt16( (sal_uInt16)0x002b ).WriteUChar( (sal_uInt8)dh ).WriteUChar( (sal_uInt8)dv ); + pPict->WriteUInt16( (sal_uInt16)0x002b ).WriteUChar( dh ).WriteUChar( dv ); } WriteString( rString ); if (((pPict->Tell()-nPos)&1)!=0) - pPict->WriteUChar( (sal_uInt8)0 ); + pPict->WriteUChar( 0 ); aDstTextPosition = aPoint; bDstTextPositionValid=true; @@ -697,7 +697,7 @@ void PictWriter::WriteOpcode_FontName(const vcl::Font & rFont) pPict->WriteUInt16( (sal_uInt16)0x002c ).WriteUInt16( nDataLen ).WriteUInt16( nFontId ); WriteString( rFont.GetName() ); if ( ( nFontNameLen & 1 ) == 0 ) - pPict->WriteUChar( (sal_uInt8)0 ); + pPict->WriteUChar( 0 ); } pPict->WriteUInt16( (sal_uInt16)0x0003 ).WriteUInt16( nFontId ); aDstFontName=rFont.GetName(); @@ -955,10 +955,10 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, { // don't pack for ( ny = 0; ny < nHeight; ny++ ) { - pPict->WriteUChar( (sal_uInt8)0 ); - pPict->WriteUChar( (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetRed() ); - pPict->WriteUChar( (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetGreen() ); - pPict->WriteUChar( (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetBlue() ); + pPict->WriteUChar( 0 ); + pPict->WriteUChar( pAcc->GetPixel( ny, 0 ).GetRed() ); + pPict->WriteUChar( pAcc->GetPixel( ny, 0 ).GetGreen() ); + pPict->WriteUChar( pAcc->GetPixel( ny, 0 ).GetBlue() ); // count percentages, Callback, check errors: nActBitmapPercent = ( ny * 70 / nHeight ) + 30; // (30% already added up to the writing of the Win-BMP file) MayCallback(); @@ -990,7 +990,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, if ( nDstRowBytes > 250 ) pPict->WriteUInt16( (sal_uInt16)0 ); else - pPict->WriteUChar( (sal_uInt8)0 ); + pPict->WriteUChar( 0 ); // loop trough components: for ( nc = 0; nc < 4; nc++ ) @@ -1185,7 +1185,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, if ( nDstRowBytes > 250 ) pPict->WriteUInt16( (sal_uInt16)0 ); else - pPict->WriteUChar( (sal_uInt8)0 ); + pPict->WriteUChar( 0 ); // loop trough bytes of the row: nx=0; @@ -1261,7 +1261,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, // Map-Data has to be an even number of bytes: if ( ( ( pPict->Tell() - nDstMapPos ) & 1 ) != 0 ) - pPict->WriteUChar( (sal_uInt8)0 ); + pPict->WriteUChar( 0 ); // counting Bitmaps: nWrittenBitmaps++; diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx index 2018a9df4355..7bfde7bdd4b4 100644 --- a/filter/source/graphicfilter/eppm/eppm.cxx +++ b/filter/source/graphicfilter/eppm/eppm.cxx @@ -126,11 +126,11 @@ bool PPMWriter::ImplWriteHeader() m_rOStm.WriteCharPtr( "P3\x0a" ); ImplWriteNumber( mnWidth ); - m_rOStm.WriteUChar( (sal_uInt8)32 ); + m_rOStm.WriteUChar( 32 ); ImplWriteNumber( mnHeight ); - m_rOStm.WriteUChar( (sal_uInt8)32 ); + m_rOStm.WriteUChar( 32 ); ImplWriteNumber( 255 ); // max. col. - m_rOStm.WriteUChar( (sal_uInt8)10 ); + m_rOStm.WriteUChar( 10 ); } else mbStatus = false; @@ -166,7 +166,7 @@ void PPMWriter::ImplWriteBody() if ( nCount < 0 ) { nCount = 69; - m_rOStm.WriteUChar( (sal_uInt8)10 ); + m_rOStm.WriteUChar( 10 ); } nDat[0] = mpAcc->GetPixel( y, x ).GetRed(); nDat[1] = mpAcc->GetPixel( y, x ).GetGreen(); @@ -176,12 +176,12 @@ void PPMWriter::ImplWriteBody() nNumb = nDat[ i ] / 100; if ( nNumb ) { - m_rOStm.WriteUChar( (sal_uInt8)( nNumb + '0' ) ); + m_rOStm.WriteUChar( ( nNumb + '0' ) ); nDat[ i ] -= ( nNumb * 100 ); nNumb = nDat[ i ] / 10; - m_rOStm.WriteUChar( (sal_uInt8)( nNumb + '0' ) ); + m_rOStm.WriteUChar( ( nNumb + '0' ) ); nDat[ i ] -= ( nNumb * 10 ); - m_rOStm.WriteUChar( (sal_uInt8)( nDat[ i ] + '0' ) ); + m_rOStm.WriteUChar( ( nDat[ i ] + '0' ) ); nCount -= 4; } else @@ -189,21 +189,21 @@ void PPMWriter::ImplWriteBody() nNumb = nDat[ i ] / 10; if ( nNumb ) { - m_rOStm.WriteUChar( (sal_uInt8)( nNumb + '0' ) ); + m_rOStm.WriteUChar( ( nNumb + '0' ) ); nDat[ i ] -= ( nNumb * 10 ); - m_rOStm.WriteUChar( (sal_uInt8)( nDat[ i ] + '0' ) ); + m_rOStm.WriteUChar( ( nDat[ i ] + '0' ) ); nCount -= 3; } else { - m_rOStm.WriteUChar( (sal_uInt8)( nDat[ i ] + '0' ) ); + m_rOStm.WriteUChar( ( nDat[ i ] + '0' ) ); nCount -= 2; } } - m_rOStm.WriteUChar( (sal_uInt8)' ' ); + m_rOStm.WriteUChar( ' ' ); } } - m_rOStm.WriteUChar( (sal_uInt8)10 ); + m_rOStm.WriteUChar( 10 ); } } } diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 28f7fa1afc32..35e5f391242d 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -1537,7 +1537,7 @@ void PSWriter::ImplRect( const Rectangle & rRect ) mpPS->WriteCharPtr( "neg 0 rl " ); ImplClosePathDraw(); } - mpPS->WriteUChar( (sal_uInt8)10 ); + mpPS->WriteUChar( 10 ); mnCursorPos = 0; } @@ -1899,7 +1899,7 @@ void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoi ImplWriteHexByte( pAcc->GetPixelIndex( y, x ) ); } } - mpPS->WriteUChar( (sal_uInt8)10 ); + mpPS->WriteUChar( 10 ); } else // Level 2 { @@ -2238,7 +2238,7 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint ) void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic ) { - mpPS->WriteUChar( (sal_uInt8)'/' ); //convert the font pOriginalName using ISOLatin1Encoding + mpPS->WriteUChar( '/' ); //convert the font pOriginalName using ISOLatin1Encoding mpPS->WriteCharPtr( pOriginalName ); switch ( maFont.GetWeight() ) { @@ -2391,18 +2391,18 @@ inline void PSWriter::ImplExecMode( sal_uLong nMode ) if ( mnCursorPos >= PS_LINESIZE ) { mnCursorPos = 0; - mpPS->WriteUChar( (sal_uInt8)0xa ); + mpPS->WriteUChar( 0xa ); return; } } if ( nMode & PS_SPACE ) { - mpPS->WriteUChar( (sal_uInt8)32 ); + mpPS->WriteUChar( 32 ); mnCursorPos++; } if ( nMode & PS_RET ) { - mpPS->WriteUChar( (sal_uInt8)0xa ); + mpPS->WriteUChar( 0xa ); mnCursorPos = 0; } } @@ -2414,7 +2414,7 @@ inline void PSWriter::ImplWriteLine( const char* pString, sal_uLong nMode ) sal_uLong i = 0; while ( pString[ i ] ) { - mpPS->WriteUChar( (sal_uInt8)pString[ i++ ] ); + mpPS->WriteUChar( pString[ i++ ] ); } mnCursorPos += i; ImplExecMode( nMode ); @@ -2542,7 +2542,7 @@ void PSWriter::ImplWriteDouble( double fNumber, sal_uLong nMode ) if ( nATemp ) { int zCount = 0; - mpPS->WriteUChar( (sal_uInt8)'.' ); + mpPS->WriteUChar( '.' ); mnCursorPos++; const OString aNumber2(OString::number(nATemp)); @@ -2552,7 +2552,7 @@ void PSWriter::ImplWriteDouble( double fNumber, sal_uLong nMode ) mnCursorPos += 6 - nLen; for ( n = 0; n < ( 5 - nLen ); n++ ) { - mpPS->WriteUChar( (sal_uInt8)'0' ); + mpPS->WriteUChar( '0' ); } } mnCursorPos += nLen; @@ -2577,7 +2577,7 @@ void PSWriter::ImplWriteF( sal_Int32 nNumber, sal_uLong nCount, sal_uLong nMode { if ( nNumber < 0 ) { - mpPS->WriteUChar( (sal_uInt8)'-' ); + mpPS->WriteUChar( '-' ); nNumber = -nNumber; mnCursorPos++; } @@ -2586,15 +2586,15 @@ void PSWriter::ImplWriteF( sal_Int32 nNumber, sal_uLong nCount, sal_uLong nMode long nStSize = ( nCount + 1 ) - nLen; if ( nStSize >= 1 ) { - mpPS->WriteUChar( (sal_uInt8)'0' ); + mpPS->WriteUChar( '0' ); mnCursorPos++; } if ( nStSize >= 2 ) { - mpPS->WriteUChar( (sal_uInt8)'.' ); + mpPS->WriteUChar( '.' ); for ( long i = 1; i < nStSize; i++ ) { - mpPS->WriteUChar( (sal_uInt8)'0' ); + mpPS->WriteUChar( '0' ); mnCursorPos++; } } @@ -2603,7 +2603,7 @@ void PSWriter::ImplWriteF( sal_Int32 nNumber, sal_uLong nCount, sal_uLong nMode { if ( n == nLen - nCount ) { - mpPS->WriteUChar( (sal_uInt8)'.' ); + mpPS->WriteUChar( '.' ); mnCursorPos++; } mpPS->WriteChar( aScaleFactor[n] ); @@ -2625,14 +2625,14 @@ void PSWriter::ImplWriteByte( sal_uInt8 nNumb, sal_uLong nMode ) void PSWriter::ImplWriteHexByte( sal_uInt8 nNumb, sal_uLong nMode ) { if ( ( nNumb >> 4 ) > 9 ) - mpPS->WriteUChar( (sal_uInt8)( ( nNumb >> 4 ) + 'A' - 10 ) ); + mpPS->WriteUChar( ( ( nNumb >> 4 ) + 'A' - 10 ) ); else - mpPS->WriteUChar( (sal_uInt8)( ( nNumb >> 4 ) + '0' ) ); + mpPS->WriteUChar( ( ( nNumb >> 4 ) + '0' ) ); if ( ( nNumb & 0xf ) > 9 ) - mpPS->WriteUChar( (sal_uInt8)( ( nNumb & 0xf ) + 'A' - 10 ) ); + mpPS->WriteUChar( ( ( nNumb & 0xf ) + 'A' - 10 ) ); else - mpPS->WriteUChar( (sal_uInt8)( ( nNumb & 0xf ) + '0' ) ); + mpPS->WriteUChar( ( ( nNumb & 0xf ) + '0' ) ); mnCursorPos += 2; ImplExecMode( nMode ); } diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx index d9bf00f4c997..8b230668faf5 100644 --- a/filter/source/graphicfilter/eras/eras.cxx +++ b/filter/source/graphicfilter/eras/eras.cxx @@ -249,15 +249,15 @@ void RASWriter::ImplPutByte( sal_uInt8 nPutThis ) { if ( mnRepCount == 0 ) { - m_rOStm.WriteUChar( (sal_uInt8)mnRepVal ); + m_rOStm.WriteUChar( mnRepVal ); if ( mnRepVal == 0x80 ) - m_rOStm.WriteUChar( (sal_uInt8)0 ); + m_rOStm.WriteUChar( 0 ); } else { - m_rOStm.WriteUChar( (sal_uInt8)0x80 ); - m_rOStm.WriteUChar( (sal_uInt8)mnRepCount ); - m_rOStm.WriteUChar( (sal_uInt8)mnRepVal ); + m_rOStm.WriteUChar( 0x80 ); + m_rOStm.WriteUChar( mnRepCount ); + m_rOStm.WriteUChar( mnRepVal ); } mnRepVal = nPutThis; mnRepCount = 0; diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx index 5bc8fa1408f0..031918bec64a 100644 --- a/filter/source/graphicfilter/etiff/etiff.cxx +++ b/filter/source/graphicfilter/etiff/etiff.cxx @@ -506,13 +506,13 @@ inline void TIFFWriter::WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen ) nOffset -= nCodeLen; while ( nOffset < 24 ) { - m_rOStm.WriteUChar( (sal_uInt8)( dwShift >> 24 ) ); + m_rOStm.WriteUChar( ( dwShift >> 24 ) ); dwShift <<= 8; nOffset += 8; } if ( nCode == 257 && nOffset != 32 ) { - m_rOStm.WriteUChar( (sal_uInt8)( dwShift >> 24 ) ); + m_rOStm.WriteUChar( ( dwShift >> 24 ) ); } } diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx index 3bc25d585329..3b5fd5bd1c33 100644 --- a/filter/source/graphicfilter/expm/expm.cxx +++ b/filter/source/graphicfilter/expm/expm.cxx @@ -154,11 +154,11 @@ bool XPMWriter::ImplWriteHeader() { m_rOStm.WriteCharPtr( "/* XPM */\x0astatic char * image[] = \x0a{\x0a\x22" ); ImplWriteNumber( mnWidth ); - m_rOStm.WriteUChar( (sal_uInt8)32 ); + m_rOStm.WriteUChar( 32 ); ImplWriteNumber( mnHeight ); - m_rOStm.WriteUChar( (sal_uInt8)32 ); + m_rOStm.WriteUChar( 32 ); ImplWriteNumber( mnColors ); - m_rOStm.WriteUChar( (sal_uInt8)32 ); + m_rOStm.WriteUChar( 32 ); ImplWriteNumber( ( mnColors > 26 ) ? 2 : 1 ); m_rOStm.WriteCharPtr( "\x22,\x0a" ); } @@ -178,7 +178,7 @@ void XPMWriter::ImplWritePalette() { m_rOStm.WriteCharPtr( "\x22" ); ImplWritePixel( i ); - m_rOStm.WriteUChar( (sal_uInt8)32 ); + m_rOStm.WriteUChar( 32 ); if ( nTransIndex != i ) { ImplWriteColor( i ); @@ -196,7 +196,7 @@ void XPMWriter::ImplWriteBody() for ( sal_uLong y = 0; y < mnHeight; y++ ) { ImplCallback( (sal_uInt16)( ( 100 * y ) / mnHeight ) ); // processing output in percent - m_rOStm.WriteUChar( (sal_uInt8)0x22 ); + m_rOStm.WriteUChar( 0x22 ); for ( sal_uLong x = 0; x < mnWidth; x++ ) { ImplWritePixel( mpAcc->GetPixelIndex( y, x ) ); @@ -221,11 +221,11 @@ void XPMWriter::ImplWritePixel( sal_uLong nCol ) const if ( mnColors > 26 ) { sal_uInt8 nDiff = (sal_uInt8) ( nCol / 26 ); - m_rOStm.WriteUChar( (sal_uInt8)( nDiff + 'A' ) ); - m_rOStm.WriteUChar( (sal_uInt8)( nCol - ( nDiff*26 ) + 'A' ) ); + m_rOStm.WriteUChar( ( nDiff + 'A' ) ); + m_rOStm.WriteUChar( ( nCol - ( nDiff*26 ) + 'A' ) ); } else - m_rOStm.WriteUChar( (sal_uInt8)( nCol + 'A' ) ); + m_rOStm.WriteUChar( ( nCol + 'A' ) ); } diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index da4e6aa8026f..e322d7f32d31 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -4166,16 +4166,16 @@ void EscherBlibEntry::WriteBlibEntry( SvStream& rSt, bool bWritePictureOffset, s rSt.WriteUInt32( (sal_uInt32)( ( ESCHER_BSE << 16 ) | ( ( (sal_uInt16)meBlibType << 4 ) | 2 ) ) ) .WriteUInt32( (sal_uInt32)( 36 + nResize ) ) - .WriteUChar( (sal_uInt8)meBlibType ); + .WriteUChar( meBlibType ); switch ( meBlibType ) { case EMF : case WMF : // converting EMF/WMF on OS2 to Pict - rSt.WriteUChar( (sal_uInt8)PICT ); + rSt.WriteUChar( PICT ); break; default: - rSt.WriteUChar( (sal_uInt8)meBlibType ); + rSt.WriteUChar( meBlibType ); } rSt.Write( &mnIdentifier[ 0 ], 16 ); @@ -4500,7 +4500,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( (sal_uInt32)( p_EscherBlibEntry->mnSize + nExtra ) ); rPicOutStrm.Write( p_EscherBlibEntry->mnIdentifier, 16 ); - rPicOutStrm.WriteUChar( (sal_uInt8)0xff ); + rPicOutStrm.WriteUChar( 0xff ); rPicOutStrm.Write( pGraphicAry, p_EscherBlibEntry->mnSize ); } else diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index b24f79544d32..6619be682015 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -98,11 +98,11 @@ SvStream& WriteSvVersion(SvStream & rStm, const SvVersion & r ) int n = r.GetMajorVersion() << 4; n |= r.GetMinorVersion(); - rStm.WriteUChar( (sal_uInt8)n ); + rStm.WriteUChar( n ); } else { - rStm.WriteUChar( (sal_uInt8)0 ); + rStm.WriteUChar( 0 ); rStm.WriteUInt16( r.GetMajorVersion() ); rStm.WriteUInt16( r.GetMinorVersion() ); } diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 19d5dfd3094b..9a18686f3514 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -1084,8 +1084,8 @@ bool ScAutoFormat::Save() // Attention: A common header has to be saved sal_uInt16 nVal = AUTOFORMAT_ID; rStream.WriteUInt16( nVal ) - .WriteUChar( (sal_uInt8)2 ) // Number of chars of the header including this - .WriteUChar( (sal_uInt8)::GetSOStoreTextEncoding( + .WriteUChar( 2 ) // Number of chars of the header including this + .WriteUChar( ::GetSOStoreTextEncoding( osl_getThreadTextEncoding() ) ); m_aVersions.Write(rStream, fileVersion); diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 421bf4d96bee..2f5ff173db2c 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -265,7 +265,7 @@ bool ScImportExport::ExportData( const OUString& rMimeType, if( ExportStream( aStrm, OUString(), SotExchange::GetFormatIdFromMimeType( rMimeType ) )) { - aStrm.WriteUChar( (sal_uInt8) 0 ); + aStrm.WriteUChar( 0 ); rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( (sal_Int8*)aStrm.GetData(), aStrm.Seek( STREAM_SEEK_TO_END ) ); diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 1af0ef152396..ae0fda8c4800 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -276,7 +276,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ .WriteUChar( nTransitionType ) .WriteUInt16( nBuildFlags ) .WriteUChar( nSpeed ) - .WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ); + .WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ); } ImplCreateHeaderFooters( mXPagePropSet ); @@ -363,7 +363,7 @@ void PPTWriter::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertyS mpPptEscherEx->OpenContainer( EPP_MainMaster ); mpPptEscherEx->AddAtom( 24, EPP_SlideAtom, 2 ); mpStrm->WriteInt32( (sal_Int32)EPP_LAYOUT_TITLEANDBODYSLIDE ) // slide layout -> title and body slide - .WriteUChar( (sal_uInt8)1 ).WriteUChar( (sal_uInt8)2 ).WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ) // placeholderID + .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) .WriteUInt16( (sal_uInt16)0 ) // Bit 1: Follow master objects, Bit 2: Follow master scheme, Bit 3: Follow master background @@ -479,14 +479,14 @@ bool PPTWriter::ImplCreateCurrentUserStream() mpCurUserStrm->WriteUInt32( (sal_uInt32)0x0 ) // OffsetToCurrentEdit; .WriteUInt16( (sal_uInt16)nLenOfUserName ) .WriteUInt16( (sal_uInt16)0x3f4 ) // DocFileVersion - .WriteUChar( (sal_uInt8)3 ) // MajorVersion - .WriteUChar( (sal_uInt8)0 ) // MinorVersion + .WriteUChar( 3 ) // MajorVersion + .WriteUChar( 0 ) // MinorVersion .WriteUInt16( (sal_uInt16)0 ); // Pad Word pUserName[ nLenOfUserName ] = 8; mpCurUserStrm->Write( pUserName, nLenOfUserName + 1 ); for ( sal_uInt32 i = 0x15 + nLenOfUserName; i < nSizeOfRecord; i++ ) { - mpCurUserStrm->WriteUChar( (sal_uInt8)0 ); // pad bytes + mpCurUserStrm->WriteUChar( 0 ); // pad bytes } mpCurUserStrm->Seek( nEditPos ); return true; @@ -692,10 +692,10 @@ bool PPTWriter::ImplCreateDocument() .WriteUInt32( (sal_uInt32)0 ) // Reference to HandoutMaster ( 0 if none ); .WriteInt16( (sal_Int16)1 ) // Number of the first slide; .WriteUInt16( nSlideType ) // Size of the document slides ( default: EPP_SLIDESIZETYPEONSCREEN ) - .WriteUChar( (sal_uInt8)0 ) // bool1 indicates if document was saved with embedded true type fonts - .WriteUChar( (sal_uInt8)0 ) // bool1 indicates if the placeholders on the title slide are omitted - .WriteUChar( (sal_uInt8)0 ) // bool1 right to left ( flag for Bidi version ) - .WriteUChar( (sal_uInt8)1 ); // bool1 visibility of comments shapes + .WriteUChar( 0 ) // bool1 indicates if document was saved with embedded true type fonts + .WriteUChar( 0 ) // bool1 indicates if the placeholders on the title slide are omitted + .WriteUChar( 0 ) // bool1 right to left ( flag for Bidi version ) + .WriteUChar( 1 ); // bool1 visibility of comments shapes mpPptEscherEx->PtInsert( EPP_Persist_Document, mpStrm->Tell() ); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 09aad261964d..254120f82999 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -202,8 +202,8 @@ sal_uInt32 PPTWriter::ImplSlideViewInfoContainer( sal_uInt32 nInstance, SvStream .WriteInt32( nScaling ).WriteInt32( (sal_Int32)100 ).WriteInt32( nScaling ).WriteInt32( (sal_Int32)100 ) // scaling atom - Keeps the previous scale .WriteInt32( (sal_Int32)0x17ac ).WriteInt32( nMasterCoordinate )// Origin - Keeps the origin in master coordinates .WriteInt32( nXOrigin ).WriteInt32( nYOrigin ) // Origin - .WriteUChar( (sal_uInt8)1 ) // Bool1 varScale - Set if zoom to fit is set - .WriteUChar( (sal_uInt8)0 ) // bool1 draftMode - Not used + .WriteUChar( 1 ) // Bool1 varScale - Set if zoom to fit is set + .WriteUChar( 0 ) // bool1 draftMode - Not used .WriteUInt16( (sal_uInt16)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. @@ -226,8 +226,8 @@ sal_uInt32 PPTWriter::ImplOutlineViewInfoContainer( SvStream* pStrm ) .WriteInt32( (sal_Int32)170 ).WriteInt32( (sal_Int32)200 ).WriteInt32( (sal_Int32)170 ).WriteInt32( (sal_Int32)200 ) // scaling atom - Keeps the previous scale .WriteInt32( (sal_Int32)0x17ac ).WriteInt32( (sal_Int32)0xdda ) // Origin - Keeps the origin in master coordinates .WriteInt32( (sal_Int32)-780 ).WriteInt32( (sal_Int32)-84 ) // Origin - .WriteUChar( (sal_uInt8)1 ) // bool1 varScale - Set if zoom to fit is set - .WriteUChar( (sal_uInt8)0 ) // bool1 draftMode - Not used + .WriteUChar( 1 ) // bool1 varScale - Set if zoom to fit is set + .WriteUChar( 0 ) // bool1 draftMode - Not used .WriteUInt16( (sal_uInt16)0 ); // padword } return nSize; @@ -533,8 +533,8 @@ bool PPTWriter::ImplCloseDocument() mpPptEscherEx->AddAtom( 10, EPP_TxSIStyleAtom ); mpStrm->WriteUInt32( (sal_uInt32)7 ) // ? .WriteInt16( (sal_Int16)2 ) // ? - .WriteUChar( (sal_uInt8)9 ) // ? - .WriteUChar( (sal_uInt8)8 ) // ? + .WriteUChar( 9 ) // ? + .WriteUChar( 8 ) // ? .WriteInt16( (sal_Int16)0 ); // ? mpStrm->Write( aTxMasterStyleAtomStrm.GetData(), aTxMasterStyleAtomStrm.Tell() ); @@ -1112,8 +1112,8 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u { rOut.WriteUInt32( (sal_uInt32)( EPP_DateTimeMCAtom << 16 ) ).WriteUInt32( (sal_uInt32)8 ) .WriteUInt32( (sal_uInt32)( pFieldEntry->nFieldStartPos ) ) // TxtOffset to TxtField; - .WriteUChar( (sal_uInt8)( pFieldEntry->nFieldType & 0xff ) ) // Type - .WriteUChar( (sal_uInt8)0 ).WriteUInt16( (sal_uInt16)0 ); // PadBytes + .WriteUChar( ( pFieldEntry->nFieldType & 0xff ) ) // Type + .WriteUChar( 0 ).WriteUInt16( (sal_uInt16)0 ); // PadBytes } break; case 3 : @@ -1166,12 +1166,12 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u .WriteUInt32( (sal_uInt32)( EPP_InteractiveInfoAtom << 16 ) ).WriteUInt32( (sal_uInt32)16 ) .WriteUInt32( (sal_uInt32)0 ) // soundref .WriteUInt32( nHyperId ) // hyperlink id - .WriteUChar( (sal_uInt8)4 ) // hyperlink action - .WriteUChar( (sal_uInt8)0 ) // ole verb - .WriteUChar( (sal_uInt8)0 ) // jump - .WriteUChar( (sal_uInt8)0 ) // flags - .WriteUChar( (sal_uInt8)8 ) // hyperlink type ? - .WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ) + .WriteUChar( 4 ) // hyperlink action + .WriteUChar( 0 ) // ole verb + .WriteUChar( 0 ) // jump + .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 ) ); @@ -2116,8 +2116,8 @@ bool PPTWriter::ImplCreatePresentationPlaceholder( const bool bMasterPage, const mpPptEscherEx->OpenContainer( ESCHER_ClientData ); mpPptEscherEx->AddAtom( 8, EPP_OEPlaceholderAtom ); mpStrm->WriteUInt32( (sal_uInt32)0 ) // PlacementID - .WriteUChar( (sal_uInt8)nPlaceHolderId ) // PlaceHolderID - .WriteUChar( (sal_uInt8)0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) + .WriteUChar( nPlaceHolderId ) // PlaceHolderID + .WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) .WriteUInt16( (sal_uInt16)0 ); // padword mpPptEscherEx->CloseContainer(); // ESCHER_ClientData @@ -2814,8 +2814,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a mpPptEscherEx->OpenContainer( ESCHER_ClientData ); mpPptEscherEx->AddAtom( 8, EPP_OEPlaceholderAtom ); mpStrm->WriteUInt32( (sal_uInt32)0 ) // PlacementID - .WriteUChar( (sal_uInt8)EPP_PLACEHOLDER_MASTERTITLE ) // PlaceHolderID - .WriteUChar( (sal_uInt8)0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) + .WriteUChar( EPP_PLACEHOLDER_MASTERTITLE ) // PlaceHolderID + .WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) .WriteUInt16( (sal_uInt16)0 ); // padword mpPptEscherEx->CloseContainer(); // ESCHER_ClientData mpPptEscherEx->OpenContainer( ESCHER_ClientTextbox ); @@ -2908,7 +2908,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a sal_uInt8 PlaceHolderID = ( mType == "presentation.Subtitle") ? EPP_PLACEHOLDER_MASTERSUBTITLE:EPP_PLACEHOLDER_MASTERBODY; mpStrm->WriteUInt32( (sal_uInt32)1 ) // PlacementID .WriteUChar( PlaceHolderID )/*(sal_uInt8)EPP_PLACEHOLDER_MASTERBODY */ // PlaceHolderID - .WriteUChar( (sal_uInt8)0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) + .WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) .WriteUInt16( (sal_uInt16)0 ); // padword mpPptEscherEx->CloseContainer(); // ESCHER_ClientData mpPptEscherEx->OpenContainer( ESCHER_ClientTextbox ); // printf @@ -3016,10 +3016,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a .WriteUInt32( (sal_uInt32)0 ) // follow colorscheme : 0->do not follow // 1->follow collorscheme // 2->follow text and background scheme - .WriteUChar( (sal_uInt8)1 ) // (bool)set if embedded server can not be locked - .WriteUChar( (sal_uInt8)0 ) // (bool)do not need to send dimension - .WriteUChar( (sal_uInt8)0 ) // (bool)is object a world table - .WriteUChar( (sal_uInt8)0 ); // pad byte + .WriteUChar( 1 ) // (bool)set if embedded server can not be locked + .WriteUChar( 0 ) // (bool)do not need to send dimension + .WriteUChar( 0 ) // (bool)is object a world table + .WriteUChar( 0 ); // pad byte PPTExOleObjEntry* pE = new PPTExOleObjEntry( NORMAL_OLE_OBJECT, mpExEmbed->Tell() ); pE->xShape = mXShape; @@ -3182,10 +3182,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a .WriteUInt32( (sal_uInt32)16 ) .WriteUInt32( (sal_uInt32) 0 ) .WriteUInt32( (sal_uInt32) 0 ) - .WriteUChar( (sal_uInt8) 6 ) - .WriteUChar( (sal_uInt8) 0 ) - .WriteUChar( (sal_uInt8) 0 ) - .WriteUChar( (sal_uInt8) 0 ) + .WriteUChar( 6 ) + .WriteUChar( 0 ) + .WriteUChar( 0 ) + .WriteUChar( 0 ) .WriteUInt32( (sal_uInt32) 0 ); } } @@ -3250,8 +3250,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a pClientData->WriteUInt32( (sal_uInt32)( EPP_OEPlaceholderAtom << 16 ) ).WriteUInt32( (sal_uInt32)8 ) .WriteInt32( nPlacementID ) // PlacementID - .WriteUChar( (sal_uInt8)nPlaceHolderAtom ) // PlaceHolderID - .WriteUChar( (sal_uInt8)0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) + .WriteUChar( nPlaceHolderAtom ) // PlaceHolderID + .WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) .WriteUInt16( (sal_uInt16)0 ); // padword } if ( nOlePictureId ) diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx index ebb1a04d1675..6669867defa3 100644 --- a/sot/source/sdstor/stgole.cxx +++ b/sot/source/sdstor/stgole.cxx @@ -153,7 +153,7 @@ bool StgCompObjStream::Store() WriteClsId( *this, aClsId ); // Class ID WriteInt32( (sal_Int32) (aAsciiUserName.getLength() + 1) ); WriteCharPtr( (const char *)aAsciiUserName.getStr() ); - WriteUChar( (sal_uInt8) 0 ); // string terminator + WriteUChar( 0 ); // string terminator WriteClipboardFormat( *this, nCbFormat ); WriteInt32( (sal_Int32) 0 ); // terminator Commit(); diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx index 2d53d3029301..74e819e8c596 100644 --- a/sot/source/sdstor/storinfo.cxx +++ b/sot/source/sdstor/storinfo.cxx @@ -74,7 +74,7 @@ void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat ) RTL_TEXTENCODING_ASCII_US)); rStm.WriteInt32( (sal_Int32) (aAsciiCbFmt.getLength() + 1) ); rStm.WriteCharPtr( (const char *)aAsciiCbFmt.getStr() ); - rStm.WriteUChar( (sal_uInt8) 0 ); + rStm.WriteUChar( 0 ); } else if( nFormat ) { diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx index 45cb60b6cc41..409388609d8f 100644 --- a/svx/source/items/pageitem.cxx +++ b/svx/source/items/pageitem.cxx @@ -248,7 +248,7 @@ SvStream& SvxPageItem::Store( SvStream &rStrm, sal_uInt16 /*nItemVersion*/ ) con // UNICODE: rStrm << aDescName; rStrm.WriteUniOrByteString(aDescName, rStrm.GetStreamCharSet()); - rStrm.WriteUChar( (sal_uInt8)eNumType ).WriteUChar( bLandscape ).WriteUInt16( eUse ); + rStrm.WriteUChar( eNumType ).WriteUChar( bLandscape ).WriteUInt16( eUse ); return rStrm; } diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 927ac9a23fc3..c95b8f48460f 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -1201,8 +1201,8 @@ bool SwTableAutoFmtTbl::Save( SvStream& rStream ) const // Attention: We need to save a general Header here sal_uInt16 nVal = AUTOFORMAT_ID; rStream.WriteUInt16( nVal ) - .WriteUChar( (sal_uInt8)2 ) // Character count of the Header including this value - .WriteUChar( (sal_uInt8)GetStoreCharSet( ::osl_getThreadTextEncoding() ) ); + .WriteUChar( 2 ) // Character count of the Header including this value + .WriteUChar( GetStoreCharSet( ::osl_getThreadTextEncoding() ) ); bRet = 0 == rStream.GetError(); if (!bRet) diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 2ec213d99695..48901579e224 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -2328,7 +2328,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, for ( i = 0; i < aStrArr.size(); ++i ) { const OUString& sAuthor = aStrArr[i].first; - rWrt.pTableStrm->WriteUChar( (sal_uInt8)sAuthor.getLength() ); + rWrt.pTableStrm->WriteUChar( sAuthor.getLength() ); SwWW8Writer::WriteString8(*rWrt.pTableStrm, sAuthor, false, RTL_TEXTENCODING_MS_1252); } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index fa6100237ea2..6997c553ebdd 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1589,7 +1589,7 @@ void WW8Export::WriteAsStringTable(const std::vector<OUString>& rStrings, { const OUString &rString = rStrings[n]; const OUString aNm(rString.copy(0, std::min<sal_Int32>(rString.getLength(), 255))); - rStrm.WriteUChar( (sal_uInt8)aNm.getLength() ); + rStrm.WriteUChar( aNm.getLength() ); SwWW8Writer::WriteString8(rStrm, aNm, false, RTL_TEXTENCODING_MS_1252); if (nExtraLen) @@ -1796,7 +1796,7 @@ void WW8Export::WriteChar( sal_Unicode c ) if( pPiece->IsUnicode() ) Strm().WriteUInt16( c ); else - Strm().WriteUChar( (sal_uInt8)c ); + Strm().WriteUChar( c ); } void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd ) diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index 9d47d5daa638..fad72e8fd029 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -708,7 +708,7 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd, WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight, rGrfNd.GetpSwAttrSet()); - rStrm.WriteUChar( (sal_uInt8)aFileN.getLength() ); // write Pascal-String + rStrm.WriteUChar( aFileN.getLength() ); // write Pascal-String SwWW8Writer::WriteString8(rStrm, aFileN, false, RTL_TEXTENCODING_MS_1252); } diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx index cf8b25b60454..2ba375f6ed16 100644 --- a/sw/source/uibase/config/uinums.cxx +++ b/sw/source/uibase/config/uinums.cxx @@ -112,11 +112,11 @@ bool SwBaseNumRules::Store(SvStream &rStream) { if(pNumRules[i]) { - rStream.WriteUChar( (unsigned char) sal_True ); + rStream.WriteUChar( sal_True ); pNumRules[i]->Store( rStream ); } else - rStream.WriteUChar( (unsigned char) sal_False ); + rStream.WriteUChar( sal_False ); } return true; } diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx index c83f30622f42..7ef8aa808ec6 100644 --- a/tools/source/ref/pstm.cxx +++ b/tools/source/ref/pstm.cxx @@ -50,7 +50,7 @@ TYPEINIT0( SvRttiBase ); void TOOLS_DLLPUBLIC WritePersistListObjects(const SvPersistListWriteable& rList, SvPersistStream & rStm, bool bOnlyStreamed ) { #ifdef STOR_NO_OPTIMIZE - rStm.WriteUChar( (sal_uInt8)(PERSIST_LIST_VER | PERSIST_LIST_DBGUTIL) ); + rStm.WriteUChar( (PERSIST_LIST_VER | PERSIST_LIST_DBGUTIL) ); sal_uInt32 nObjPos = rStm.WriteDummyLen(); #else sal_uInt8 bTmp = PERSIST_LIST_VER; @@ -313,24 +313,24 @@ void SvPersistStream::WriteCompressed( SvStream & rStm, sal_uInt32 nVal ) { #ifdef STOR_NO_OPTIMIZE if( nVal < 0x80 ) - rStm.WriteUChar( (sal_uInt8)(LEN_1 | nVal) ); + rStm.WriteUChar( (LEN_1 | nVal) ); else if( nVal < 0x4000 ) { - rStm.WriteUChar( (sal_uInt8)(LEN_2 | (nVal >> 8)) ); - rStm.WriteUChar( (sal_uInt8)nVal ); + rStm.WriteUChar( (LEN_2 | (nVal >> 8)) ); + rStm.WriteUChar( nVal ); } else if( nVal < 0x20000000 ) { // highest sal_uInt8 - rStm.WriteUChar( (sal_uInt8)(LEN_4 | (nVal >> 24)) ); + rStm.WriteUChar( (LEN_4 | (nVal >> 24)) ); // 2nd highest sal_uInt8 - rStm.WriteUChar( (sal_uInt8)(nVal >> 16) ); + rStm.WriteUChar( (nVal >> 16) ); rStm.WriteUInt16( (sal_uInt16)(nVal) ); } else #endif { - rStm.WriteUChar( (sal_uInt8)LEN_5 ); + rStm.WriteUChar( LEN_5 ); rStm.WriteUInt32( nVal ); } } @@ -446,12 +446,12 @@ static void WriteId { if( (nHdr & P_OBJ) || nId != 0 ) { // Id set only for pointers or DBGUTIL - rStm.WriteUChar( (sal_uInt8)(nHdr) ); + rStm.WriteUChar( (nHdr) ); SvPersistStream::WriteCompressed( rStm, nId ); } else { // NULL Pointer - rStm.WriteUChar( (sal_uInt8)(nHdr | P_ID_0) ); + rStm.WriteUChar( (nHdr | P_ID_0) ); return; } } diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index f764fca14069..ade474752a08 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -423,7 +423,7 @@ void EMFWriter::ImplEndRecord() m_rStm.WriteUInt32( (sal_uInt32)( ( nActPos - mnRecordPos ) + nFillBytes ) ); m_rStm.Seek( nActPos ); while( nFillBytes-- ) - m_rStm.WriteUChar( (sal_uInt8)0 ); + m_rStm.WriteUChar( 0 ); mnRecordCount++; mbRecordOpen = false; } @@ -530,11 +530,11 @@ void EMFWriter::ImplCheckTextAttr() } m_rStm.WriteInt32( nWeight ); - m_rStm.WriteUChar( (sal_uInt8) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 ) ); - m_rStm.WriteUChar( (sal_uInt8) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 ) ); - m_rStm.WriteUChar( (sal_uInt8) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 ) ); - m_rStm.WriteUChar( (sal_uInt8) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 ) ); - m_rStm.WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ); + m_rStm.WriteUChar( ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 ) ); + m_rStm.WriteUChar( ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 ) ); + m_rStm.WriteUChar( ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 ) ); + m_rStm.WriteUChar( ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 ) ); + m_rStm.WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ); switch( rFont.GetPitch() ) { @@ -576,7 +576,7 @@ void EMFWriter::ImplCheckTextAttr() m_rStm.WriteUInt32( (sal_uInt32) 0 ); // dummy elfPanose - m_rStm.WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ).WriteUChar( (sal_uInt8) 0 ); + m_rStm.WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ); // fill record to get a record size divideable by 4 m_rStm.WriteUInt16( (sal_uInt16) 0 ); diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index 164bfecb5f16..9389fdc63f66 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -1191,8 +1191,8 @@ bool EnhWMFReader::ReadEnhWMF() char* pBuf = new char[ nSize ]; SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); aTmp.ObjectOwnsMemory( true ); - aTmp.WriteUChar( (sal_uInt8)'B' ) - .WriteUChar( (sal_uInt8)'M' ) + aTmp.WriteUChar( 'B' ) + .WriteUChar( 'M' ) .WriteUInt32( (sal_uInt32)cbBitsSrc ) .WriteUInt16( (sal_uInt16)0 ) .WriteUInt16( (sal_uInt16)0 ) @@ -1255,8 +1255,8 @@ bool EnhWMFReader::ReadEnhWMF() char* pBuf = new char[ nSize ]; SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); aTmp.ObjectOwnsMemory( true ); - aTmp.WriteUChar( (sal_uInt8)'B' ) - .WriteUChar( (sal_uInt8)'M' ) + aTmp.WriteUChar( 'B' ) + .WriteUChar( 'M' ) .WriteUInt32( (sal_uInt32)cbBitsSrc ) .WriteUInt16( (sal_uInt16)0 ) .WriteUInt16( (sal_uInt16)0 ) @@ -1325,8 +1325,8 @@ bool EnhWMFReader::ReadEnhWMF() char* pBuf = new char[ nSize ]; SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); aTmp.ObjectOwnsMemory( true ); - aTmp.WriteUChar( (sal_uInt8)'B' ) - .WriteUChar( (sal_uInt8)'M' ) + aTmp.WriteUChar( 'B' ) + .WriteUChar( 'M' ) .WriteUInt32( (sal_uInt32)cbBitsSrc ) .WriteUInt16( (sal_uInt16)0 ) .WriteUInt16( (sal_uInt16)0 ) @@ -1565,8 +1565,8 @@ bool EnhWMFReader::ReadEnhWMF() SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); aTmp.ObjectOwnsMemory( true ); - aTmp.WriteUChar( (sal_uInt8)'B' ) - .WriteUChar( (sal_uInt8)'M' ) + aTmp.WriteUChar( 'B' ) + .WriteUChar( 'M' ) .WriteUInt32( (sal_uInt32)cbBits ) .WriteUInt16( (sal_uInt16)0 ) .WriteUInt16( (sal_uInt16)0 ) diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 9e6c814da683..3e10281d8b83 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -246,7 +246,7 @@ void WMFWriter::WriteRectangle(const Rectangle & rRect) void WMFWriter::WriteColor(const Color & rColor) { - pWMF->WriteUChar( (sal_uInt8) rColor.GetRed() ).WriteUChar( (sal_uInt8) rColor.GetGreen() ).WriteUChar( (sal_uInt8) rColor.GetBlue() ).WriteUChar( (sal_uInt8) 0 ); + pWMF->WriteUChar( rColor.GetRed() ).WriteUChar( rColor.GetGreen() ).WriteUChar( rColor.GetBlue() ).WriteUChar( 0 ); } void WMFWriter::WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType) @@ -263,7 +263,7 @@ void WMFWriter::UpdateRecordHeader() nPos=pWMF->Tell(); nSize=nPos-nActRecordPos; if ((nSize & 1)!=0) { - pWMF->WriteUChar( (sal_uInt8)0 ); + pWMF->WriteUChar( 0 ); nPos++; nSize++; } nSize/=2; @@ -326,9 +326,9 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const vcl::Font & rFont) } pWMF->WriteUInt16( nWeight ); - if (rFont.GetItalic()==ITALIC_NONE) pWMF->WriteUChar( (sal_uInt8)0 ); else pWMF->WriteUChar( (sal_uInt8)1 ); - if (rFont.GetUnderline()==UNDERLINE_NONE) pWMF->WriteUChar( (sal_uInt8)0 ); else pWMF->WriteUChar( (sal_uInt8)1 ); - if (rFont.GetStrikeout()==STRIKEOUT_NONE) pWMF->WriteUChar( (sal_uInt8)0 ); else pWMF->WriteUChar( (sal_uInt8)1 ); + if (rFont.GetItalic()==ITALIC_NONE) pWMF->WriteUChar( 0 ); else pWMF->WriteUChar( 1 ); + if (rFont.GetUnderline()==UNDERLINE_NONE) pWMF->WriteUChar( 0 ); else pWMF->WriteUChar( 1 ); + if (rFont.GetStrikeout()==STRIKEOUT_NONE) pWMF->WriteUChar( 0 ); else pWMF->WriteUChar( 1 ); rtl_TextEncoding eFontNameEncoding = rFont.GetCharSet(); sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding( eFontNameEncoding ); @@ -338,7 +338,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const vcl::Font & rFont) nCharSet = W_ANSI_CHARSET; pWMF->WriteUChar( nCharSet ); - pWMF->WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ).WriteUChar( (sal_uInt8)0 ); + pWMF->WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ); switch (rFont.GetPitch()) { case PITCH_FIXED: nPitchFamily=W_FIXED_PITCH; break; @@ -432,7 +432,7 @@ void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_In .WriteUInt32( (sal_uInt32)nEsc ); // escape number pWMF->Write( pData, nLen ); if ( nLen & 1 ) - pWMF->WriteUChar( (sal_uInt8)0 ); // pad byte + pWMF->WriteUChar( 0 ); // pad byte } /* if return value is true, then a complete unicode string and also a polygon replacement has been written, @@ -561,7 +561,7 @@ void WMFWriter::TrueExtTextOut( const Point& rPoint, const OUString& rString, pWMF->WriteUInt16( nNewTextLen ).WriteUInt16( (sal_uInt16)0 ); write_uInt8s_FromOString(*pWMF, rByteString, nNewTextLen); if ( nNewTextLen & 1 ) - pWMF->WriteUChar( (sal_uInt8)0 ); + pWMF->WriteUChar( 0 ); sal_Int32 nOriginalTextLen = rString.getLength(); boost::scoped_array<sal_Int16> pConvertedDXAry(new sal_Int16[ nOriginalTextLen ]); @@ -824,7 +824,7 @@ void WMFWriter::TrueTextOut(const Point & rPoint, const OString& rString) write_uInt16_lenPrefixed_uInt8s_FromOString(*pWMF, rString); sal_Int32 nLen = rString.getLength(); - if ((nLen&1)!=0) pWMF->WriteUChar( (sal_uInt8)0 ); + if ((nLen&1)!=0) pWMF->WriteUChar( 0 ); WritePointYX(rPoint); UpdateRecordHeader(); } @@ -1678,7 +1678,7 @@ void WMFWriter::UpdateHeader() nPos=pWMF->Tell(); // endposition = total size of file nFileSize=nPos-nMetafileHeaderPos; // subtract size of 1st header if ((nFileSize&1)!=0) { // if needed round to words - pWMF->WriteUChar( (sal_uInt8)0 ); + pWMF->WriteUChar( 0 ); nPos++; nFileSize++; } diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx index 6236b0c55f53..f0a036c71906 100644 --- a/vcl/source/gdi/animate.cxx +++ b/vcl/source/gdi/animate.cxx @@ -722,7 +722,7 @@ SvStream& WriteAnimation( SvStream& rOStm, const Animation& rAnimation ) WritePair( rOStm, rAnimation.maGlobalSize ); rOStm.WriteUInt16( (sal_uInt16) ( ( ANIMATION_TIMEOUT_ON_CLICK == rAnimBmp.nWait ) ? 65535 : rAnimBmp.nWait ) ); rOStm.WriteUInt16( (sal_uInt16) rAnimBmp.eDisposal ); - rOStm.WriteUChar( (sal_uInt8) rAnimBmp.bUserInput ); + rOStm.WriteUChar( rAnimBmp.bUserInput ); rOStm.WriteUInt32( (sal_uInt32) rAnimation.mnLoopCount ); rOStm.WriteUInt32( nDummy32 ); // Unused rOStm.WriteUInt32( nDummy32 ); // Unused diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index e3dc7dc1aec3..54aa95652c56 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -370,16 +370,16 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol if(rCandidate.HasFlags()) { - rOStm.WriteUChar( (sal_uInt8)true ); + rOStm.WriteUChar( true ); for(sal_uInt16 c(0); c < nPointCount; c++) { - rOStm.WriteUChar( (sal_uInt8)rCandidate.GetFlags(c) ); + rOStm.WriteUChar( rCandidate.GetFlags(c) ); } } else { - rOStm.WriteUChar( (sal_uInt8)false ); + rOStm.WriteUChar( false ); } } } diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 52708e71bc86..981926b3d248 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -983,8 +983,8 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, bool bRLE4 ) rOStm.Write( pBuf.get(), nBufCount ); } - rOStm.WriteUChar( (sal_uInt8) 0 ); - rOStm.WriteUChar( (sal_uInt8) 1 ); + rOStm.WriteUChar( 0 ); + rOStm.WriteUChar( 1 ); return( rOStm.GetError() == 0UL ); } @@ -1592,7 +1592,7 @@ bool WriteDIBBitmapEx( { rOStm.WriteUInt32( (sal_uInt32)0x25091962 ); rOStm.WriteUInt32( (sal_uInt32)0xACB20201 ); - rOStm.WriteUChar( (sal_uInt8)rSource.eTransparent ); + rOStm.WriteUChar( rSource.eTransparent ); if(TRANSPARENT_BITMAP == rSource.eTransparent) { diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index d556cdab11db..d2590a3348ef 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -722,10 +722,10 @@ SvStream& WriteImpl_Font( SvStream& rOStm, const Impl_Font& rImpl_Font ) rOStm.WriteUChar( rImpl_Font.mbWordLine ); rOStm.WriteUChar( rImpl_Font.mbOutline ); rOStm.WriteUChar( rImpl_Font.mbShadow ); - rOStm.WriteUChar( (sal_uInt8) rImpl_Font.mnKerning ); + rOStm.WriteUChar( rImpl_Font.mnKerning ); // new in version 2 - rOStm.WriteUChar( (sal_uInt8) rImpl_Font.meRelief ); + rOStm.WriteUChar( rImpl_Font.meRelief ); rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.maCJKLanguageTag.getLanguageType( false) ); rOStm.WriteUChar( rImpl_Font.mbVertical ); rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meEmphasisMark ); |