remove unnecessary casts in calls to SvStream.WriteUInt16

left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I482ca7abb84613971e7e8f839f7aa67a65cd71ff
This commit is contained in:
Noel Grandin 2014-09-25 17:56:24 +02:00
parent dedfa972bc
commit 5501c8d222
71 changed files with 365 additions and 365 deletions

View File

@ -1938,7 +1938,7 @@ bool StarBASIC::StoreData( SvStream& r ) const
{
return false;
}
r.WriteUInt16( (sal_uInt16) pModules->Count() );
r.WriteUInt16( pModules->Count() );
for( sal_uInt16 i = 0; i < pModules->Count(); i++ )
{
SbModule* p = (SbModule*) pModules->Get( i );

View File

@ -995,7 +995,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
case SbxBYTE:
if( bIsVariant )
{
pStrm->WriteUInt16( (sal_uInt16)SbxBYTE ); // VarType Id
pStrm->WriteUInt16( SbxBYTE ); // VarType Id
}
pStrm->WriteUChar( rVar.GetByte() );
break;
@ -1009,7 +1009,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
case SbxUINT:
if( bIsVariant )
{
pStrm->WriteUInt16( (sal_uInt16)SbxINTEGER ); // VarType Id
pStrm->WriteUInt16( SbxINTEGER ); // VarType Id
}
pStrm->WriteInt16( rVar.GetInteger() );
break;
@ -1018,7 +1018,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
case SbxULONG:
if( bIsVariant )
{
pStrm->WriteUInt16( (sal_uInt16)SbxLONG ); // VarType Id
pStrm->WriteUInt16( SbxLONG ); // VarType Id
}
pStrm->WriteInt32( rVar.GetLong() );
break;
@ -1026,14 +1026,14 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
case SbxSALUINT64:
if( bIsVariant )
{
pStrm->WriteUInt16( (sal_uInt16)SbxSALINT64 ); // VarType Id
pStrm->WriteUInt16( SbxSALINT64 ); // VarType Id
}
pStrm->WriteUInt64( (sal_uInt64)rVar.GetInt64() );
break;
case SbxSINGLE:
if( bIsVariant )
{
pStrm->WriteUInt16( (sal_uInt16)eType ); // VarType Id
pStrm->WriteUInt16( eType ); // VarType Id
}
pStrm->WriteFloat( rVar.GetSingle() );
break;
@ -1043,7 +1043,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
case SbxDATE:
if( bIsVariant )
{
pStrm->WriteUInt16( (sal_uInt16)eType ); // VarType Id
pStrm->WriteUInt16( eType ); // VarType Id
}
pStrm->WriteDouble( rVar.GetDouble() );
break;
@ -1056,7 +1056,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
{
if( bIsVariant )
{
pStrm->WriteUInt16( (sal_uInt16)SbxSTRING );
pStrm->WriteUInt16( SbxSTRING );
}
pStrm->WriteUniOrByteString( rStr, osl_getThreadTextEncoding() );
}

View File

@ -534,13 +534,13 @@ bool SbxArray::StoreData( SvStream& rStrm ) const
if (pEntry->mpVar && (pEntry->mpVar->GetFlags() & SBX_DONTSTORE) == SBX_NONE)
nElem++;
}
rStrm.WriteUInt16( (sal_uInt16) nElem );
rStrm.WriteUInt16( nElem );
for( n = 0; n < mpVarEntries->size(); n++ )
{
SbxVarEntry* pEntry = (*mpVarEntries)[n];
if (pEntry->mpVar && (pEntry->mpVar->GetFlags() & SBX_DONTSTORE) == SBX_NONE)
{
rStrm.WriteUInt16( (sal_uInt16) n );
rStrm.WriteUInt16( n );
if (!pEntry->mpVar->Store(rStrm))
return false;
}

View File

@ -260,9 +260,9 @@ bool SbxBase::Store( SvStream& rStrm )
if( ( nFlags & SBX_DONTSTORE ) == SBX_NONE )
{
rStrm.WriteUInt32( (sal_uInt32) GetCreator() )
.WriteUInt16( (sal_uInt16) GetSbxId() )
.WriteUInt16( (sal_uInt16) GetFlags() )
.WriteUInt16( (sal_uInt16) GetVersion() );
.WriteUInt16( GetSbxId() )
.WriteUInt16( GetFlags() )
.WriteUInt16( GetVersion() );
sal_Size nOldPos = rStrm.Tell();
rStrm.WriteUInt32( (sal_uInt32) 0L );
bool bRes = StoreData( rStrm );
@ -381,8 +381,8 @@ bool SbxInfo::StoreData( SvStream& rStrm ) const
{
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, i->aName,
RTL_TEXTENCODING_ASCII_US);
rStrm.WriteUInt16( (sal_uInt16) i->eType )
.WriteUInt16( (sal_uInt16) i->nFlags )
rStrm.WriteUInt16( i->eType )
.WriteUInt16( i->nFlags )
.WriteUInt32( (sal_uInt32) i->nUserData );
}
return true;

View File

@ -1222,9 +1222,9 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
(*m_pFileStream).WriteUChar( aDate.GetMonth() );
(*m_pFileStream).WriteUChar( aDate.GetDay() );
(*m_pFileStream).WriteUInt32( (sal_uInt32)0 ); // number of data records
(*m_pFileStream).WriteUInt16( (sal_uInt16)((m_pColumns->getCount()+1) * 32 + 1) ); // header information,
(*m_pFileStream).WriteUInt16( ((m_pColumns->getCount()+1) * 32 + 1) ); // header information,
// pColumns contains always an additional column
(*m_pFileStream).WriteUInt16( (sal_uInt16) 0 ); // record length will be determined later
(*m_pFileStream).WriteUInt16( 0 ); // record length will be determined later
m_pFileStream->Write(aBuffer, 20);
sal_uInt16 nRecLength = 1; // Length 1 for deleted flag

View File

@ -1077,7 +1077,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
// Store Current text encoding ...
rtl_TextEncoding eEncoding = GetSOStoreTextEncoding( osl_getThreadTextEncoding() );
rOStream.WriteUInt16( (sal_uInt16) eEncoding );
rOStream.WriteUInt16( eEncoding );
// The number of paragraphs ...
size_t nParagraphs = aContents.size();

View File

@ -432,8 +432,8 @@ void SvxDateField::Load( SvPersistStream & rStm )
void SvxDateField::Save( SvPersistStream & rStm )
{
rStm.WriteUInt32( nFixDate );
rStm.WriteUInt16( (sal_uInt16)eType );
rStm.WriteUInt16( (sal_uInt16)eFormat );
rStm.WriteUInt16( eType );
rStm.WriteUInt16( eFormat );
}
@ -593,7 +593,7 @@ void SvxURLField::Load( SvPersistStream & rStm )
void SvxURLField::Save( SvPersistStream & rStm )
{
rStm.WriteUInt16( (sal_uInt16)eFormat );
rStm.WriteUInt16( eFormat );
write_unicode( rStm, aURL );
write_unicode( rStm, aRepresentation );
@ -841,8 +841,8 @@ void SvxExtTimeField::Load( SvPersistStream & rStm )
void SvxExtTimeField::Save( SvPersistStream & rStm )
{
rStm.WriteInt64(m_nFixTime);
rStm.WriteUInt16( (sal_uInt16) eType );
rStm.WriteUInt16( (sal_uInt16) eFormat );
rStm.WriteUInt16( eType );
rStm.WriteUInt16( eFormat );
}
@ -989,8 +989,8 @@ void SvxExtFileField::Save( SvPersistStream & rStm )
// UNICODE: rStm << aFile;
rStm.WriteUniOrByteString(aFile, rStm.GetStreamCharSet());
rStm.WriteUInt16( (sal_uInt16) eType );
rStm.WriteUInt16( (sal_uInt16) eFormat );
rStm.WriteUInt16( eType );
rStm.WriteUInt16( eFormat );
}
@ -1145,8 +1145,8 @@ void SvxAuthorField::Save( SvPersistStream & rStm )
write_unicode( rStm, aFirstName );
write_unicode( rStm, aShortName );
rStm.WriteUInt16( (sal_uInt16) eType );
rStm.WriteUInt16( (sal_uInt16) eFormat );
rStm.WriteUInt16( eType );
rStm.WriteUInt16( eFormat );
}

View File

@ -1476,7 +1476,7 @@ bool SvxShadowItem::GetPresentation
SvStream& SvxShadowItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
rStrm.WriteSChar( GetLocation() )
.WriteUInt16( (sal_uInt16) GetWidth() )
.WriteUInt16( GetWidth() )
.WriteUChar( (aShadowColor.GetTransparency() > 0) );
WriteColor( rStrm, GetColor() );
WriteColor( rStrm, GetColor() );
@ -2166,7 +2166,7 @@ bool SvxBoxItem::GetPresentation
SvStream& SvxBoxItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
{
rStrm.WriteUInt16( (sal_uInt16) GetDistance() );
rStrm.WriteUInt16( GetDistance() );
const SvxBorderLine* pLine[ 4 ]; // top, left, right, bottom
pLine[ 0 ] = GetTop();
pLine[ 1 ] = GetLeft();
@ -2195,10 +2195,10 @@ SvStream& SvxBoxItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
if( nItemVersion >= BOX_4DISTS_VERSION && (cLine & 0x10) != 0 )
{
rStrm.WriteUInt16( (sal_uInt16)nTopDist )
.WriteUInt16( (sal_uInt16)nLeftDist )
.WriteUInt16( (sal_uInt16)nRightDist )
.WriteUInt16( (sal_uInt16)nBottomDist );
rStrm.WriteUInt16( nTopDist )
.WriteUInt16( nLeftDist )
.WriteUInt16( nRightDist )
.WriteUInt16( nBottomDist );
}
return rStrm;
@ -2568,7 +2568,7 @@ SvStream& SvxBoxInfoItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
if ( IsMinDist() )
cFlags |= 0x04;
rStrm.WriteSChar( cFlags )
.WriteUInt16( (sal_uInt16) GetDefDist() );
.WriteUInt16( GetDefDist() );
const SvxBorderLine* pLine[ 2 ];
pLine[ 0 ] = GetHori();
pLine[ 1 ] = GetVert();

View File

@ -251,13 +251,13 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
pBulletFont->SetName(sFontName);
}
rStream.WriteUInt16( (sal_uInt16)NUMITEM_VERSION_04 );
rStream.WriteUInt16( NUMITEM_VERSION_04 );
rStream.WriteUInt16( (sal_uInt16)GetNumberingType() );
rStream.WriteUInt16( (sal_uInt16)eNumAdjust );
rStream.WriteUInt16( (sal_uInt16)nInclUpperLevels );
rStream.WriteUInt16( GetNumberingType() );
rStream.WriteUInt16( eNumAdjust );
rStream.WriteUInt16( nInclUpperLevels );
rStream.WriteUInt16( nStart );
rStream.WriteUInt16( (sal_uInt16)cBullet );
rStream.WriteUInt16( cBullet );
rStream.WriteInt16( nFirstLineOffset );
rStream.WriteInt16( nAbsLSpace );
@ -270,7 +270,7 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
rStream.WriteUniOrByteString(sCharStyleName, eEnc);
if(pGraphicBrush)
{
rStream.WriteUInt16( (sal_uInt16)1 );
rStream.WriteUInt16( 1 );
// in SD or SI force bullet itself to be stored,
// for that purpose throw away link when link and graphic
@ -283,16 +283,16 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
pGraphicBrush->Store(rStream, BRUSH_GRAPHIC_VERSION);
}
else
rStream.WriteUInt16( (sal_uInt16)0 );
rStream.WriteUInt16( 0 );
rStream.WriteUInt16( (sal_uInt16)eVertOrient );
rStream.WriteUInt16( eVertOrient );
if(pBulletFont)
{
rStream.WriteUInt16( (sal_uInt16)1 );
rStream.WriteUInt16( 1 );
WriteFont( rStream, *pBulletFont );
}
else
rStream.WriteUInt16( (sal_uInt16)0 );
rStream.WriteUInt16( 0 );
WritePair( rStream, aGraphicSize );
Color nTempColor = nBulletColor;
@ -302,8 +302,8 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
rStream.WriteUInt16( nBulletRelSize );
rStream.WriteUInt16( (sal_uInt16)IsShowSymbol() );
rStream.WriteUInt16( ( sal_uInt16 ) mePositionAndSpaceMode );
rStream.WriteUInt16( ( sal_uInt16 ) meLabelFollowedBy );
rStream.WriteUInt16( mePositionAndSpaceMode );
rStream.WriteUInt16( meLabelFollowedBy );
rStream.WriteInt32( ( sal_Int32 ) mnListtabPos );
rStream.WriteInt32( ( sal_Int32 ) mnFirstLineIndent );
rStream.WriteInt32( ( sal_Int32 ) mnIndentAt );
@ -687,12 +687,12 @@ SvxNumRule::SvxNumRule( SvStream &rStream )
SvStream& SvxNumRule::Store( SvStream &rStream )
{
rStream.WriteUInt16( (sal_uInt16)NUMITEM_VERSION_03 );
rStream.WriteUInt16( NUMITEM_VERSION_03 );
rStream.WriteUInt16( nLevelCount );
//first save of nFeatureFlags for old versions
rStream.WriteUInt16( (sal_uInt16)nFeatureFlags );
rStream.WriteUInt16( nFeatureFlags );
rStream.WriteUInt16( (sal_uInt16)bContinuousNumbering );
rStream.WriteUInt16( (sal_uInt16)eNumberingType );
rStream.WriteUInt16( eNumberingType );
FontToSubsFontConverter pConverter = 0;
bool bConvertBulletFont = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_50 ) && ( rStream.GetVersion() );
@ -715,7 +715,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream )
rStream.WriteUInt16( 0 | nSetFlag );
}
//second save of nFeatureFlags for new versions
rStream.WriteUInt16( (sal_uInt16)nFeatureFlags );
rStream.WriteUInt16( nFeatureFlags );
if(pConverter)
DestroyFontToSubsFontConverter(pConverter);

View File

@ -268,7 +268,7 @@ SvStream& SvxLineSpacingItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*
{
rStrm.WriteSChar( GetPropLineSpace() )
.WriteInt16( GetInterLineSpace() )
.WriteUInt16( (sal_uInt16) GetLineHeight() )
.WriteUInt16( GetLineHeight() )
.WriteSChar( GetLineSpaceRule() )
.WriteSChar( GetInterLineSpaceRule() );
return rStrm;

View File

@ -45,7 +45,7 @@ void SdrMeasureField::Load(SvPersistStream& rIn)
void SdrMeasureField::Save(SvPersistStream& rOut)
{
rOut.WriteUInt16( (sal_uInt16)eMeasureFieldKind );
rOut.WriteUInt16( eMeasureFieldKind );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -735,10 +735,10 @@ SfxPoolItem* SvxFontHeightItem::Clone( SfxItemPool * ) const
SvStream& SvxFontHeightItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
{
rStrm.WriteUInt16( (sal_uInt16)GetHeight() );
rStrm.WriteUInt16( GetHeight() );
if( FONTHEIGHT_UNIT_VERSION <= nItemVersion )
rStrm.WriteUInt16( GetProp() ).WriteUInt16( (sal_uInt16)GetPropUnit() );
rStrm.WriteUInt16( GetProp() ).WriteUInt16( GetPropUnit() );
else
{
// When exporting to the old versions the relative information is lost
@ -1760,7 +1760,7 @@ SfxPoolItem* SvxPropSizeItem::Clone( SfxItemPool * ) const
SvStream& SvxPropSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
rStrm.WriteUInt16( (sal_uInt16) GetValue() );
rStrm.WriteUInt16( GetValue() );
return rStrm;
}
@ -2432,7 +2432,7 @@ SfxPoolItem* SvxLanguageItem::Clone( SfxItemPool * ) const
SvStream& SvxLanguageItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
rStrm.WriteUInt16( (sal_uInt16) GetValue() );
rStrm.WriteUInt16( GetValue() );
return rStrm;
}
@ -2703,7 +2703,7 @@ SfxPoolItem* SvxEmphasisMarkItem::Clone( SfxItemPool * ) const
SvStream& SvxEmphasisMarkItem::Store( SvStream& rStrm,
sal_uInt16 /*nItemVersion*/ ) const
{
rStrm.WriteUInt16( (sal_uInt16)GetValue() );
rStrm.WriteUInt16( GetValue() );
return rStrm;
}
@ -3104,10 +3104,10 @@ SvStream& SvxCharScaleWidthItem::Store( SvStream& rStream, sal_uInt16 nVer ) con
{
// see comment in Create()....
rRet.SeekRel( -1*(long)sizeof(sal_uInt16) );
rRet.WriteUInt16( (sal_uInt16)0 );
rRet.WriteUInt16( 0 );
rRet.WriteUInt16( GetValue() );
// Really ugly, but not a problem for reading the doc in 5.2
rRet.WriteUInt16( (sal_uInt16)0x1234 );
rRet.WriteUInt16( 0x1234 );
}
return rRet;
}

View File

@ -604,10 +604,10 @@ bool Sane::Start( BitmapTransporter& rBitmap )
aConverter.WriteUInt32( (sal_uInt32)40 );
aConverter.WriteUInt32( (sal_uInt32)0 ); // fill in width later
aConverter.WriteUInt32( (sal_uInt32)0 ); // fill in height later
aConverter.WriteUInt16( (sal_uInt16)1 );
aConverter.WriteUInt16( 1 );
// create header for 24 bits
// correct later if necessary
aConverter.WriteUInt16( (sal_uInt16)24 );
aConverter.WriteUInt16( 24 );
aConverter.WriteUInt32( (sal_uInt32)0 );
aConverter.WriteUInt32( (sal_uInt32)0 );
aConverter.WriteUInt32( (sal_uInt32)0 );
@ -768,10 +768,10 @@ bool Sane::Start( BitmapTransporter& rBitmap )
aConverter.Seek( 10 );
aConverter.WriteUInt32( (sal_uInt32)64 );
aConverter.Seek( 28 );
aConverter.WriteUInt16( (sal_uInt16) 1 );
aConverter.WriteUInt16( 1 );
aConverter.Seek( 54 );
// write color table
aConverter.WriteUInt16( (sal_uInt16)0xffff );
aConverter.WriteUInt16( 0xffff );
aConverter.WriteUChar( 0xff );
aConverter.WriteUChar( 0 );
aConverter.WriteUInt32( (sal_uInt32)0 );
@ -782,7 +782,7 @@ bool Sane::Start( BitmapTransporter& rBitmap )
aConverter.Seek( 10 );
aConverter.WriteUInt32( (sal_uInt32)1084 );
aConverter.Seek( 28 );
aConverter.WriteUInt16( (sal_uInt16) 8 );
aConverter.WriteUInt16( 8 );
aConverter.Seek( 54 );
// write color table
for( nLine = 0; nLine < 256; nLine++ )

View File

@ -148,7 +148,7 @@ void Writer::storeTo( Reference< XOutputStream > &xOutStream )
}
// Endtag
mpMovieStream->WriteUInt16( (sal_uInt16)0 );
mpMovieStream->WriteUInt16( 0 );
Tag aHeader( 0xff );

View File

@ -322,9 +322,9 @@ void GIFWriter::WriteGlobalHeader( const Size& rSize )
// write dummy palette with two entries (black/white);
// we do this only because of a bug in Photoshop, since those can't
// read pictures without a global color palette
m_rGIF.WriteUInt16( (sal_uInt16) 0 );
m_rGIF.WriteUInt16( (sal_uInt16) 255 );
m_rGIF.WriteUInt16( (sal_uInt16) 65535 );
m_rGIF.WriteUInt16( 0 );
m_rGIF.WriteUInt16( 255 );
m_rGIF.WriteUInt16( 65535 );
if( m_rGIF.GetError() )
bStatus = false;

View File

@ -654,7 +654,7 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
// Image Size:
pMET->WriteUChar( 0x94 ).WriteUChar( 0x09 ).WriteUChar( 0x02 );
pMET->WriteUInt16( (sal_uInt16) 0 ).WriteUInt16( (sal_uInt16) 0 );
pMET->WriteUInt16( 0 ).WriteUInt16( 0 );
WriteBigEndianShort((sal_uInt16)nHeight);
WriteBigEndianShort((sal_uInt16)nWidth);
@ -1152,7 +1152,7 @@ void METWriter::WillWriteOrder(sal_uInt32 nNextOrderMaximumLength)
void METWriter::METBitBlt(Point aPt, Size aSize, const Size& rBmpSizePixel)
{
WillWriteOrder(46);
pMET->WriteUChar( 0xd6 ).WriteUChar( 44 ).WriteUInt16( (sal_uInt16)0 ).WriteUInt16( (sal_uInt16) 0x00cc );
pMET->WriteUChar( 0xd6 ).WriteUChar( 44 ).WriteUInt16( 0 ).WriteUInt16( 0x00cc );
WriteBigEndianLong(nActBitmapId++);
pMET->WriteUChar( 0x02 ).WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 );
WritePoint(Point(aPt.X(),aPt.Y()+aSize.Height()));
@ -1240,7 +1240,7 @@ void METWriter::METEndArea()
void METWriter::METBeginPath(sal_uInt32 nPathId)
{
WillWriteOrder(8);
pMET->WriteUChar( 0xd0 ).WriteUChar( 6 ).WriteUInt16( (sal_uInt16) 0 ).WriteUInt32( nPathId );
pMET->WriteUChar( 0xd0 ).WriteUChar( 6 ).WriteUInt16( 0 ).WriteUInt32( nPathId );
}
@ -2414,9 +2414,9 @@ void METWriter::WriteGraphicsObject(const GDIMetaFile * pMTF)
// now at first we write the head of the segment:
pMET->WriteUChar( 0x70 ).WriteUChar( 0x0e ).WriteUInt32( (sal_uInt32)0 );
pMET->WriteUChar( 0x70 ).WriteUChar( 0x10 ); // Flags
pMET->WriteUInt16( (sal_uInt16)0 ); // Lo-Word of the length of the segment data (Big Endian)
pMET->WriteUInt16( 0 ); // Lo-Word of the length of the segment data (Big Endian)
pMET->WriteUInt32( (sal_uInt32)0 ); // Reserved
pMET->WriteUInt16( (sal_uInt16)0 ); // Hi-Word of the length of the segment (Big Endian) (Ohh Ohh OS2)
pMET->WriteUInt16( 0 ); // Hi-Word of the length of the segment (Big Endian) (Ohh Ohh OS2)
// Annotation: we're writing the correct data length again below
// now all orders are being written out:

View File

@ -462,7 +462,7 @@ void PictWriter::WriteOpcode_TxFace(const vcl::Font & rFont)
if (rFont.IsShadow()) nFace|=0x10;
if (bDstTxFaceValid==false || nDstTxFace!=nFace) {
pPict->WriteUInt16( (sal_uInt16)0x0004 ).WriteUChar( nFace ).WriteUChar( 0 );
pPict->WriteUInt16( 0x0004 ).WriteUChar( nFace ).WriteUChar( 0 );
nDstTxFace=nFace;
bDstTxFaceValid=true;
}
@ -479,7 +479,7 @@ void PictWriter::WriteOpcode_TxMode(RasterOp eMode)
case ROP_XOR: nVal=0x000a; break;
default: nVal=0x0008;
}
pPict->WriteUInt16( (sal_uInt16)0x0005 ).WriteUInt16( nVal );
pPict->WriteUInt16( 0x0005 ).WriteUInt16( nVal );
eDstTxMode=eMode;
bDstTxModeValid=true;
}
@ -490,7 +490,7 @@ void PictWriter::WriteOpcode_PnSize(sal_uInt16 nSize)
{
if (nSize==0) nSize=1;
if (bDstPnSizeValid==false || nDstPnSize!=nSize) {
pPict->WriteUInt16( (sal_uInt16)0x0007 ).WriteUInt16( nSize ).WriteUInt16( nSize );
pPict->WriteUInt16( 0x0007 ).WriteUInt16( nSize ).WriteUInt16( nSize );
nDstPnSize=nSize;
bDstPnSizeValid=true;
}
@ -508,7 +508,7 @@ void PictWriter::WriteOpcode_PnMode(RasterOp eMode)
case ROP_XOR: nVal=0x000a; break;
default: nVal=0x0008;
}
pPict->WriteUInt16( (sal_uInt16)0x0008 ).WriteUInt16( nVal );
pPict->WriteUInt16( 0x0008 ).WriteUInt16( nVal );
eDstPnMode=eMode;
bDstPnModeValid=true;
}
@ -521,7 +521,7 @@ void PictWriter::WriteOpcode_PnLinePat(bool bVisible)
ConvertLinePattern(aPat,bVisible);
if (bDstPnPatValid==false || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) {
pPict->WriteUInt16( (sal_uInt16)0x0009 ).WriteUInt32( aPat.nHi ).WriteUInt32( aPat.nLo );
pPict->WriteUInt16( 0x0009 ).WriteUInt32( aPat.nHi ).WriteUInt32( aPat.nLo );
aDstPnPat=aPat;
bDstPnPatValid=true;
}
@ -534,7 +534,7 @@ void PictWriter::WriteOpcode_PnFillPat(bool bVisible)
ConvertFillPattern(aPat,bVisible);
if (bDstPnPatValid==false || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) {
pPict->WriteUInt16( (sal_uInt16)0x0009 ).WriteUInt32( aPat.nHi ).WriteUInt32( aPat.nLo );
pPict->WriteUInt16( 0x0009 ).WriteUInt32( aPat.nHi ).WriteUInt32( aPat.nLo );
aDstPnPat=aPat;
bDstPnPatValid=true;
}
@ -543,7 +543,7 @@ void PictWriter::WriteOpcode_PnFillPat(bool bVisible)
void PictWriter::WriteOpcode_OvSize(const Size & rSize)
{
pPict->WriteUInt16( (sal_uInt16)0x000b );
pPict->WriteUInt16( 0x000b );
WriteSize(rSize);
}
@ -555,7 +555,7 @@ void PictWriter::WriteOpcode_TxSize(sal_uInt16 nSize)
nDstTxSize = (sal_uInt16) OutputDevice::LogicToLogic( Size( 0, nSize ),
aSrcMapMode, aTargetMapMode ).Height();
pPict->WriteUInt16( (sal_uInt16)0x000d ).WriteUInt16( nDstTxSize );
pPict->WriteUInt16( 0x000d ).WriteUInt16( nDstTxSize );
bDstTxSizeValid=true;
}
}
@ -564,7 +564,7 @@ void PictWriter::WriteOpcode_TxSize(sal_uInt16 nSize)
void PictWriter::WriteOpcode_RGBFgCol(const Color & rColor)
{
if (bDstFgColValid==false || aDstFgCol!=rColor) {
pPict->WriteUInt16( (sal_uInt16)0x001a );
pPict->WriteUInt16( 0x001a );
WriteRGBColor(rColor);
aDstFgCol=rColor;
bDstFgColValid=true;
@ -575,7 +575,7 @@ void PictWriter::WriteOpcode_RGBFgCol(const Color & rColor)
void PictWriter::WriteOpcode_RGBBkCol(const Color & rColor)
{
if (bDstBkColValid==false || aDstBkCol!=rColor) {
pPict->WriteUInt16( (sal_uInt16)0x001b );
pPict->WriteUInt16( 0x001b );
WriteRGBColor(rColor);
aDstBkCol=rColor;
bDstBkColValid=true;
@ -597,13 +597,13 @@ void PictWriter::WriteOpcode_Line(const Point & rLocPt, const Point & rNewPt)
dv=aNewPt.Y()-aLocPt.Y();
if (dh<=127 && dh>=-128 && dv<=127 && dv>=-128)
{ // ShortLine
pPict->WriteUInt16( (sal_uInt16)0x0022 );
pPict->WriteUInt16( 0x0022 );
WritePoint(rLocPt);
pPict->WriteChar( (char)dh ).WriteChar( (char)dv );
}
else
{
pPict->WriteUInt16( (sal_uInt16)0x0020 );
pPict->WriteUInt16( 0x0020 );
WritePoint(rLocPt);
WritePoint(rNewPt);
}
@ -624,12 +624,12 @@ void PictWriter::WriteOpcode_LineFrom(const Point & rNewPt)
if (dh<=127 && dh>=-128 && dv<=127 && dv>=-128)
{ // ShortLine
pPict->WriteUInt16( (sal_uInt16)0x0023 );
pPict->WriteUInt16( 0x0023 );
pPict->WriteChar( (char)dh ).WriteChar( (char)dv );
}
else
{
pPict->WriteUInt16( (sal_uInt16)0x0021 );
pPict->WriteUInt16( 0x0021 );
WritePoint(rNewPt);
}
aDstPenPosition=rNewPt;
@ -651,20 +651,20 @@ void PictWriter::WriteOpcode_Text(const Point & rPoint, const OUString& rString,
if (bDstTextPositionValid==false || dh<0 || dh>255 || dv<0 || dv>255 || bDelta==false)
{
pPict->WriteUInt16( (sal_uInt16)0x0028 );
pPict->WriteUInt16( 0x0028 );
WritePoint(rPoint);
}
else if (dv==0)
{
pPict->WriteUInt16( (sal_uInt16)0x0029 ).WriteUChar( dh );
pPict->WriteUInt16( 0x0029 ).WriteUChar( dh );
}
else if (dh==0)
{
pPict->WriteUInt16( (sal_uInt16)0x002a ).WriteUChar( dv );
pPict->WriteUInt16( 0x002a ).WriteUChar( dv );
}
else
{
pPict->WriteUInt16( (sal_uInt16)0x002b ).WriteUChar( dh ).WriteUChar( dv );
pPict->WriteUInt16( 0x002b ).WriteUChar( dh ).WriteUChar( dv );
}
WriteString( rString );
@ -694,12 +694,12 @@ void PictWriter::WriteOpcode_FontName(const vcl::Font & rFont)
if ( nFontNameLen )
{
nDataLen = 3 + nFontNameLen;
pPict->WriteUInt16( (sal_uInt16)0x002c ).WriteUInt16( nDataLen ).WriteUInt16( nFontId );
pPict->WriteUInt16( 0x002c ).WriteUInt16( nDataLen ).WriteUInt16( nFontId );
WriteString( rFont.GetName() );
if ( ( nFontNameLen & 1 ) == 0 )
pPict->WriteUChar( 0 );
}
pPict->WriteUInt16( (sal_uInt16)0x0003 ).WriteUInt16( nFontId );
pPict->WriteUInt16( 0x0003 ).WriteUInt16( nFontId );
aDstFontName=rFont.GetName();
nDstFontNameId=nFontId;
bDstFontNameValid=true;
@ -711,8 +711,8 @@ void PictWriter::WriteOpcode_ClipRect( const Rectangle& rRect )
Rectangle aRect( MapRectangle( rRect ) );
++aRect.Bottom();
++aRect.Right();
pPict ->WriteUInt16( (sal_uInt16)1 ) // opcode 1
.WriteUInt16( (sal_uInt16)10 ) // data size
pPict ->WriteUInt16( 1 ) // opcode 1
.WriteUInt16( 10 ) // data size
.WriteInt16( aRect.Top() ).WriteInt16( aRect.Left() )
.WriteInt16( aRect.Bottom() ).WriteInt16( aRect.Right() );
aClipRect = aRect;
@ -904,7 +904,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nDstRowBytes = nWidth * 4;
// writing Opcode and BaseAddr (?):
pPict->WriteUInt16( (sal_uInt16)0x009a ).WriteUInt32( (sal_uInt32)0x000000ff );
pPict->WriteUInt16( 0x009a ).WriteUInt32( (sal_uInt32)0x000000ff );
// Normally we want to produce packing type 4 (run length encoding
// for 32-bit pixels). But if RowBytes<8 is true, generally all data is
@ -917,36 +917,36 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nPackType = 4;
// writing PixMap-Structure:
pPict->WriteUInt16( (sal_uInt16)(nDstRowBytes|0x8000) ) // Bytes per row and the fact that it's a 'PixMap'
.WriteUInt16( (sal_uInt16)0x0000 ) // Y1-position of the bitmap in the source
.WriteUInt16( (sal_uInt16)0x0000 ) // X1-position of the bitmap in the source
.WriteUInt16( (sal_uInt16)nHeight ) // Y2-position of the bitmap in the source
.WriteUInt16( (sal_uInt16)nWidth ) // X2-position of the bitmap in the source
.WriteUInt16( (sal_uInt16)0x0000 ) // Version
.WriteUInt16( (sal_uInt16)nPackType ) // Packing type
pPict->WriteUInt16( (nDstRowBytes|0x8000) ) // Bytes per row and the fact that it's a 'PixMap'
.WriteUInt16( 0x0000 ) // Y1-position of the bitmap in the source
.WriteUInt16( 0x0000 ) // X1-position of the bitmap in the source
.WriteUInt16( nHeight ) // Y2-position of the bitmap in the source
.WriteUInt16( nWidth ) // X2-position of the bitmap in the source
.WriteUInt16( 0x0000 ) // Version
.WriteUInt16( nPackType ) // Packing type
.WriteUInt32( (sal_uInt32) 0x00000000 ) // Packing size (?)
.WriteUInt32( (sal_uInt32) 0x00480000 ) // H-Res
.WriteUInt32( (sal_uInt32) 0x00480000 ) // V-Res
.WriteUInt16( (sal_uInt16)0x0010 ) // Pixel type (?)
.WriteUInt16( (sal_uInt16)0x0020 ) // Pixel size: 32 bit
.WriteUInt16( (sal_uInt16)0x0004 ) // CmpCount: 4 components
.WriteUInt16( (sal_uInt16)0x0008 ) // CmpSize: 8 bits
.WriteUInt16( 0x0010 ) // Pixel type (?)
.WriteUInt16( 0x0020 ) // Pixel size: 32 bit
.WriteUInt16( 0x0004 ) // CmpCount: 4 components
.WriteUInt16( 0x0008 ) // CmpSize: 8 bits
.WriteUInt32( (sal_uInt32) 0x00000000 ) // PlaneBytes (?)
.WriteUInt32( (sal_uInt32) 0x00000000 ) // (?)
.WriteUInt32( (sal_uInt32) 0x00000000 ); // (?)
// Source-Rectangle schreiben:
pPict->WriteUInt16( (sal_uInt16)0x0000 ) // Y1-position on the bitmap
.WriteUInt16( (sal_uInt16)0x0000 ) // X1-position on the bitmap
.WriteUInt16( (sal_uInt16)nHeight ) // Y2-position on the bitmap
.WriteUInt16( (sal_uInt16)nWidth ); // X2-position on the bitmap
pPict->WriteUInt16( 0x0000 ) // Y1-position on the bitmap
.WriteUInt16( 0x0000 ) // X1-position on the bitmap
.WriteUInt16( nHeight ) // Y2-position on the bitmap
.WriteUInt16( nWidth ); // X2-position on the bitmap
// writing the Destination-Rectangle:
WritePoint( rPoint );
WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) );
// writing the Transfer mode:
pPict->WriteUInt16( (sal_uInt16)0x0000 ); // (?)
pPict->WriteUInt16( 0x0000 ); // (?)
// remember position of the Map-data in the target:
nDstMapPos=pPict->Tell();
@ -988,7 +988,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
// ByteCount (that's the size of the packed row) is at first 0 (will be corrected later):
if ( nDstRowBytes > 250 )
pPict->WriteUInt16( (sal_uInt16)0 );
pPict->WriteUInt16( 0 );
else
pPict->WriteUChar( 0 );
@ -1089,7 +1089,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nSrcRowBytes = ( nDstRowBytes + 3 ) & 0xfffffffc;
// writing Opcode:
pPict->WriteUInt16( (sal_uInt16)0x0098 );
pPict->WriteUInt16( 0x0098 );
// Normally we want to produce packing type 0 (default packing).
// But if RowBytes<8 is true, generally all data is unpacked even if packing
@ -1101,45 +1101,45 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nPackType = 0;
// write PixMap-Structure:
pPict->WriteUInt16( (sal_uInt16)(nDstRowBytes|0x8000) ) // Bytes per row and the fact that it's a 'PixMap'
.WriteUInt16( (sal_uInt16)0x0000 ) // Y1-position of the bitmap in the source
.WriteUInt16( (sal_uInt16)0x0000 ) // X1-position of the bitmap in the source
.WriteUInt16( (sal_uInt16)nHeight ) // Y2-position of the bitmap in the source
.WriteUInt16( (sal_uInt16)nWidth ) // X2-position of the bitmap in the source
.WriteUInt16( (sal_uInt16)0x0000 ) // Version
.WriteUInt16( (sal_uInt16)nPackType ) // Packing type
pPict->WriteUInt16( (nDstRowBytes|0x8000) ) // Bytes per row and the fact that it's a 'PixMap'
.WriteUInt16( 0x0000 ) // Y1-position of the bitmap in the source
.WriteUInt16( 0x0000 ) // X1-position of the bitmap in the source
.WriteUInt16( nHeight ) // Y2-position of the bitmap in the source
.WriteUInt16( nWidth ) // X2-position of the bitmap in the source
.WriteUInt16( 0x0000 ) // Version
.WriteUInt16( nPackType ) // Packing type
.WriteUInt32( (sal_uInt32) 0x00000000 ) // Packing size (?)
.WriteUInt32( (sal_uInt32) 0x00480000 ) // H-Res
.WriteUInt32( (sal_uInt32) 0x00480000 ) // V-Res
.WriteUInt16( (sal_uInt16)0x0000 ) // Pixel type (?)
.WriteUInt16( (sal_uInt16)nBitsPerPixel ) // Pixel size
.WriteUInt16( (sal_uInt16)0x0001 ) // CmpCount: 1 component
.WriteUInt16( (sal_uInt16)nBitsPerPixel ) // CmpSize
.WriteUInt16( 0x0000 ) // Pixel type (?)
.WriteUInt16( nBitsPerPixel ) // Pixel size
.WriteUInt16( 0x0001 ) // CmpCount: 1 component
.WriteUInt16( nBitsPerPixel ) // CmpSize
.WriteUInt32( (sal_uInt32) 0x00000000 ) // PlaneBytes (?)
.WriteUInt32( (sal_uInt32) 0x00000000 ) // (?)
.WriteUInt32( (sal_uInt32) 0x00000000 ); // (?)
// writing and reading the palette:
nColTabSize = pAcc->GetPaletteEntryCount();
pPict->WriteUInt32( (sal_uInt32)0 ).WriteUInt16( (sal_uInt16)0x8000 ).WriteUInt16( (sal_uInt16)( nColTabSize - 1 ) );
pPict->WriteUInt32( (sal_uInt32)0 ).WriteUInt16( 0x8000 ).WriteUInt16( ( nColTabSize - 1 ) );
for ( i = 0; i < nColTabSize; i++ )
{
nRed = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetRed();
nGreen = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetGreen();
nBlue = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetBlue();
pPict->WriteUInt16( (sal_uInt16)0 ).WriteUChar( nRed ).WriteUChar( nRed ).WriteUChar( nGreen ).WriteUChar( nGreen ).WriteUChar( nBlue ).WriteUChar( nBlue );
pPict->WriteUInt16( 0 ).WriteUChar( nRed ).WriteUChar( nRed ).WriteUChar( nGreen ).WriteUChar( nGreen ).WriteUChar( nBlue ).WriteUChar( nBlue );
}
// writing Source-Rectangle:
pPict->WriteUInt16( (sal_uInt16)0 ).WriteUInt16( (sal_uInt16)0 ).WriteUInt16( (sal_uInt16)nHeight ).WriteUInt16( (sal_uInt16)nWidth );
pPict->WriteUInt16( 0 ).WriteUInt16( 0 ).WriteUInt16( nHeight ).WriteUInt16( nWidth );
// writing Destination-Rectangle:
WritePoint( rPoint );
WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) );
// writing Transfer mode:
pPict->WriteUInt16( (sal_uInt16)0 ); // (?)
pPict->WriteUInt16( 0 ); // (?)
// allocate memory for a row:
boost::scoped_array<sal_uInt8> pPix(new sal_uInt8[ nSrcRowBytes ]);
@ -1183,7 +1183,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
// ByteCount (this is the size of the packed line) initialized with 0 (will be corrected later):
if ( nDstRowBytes > 250 )
pPict->WriteUInt16( (sal_uInt16)0 );
pPict->WriteUInt16( 0 );
else
pPict->WriteUChar( 0 );
@ -1272,7 +1272,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
void PictWriter::WriteOpcode_EndOfFile()
{
pPict->WriteUInt16( (sal_uInt16)0x00ff );
pPict->WriteUInt16( 0x00ff );
}
@ -2053,8 +2053,8 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
if ( pAt->aClipRect != aClipRect )
{
Rectangle aRect( pAt->aClipRect );
pPict ->WriteUInt16( (sal_uInt16)1 ) // opcode 1
.WriteUInt16( (sal_uInt16)10 ) // data size
pPict ->WriteUInt16( 1 ) // opcode 1
.WriteUInt16( 10 ) // data size
.WriteInt16( aRect.Top() ).WriteInt16( aRect.Left() )
.WriteInt16( aRect.Bottom() ).WriteInt16( aRect.Right() );
}
@ -2143,7 +2143,7 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF)
for (i=0;i<128;i++) pPict->WriteUInt32( (sal_uInt32)0 );
// Lo-16-Bits of the file size without the 512 bytes trash:
pPict->WriteUInt16( (sal_uInt16)0 ); // gets corrected later on by UpdateHeader()
pPict->WriteUInt16( 0 ); // gets corrected later on by UpdateHeader()
// The Bounding-Rectangle (y1,x1,y2,x2 !):
WriteRectangle( aRect );
@ -2152,9 +2152,9 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF)
pPict->WriteUInt32( (sal_uInt32)0x001102ff );
// Extended-Version-2-Header:
pPict->WriteUInt16( (sal_uInt16)0x0c00 ) // Opcode
.WriteUInt16( (sal_uInt16)0xfffe ) // Version (?)
.WriteUInt16( (sal_uInt16)0x0000 ) // Reserved
pPict->WriteUInt16( 0x0c00 ) // Opcode
.WriteUInt16( 0xfffe ) // Version (?)
.WriteUInt16( 0x0000 ) // Reserved
.WriteUInt32( (sal_uInt32) 0x00480000 ) // hRes
.WriteUInt32( (sal_uInt32) 0x00480000 );
WriteRectangle( aRect );
@ -2174,7 +2174,7 @@ void PictWriter::UpdateHeader()
// correct the Lo-16-Bits of the file size without the 512 bytes trash:
nPos=pPict->Tell();
pPict->Seek(512);
pPict->WriteUInt16( (sal_uInt16)((nPos-512)&0x0000ffff) );
pPict->WriteUInt16( ((nPos-512)&0x0000ffff) );
pPict->Seek(nPos);
}

View File

@ -378,7 +378,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
rTargetStream.WriteUInt32( (sal_uInt32)0xC6D3D0C5 );
nStreamPosition = rTargetStream.Tell();
rTargetStream.WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 )
.WriteUInt32( nStreamPosition + 26 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt16( (sal_uInt16)0xffff );
.WriteUInt32( nStreamPosition + 26 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt16( 0xffff );
sal_uInt32 nErrCode;
if ( mbGrayScale )

View File

@ -279,7 +279,7 @@ bool TIFFWriter::ImplWriteHeader( bool bMultiPage )
// (OFS8) TIFF image file directory (IFD)
mnCurrentTagCountPos = m_rOStm.Tell();
m_rOStm.WriteUInt16( (sal_uInt16)0 ); // the number of tagentrys is to insert later
m_rOStm.WriteUInt16( 0 ); // the number of tagentrys is to insert later
sal_uInt32 nSubFileFlags = 0;
if ( bMultiPage )
@ -350,17 +350,17 @@ void TIFFWriter::ImplWritePalette()
for ( i = 0; i < mnColors; i++ )
{
const BitmapColor& rColor = mpAcc->GetPaletteColor( i );
m_rOStm.WriteUInt16( (sal_uInt16)( rColor.GetRed() << 8 ) );
m_rOStm.WriteUInt16( ( rColor.GetRed() << 8 ) );
}
for ( i = 0; i < mnColors; i++ )
{
const BitmapColor& rColor = mpAcc->GetPaletteColor( i );
m_rOStm.WriteUInt16( (sal_uInt16)( rColor.GetGreen() << 8 ) );
m_rOStm.WriteUInt16( ( rColor.GetGreen() << 8 ) );
}
for ( i = 0; i < mnColors; i++ )
{
const BitmapColor& rColor = mpAcc->GetPaletteColor( i );
m_rOStm.WriteUInt16( (sal_uInt16)( rColor.GetBlue() << 8 ) );
m_rOStm.WriteUInt16( ( rColor.GetBlue() << 8 ) );
}
}

View File

@ -2211,7 +2211,7 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
}
// write (Windows-)BITMAPINFOHEADER:
(p->pBMP)->WriteUInt32( (sal_uInt32)40 ).WriteUInt32( p->nWidth ).WriteUInt32( p->nHeight );
(p->pBMP)->WriteUInt16( (sal_uInt16)1 ).WriteUInt16( p->nBitsPerPixel );
(p->pBMP)->WriteUInt16( 1 ).WriteUInt16( p->nBitsPerPixel );
(p->pBMP)->WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 );
(p->pBMP)->WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 );
// write color table:

View File

@ -302,7 +302,7 @@ extern "C" int SAL_CALL EscherPropSortFunc( const void* p1, const void* p2 )
void EscherPropertyContainer::Commit( SvStream& rSt, sal_uInt16 nVersion, sal_uInt16 nRecType )
{
rSt.WriteUInt16( (sal_uInt16)( ( nCountCount << 4 ) | ( nVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( nCountSize );
rSt.WriteUInt16( ( ( nCountCount << 4 ) | ( nVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( nCountSize );
if ( nSortCount )
{
qsort( pSortStruct, nSortCount, sizeof( EscherPropSortStruct ), EscherPropSortFunc );
@ -3113,7 +3113,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
std::vector< EnhancedCustomShapeEquation >::const_iterator aEnd ( aEquations.end() );
while( aIter != aEnd )
{
aOut.WriteUInt16( (sal_uInt16)aIter->nOperation )
aOut.WriteUInt16( aIter->nOperation )
.WriteInt16( aIter->nPara[ 0 ] )
.WriteInt16( aIter->nPara[ 1 ] )
.WriteInt16( aIter->nPara[ 2 ] );
@ -4179,7 +4179,7 @@ void EscherBlibEntry::WriteBlibEntry( SvStream& rSt, bool bWritePictureOffset, s
}
rSt.Write( &mnIdentifier[ 0 ], 16 );
rSt.WriteUInt16( (sal_uInt16)0 )
rSt.WriteUInt16( 0 )
.WriteUInt32( (sal_uInt32)( mnSize + mnSizeExtra ) )
.WriteUInt32( mnRefCount )
.WriteUInt32( nPictureOffset )
@ -4462,13 +4462,13 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
.WriteUInt32( (sal_uInt32)0 );
nAtomSize = rPicOutStrm.Tell();
if ( eBlibType == PNG )
rPicOutStrm.WriteUInt16( (sal_uInt16)0x0606 );
rPicOutStrm.WriteUInt16( 0x0606 );
else if ( eBlibType == WMF )
rPicOutStrm.WriteUInt16( (sal_uInt16)0x0403 );
rPicOutStrm.WriteUInt16( 0x0403 );
else if ( eBlibType == EMF )
rPicOutStrm.WriteUInt16( (sal_uInt16)0x0402 );
rPicOutStrm.WriteUInt16( 0x0402 );
else if ( eBlibType == PEG )
rPicOutStrm.WriteUInt16( (sal_uInt16)0x0505 );
rPicOutStrm.WriteUInt16( 0x0505 );
}
// fdo#69607 do not compress WMF files if we are in OOXML export
@ -4556,7 +4556,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
.WriteUInt32( nWidth )
.WriteUInt32( nHeight )
.WriteUInt32( p_EscherBlibEntry->mnSize )
.WriteUInt16( (sal_uInt16)0xfe00 ); // compression Flags
.WriteUInt16( 0xfe00 ); // compression Flags
rPicOutStrm.Write( pGraphicAry, p_EscherBlibEntry->mnSize );
}
}
@ -4887,8 +4887,8 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm )
if ( nCount )
{
sal_uInt32 nRecHdPos, nCurrentPos, nSize;
rStrm .WriteUInt16( (sal_uInt16)( ( nCount << 4 ) | 0xf ) ) // open an ESCHER_SolverContainer
.WriteUInt16( (sal_uInt16)ESCHER_SolverContainer )
rStrm .WriteUInt16( ( ( nCount << 4 ) | 0xf ) ) // open an ESCHER_SolverContainer
.WriteUInt16( ESCHER_SolverContainer )
.WriteUInt32( (sal_uInt32)0 );
nRecHdPos = rStrm.Tell() - 4;
@ -5244,7 +5244,7 @@ bool EscherEx::InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue )
void EscherEx::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
{
mpOutStrm->WriteUInt16( (sal_uInt16)( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( nEscherContainer ).WriteUInt32( (sal_uInt32)0 );
mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( nEscherContainer ).WriteUInt32( (sal_uInt32)0 );
mOffsets.push_back( mpOutStrm->Tell() - 4 );
mRecTypes.push_back( nEscherContainer );
switch( nEscherContainer )
@ -5347,13 +5347,13 @@ void EscherEx::EndAtom( sal_uInt16 nRecType, int nRecVersion, int nRecInstance )
sal_uInt32 nOldPos = mpOutStrm->Tell();
mpOutStrm->Seek( mnCountOfs );
sal_uInt32 nSize = nOldPos - mnCountOfs;
mpOutStrm->WriteUInt16( (sal_uInt16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( (sal_uInt32)( nSize - 8 ) );
mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( (sal_uInt32)( nSize - 8 ) );
mpOutStrm->Seek( nOldPos );
}
void EscherEx::AddAtom( sal_uInt32 nAtomSize, sal_uInt16 nRecType, int nRecVersion, int nRecInstance )
{
mpOutStrm->WriteUInt16( (sal_uInt16)( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( nAtomSize );
mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( nAtomSize );
}
void EscherEx::AddChildAnchor( const Rectangle& rRect )

View File

@ -75,7 +75,7 @@ void SvMetaModule::Save( SvPersistStream & rStm )
{
SvMetaExtern::Save( rStm );
rStm.WriteUInt16( (sal_uInt16)(MODULE_VER | IDL_WRITE_COMPILER) ); // Version
rStm.WriteUInt16( (MODULE_VER | IDL_WRITE_COMPILER) ); // Version
WriteSvDeclPersistList( rStm, aClassList );
WriteSvDeclPersistList( rStm, aTypeList );
@ -96,7 +96,7 @@ void SvMetaModule::Save( SvPersistStream & rStm )
// write length of compiler data
sal_uLong nPos = rStm.Tell();
rStm.Seek( nLenPos );
rStm.WriteUInt16( (sal_uInt16)( nPos - nLenPos - sizeof( sal_uInt16 ) ) );
rStm.WriteUInt16( ( nPos - nLenPos - sizeof( sal_uInt16 ) ) );
rStm.Seek( nPos );
}

View File

@ -851,7 +851,7 @@ void SvMetaType::Save( SvPersistStream & rStm )
if( nMask & 0x0040 ) WriteSvIdentifier( rStm, aSbxName );
if( nMask & 0x0080 ) WriteSvIdentifier( rStm, aOdlName );
if( nMask & 0x0100 ) WriteSvDeclPersistList( rStm, *pAttrList );
if( nMask & 0x0800 ) rStm.WriteUInt16( (sal_uInt16)nType );
if( nMask & 0x0800 ) rStm.WriteUInt16( nType );
if( nMask & 0x1000 ) rStm.WriteChar( cParserChar );
if( nMask & 0x2000 ) WriteSvIdentifier( rStm, aCName );
if( nMask & 0x4000 ) WriteSvIdentifier( rStm, aBasicName );

View File

@ -130,7 +130,7 @@ void SvIdlDataBase::Save( SvStream & rStm, sal_uInt32 nFlags )
aPStm.SetContextFlags( nFlags );
aPStm.WriteUInt32( (sal_uInt32)DATABASE_SIGNATURE );
aPStm.WriteUInt16( (sal_uInt16)DATABASE_VER );
aPStm.WriteUInt16( DATABASE_VER );
bool bOnlyStreamedObjs = false;
if( nFlags & IDL_WRITE_CALLING )

View File

@ -201,7 +201,7 @@ void ScAfVersions::Write(SvStream& rStream, sal_uInt16 fileVersion)
rStream.WriteUInt16( SfxInt32Item(ATTR_ROTATE_VALUE).GetVersion(fileVersion) );
rStream.WriteUInt16( SvxRotateModeItem(SVX_ROTATE_MODE_STANDARD,0).GetVersion(fileVersion) );
rStream.WriteUInt16( (sal_uInt16)0 ); // Num-Format
rStream.WriteUInt16( 0 ); // Num-Format
}
ScAutoFormatDataField::ScAutoFormatDataField() :
@ -1091,7 +1091,7 @@ bool ScAutoFormat::Save()
bRet &= (rStream.GetError() == 0);
rStream.WriteUInt16( (sal_uInt16)(maData.size() - 1) );
rStream.WriteUInt16( (maData.size() - 1) );
bRet &= (rStream.GetError() == 0);
MapType::iterator it = maData.begin(), itEnd = maData.end();
if (it != itEnd)

View File

@ -120,7 +120,7 @@ ScMultipleWriteHeader::~ScMultipleWriteHeader()
{
sal_uLong nDataEnd = rStream.Tell();
rStream.WriteUInt16( (sal_uInt16) SCID_SIZES );
rStream.WriteUInt16( SCID_SIZES );
rStream.WriteUInt32( aMemStream.Tell() );
rStream.Write( aMemStream.GetData(), aMemStream.Tell() );

View File

@ -59,7 +59,7 @@ void ScNumFormatAbbrev::Load( SvStream& rStream, rtl_TextEncoding eByteStrSet )
void ScNumFormatAbbrev::Save( SvStream& rStream, rtl_TextEncoding eByteStrSet ) const
{
rStream.WriteUniOrByteString( sFormatstring, eByteStrSet );
rStream.WriteUInt16( (sal_uInt16) eSysLnge ).WriteUInt16( (sal_uInt16) eLnge );
rStream.WriteUInt16( eSysLnge ).WriteUInt16( eLnge );
}
void ScNumFormatAbbrev::PutFormatIndex(sal_uLong nFormat,

View File

@ -187,7 +187,7 @@ void XclImpChangeTrack::ReadFormula( ScTokenArray*& rpTokenArray, const ScAddres
// to the Convert() routine (to prevent the construction/destruction of the
// converter in each formula)
SvMemoryStream aMemStrm;
aMemStrm.WriteUInt16( (sal_uInt16) 0x0001 ).WriteUInt16( nFmlSize );
aMemStrm.WriteUInt16( 0x0001 ).WriteUInt16( nFmlSize );
size_t nRead = pStrm->CopyToStream( aMemStrm, nFmlSize );
// survive reading invalid streams!

View File

@ -317,7 +317,7 @@ bool ScImportExport::ExportString( OUString& rText, sal_uLong nFmt )
// mba: no BaseURL for data exc
if( ExportStream( aStrm, OUString(), nFmt ) )
{
aStrm.WriteUInt16( (sal_Unicode) 0 );
aStrm.WriteUInt16( 0 );
aStrm.Seek( STREAM_SEEK_TO_END );
rText = OUString( (const sal_Unicode*) aStrm.GetData() );

View File

@ -180,7 +180,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_
mpStrm->WriteUInt32( (sal_uInt32)(nMasterNum | 0x80000000) )// master ID (equals 0x80000000 on a master page)
.WriteUInt32( (sal_uInt32)nPageNum + 0x100 ) // notes ID (equals null if no notes are present)
.WriteUInt16( nMode )
.WriteUInt16( (sal_uInt16)0 ); // padword
.WriteUInt16( 0 ); // padword
mnDiaMode = 0;
bool bVisible = true;
@ -346,8 +346,8 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_
mpStrm->WriteUInt32( (sal_uInt32)0x5f005f )
.WriteUInt32( (sal_uInt32)0x50005f )
.WriteUInt32( (sal_uInt32)0x540050 )
.WriteUInt16( (sal_uInt16)0x31 )
.WriteUInt16( (sal_uInt16)0x30 );
.WriteUInt16( 0x31 )
.WriteUInt16( 0x30 );
}
{
EscherExAtom aBinaryTagData( *mpStrm, EPP_BinaryTagData );
@ -366,8 +366,8 @@ void PPTWriter::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertyS
.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
.WriteUInt16( (sal_uInt16)0 ); // padword
.WriteUInt16( 0 ) // Bit 1: Follow master objects, Bit 2: Follow master scheme, Bit 3: Follow master background
.WriteUInt16( 0 ); // padword
mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 6 );
mpStrm->WriteUInt32( (sal_uInt32)0xffffff ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x808080 ).WriteUInt32( (sal_uInt32)0x000000 ).WriteUInt32( (sal_uInt32)0x99cc00 ).WriteUInt32( (sal_uInt32)0xcc3333 ).WriteUInt32( (sal_uInt32)0xffcccc ).WriteUInt32( (sal_uInt32)0xb2b2b2 );
@ -400,7 +400,7 @@ void PPTWriter::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertyS
bool bFirst = true;
bool bSimpleText = false;
mpStrm->WriteUInt16( (sal_uInt16)5 ); // paragraph count
mpStrm->WriteUInt16( 5 ); // paragraph count
for ( sal_uInt16 nLev = 0; nLev < 5; nLev++ )
{
@ -471,17 +471,17 @@ bool PPTWriter::ImplCreateCurrentUserStream()
sal_uInt32 nLenOfUserName = strlen( pUserName );
sal_uInt32 nSizeOfRecord = 0x14 + ( ( nLenOfUserName + 4 ) & ~ 3 );
mpCurUserStrm->WriteUInt16( (sal_uInt16)0 ).WriteUInt16( (sal_uInt16)EPP_CurrentUserAtom ).WriteUInt32( nSizeOfRecord );
mpCurUserStrm->WriteUInt16( 0 ).WriteUInt16( EPP_CurrentUserAtom ).WriteUInt32( nSizeOfRecord );
mpCurUserStrm->WriteUInt32( (sal_uInt32)0x14 ) // Len
.WriteUInt32( (sal_uInt32)0xe391c05f ); // Magic
sal_uInt32 nEditPos = mpCurUserStrm->Tell();
mpCurUserStrm->WriteUInt32( (sal_uInt32)0x0 ) // OffsetToCurrentEdit;
.WriteUInt16( (sal_uInt16)nLenOfUserName )
.WriteUInt16( (sal_uInt16)0x3f4 ) // DocFileVersion
.WriteUInt16( nLenOfUserName )
.WriteUInt16( 0x3f4 ) // DocFileVersion
.WriteUChar( 3 ) // MajorVersion
.WriteUChar( 0 ) // MinorVersion
.WriteUInt16( (sal_uInt16)0 ); // Pad Word
.WriteUInt16( 0 ); // Pad Word
pUserName[ nLenOfUserName ] = 8;
mpCurUserStrm->Write( pUserName, nLenOfUserName + 1 );
for ( sal_uInt32 i = 0x15 + nLenOfUserName; i < nSizeOfRecord; i++ )
@ -838,10 +838,10 @@ bool PPTWriter::ImplCreateDocument()
const sal_Unicode* pCustomShow = aCustomShow.getStr();
for ( i = 0; i < nCustomShowNameLen; i++ )
{
mpStrm->WriteUInt16( (sal_uInt16)( pCustomShow[ i ] ) );
mpStrm->WriteUInt16( ( pCustomShow[ i ] ) );
}
}
for ( i = nCustomShowNameLen; i < 32; i++, mpStrm->WriteUInt16( (sal_uInt16)0 ) ) ;
for ( i = nCustomShowNameLen; i < 32; i++, mpStrm->WriteUInt16( 0 ) ) ;
mpStrm->WriteUInt32( nFlags );
::com::sun::star::uno::Reference< ::com::sun::star::presentation::XCustomPresentationSupplier >
@ -870,7 +870,7 @@ bool PPTWriter::ImplCreateDocument()
nNamedShowLen = 31;
mpPptEscherEx->AddAtom( nNamedShowLen << 1, EPP_CString );
const sal_Unicode* pCustomShowName = pUString[ i ].getStr();
for ( sal_uInt32 k = 0; k < nNamedShowLen; mpStrm->WriteUInt16( (sal_uInt16)( pCustomShowName[ k++ ] ) ) ) ;
for ( sal_uInt32 k = 0; k < nNamedShowLen; mpStrm->WriteUInt16( ( pCustomShowName[ k++ ] ) ) ) ;
mAny = aXCont->getByName( pUString[ i ] );
if ( mAny.getValue() )
{
@ -976,7 +976,7 @@ bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
{
rStrm.WriteUInt16( rUrl[ i ] );
}
rStrm.WriteUInt16( (sal_uInt16)0 );
rStrm.WriteUInt16( 0 );
}
break;
case 2 :
@ -990,8 +990,8 @@ bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
rStrm.WriteUInt16( rUrl[ i ] );
}
if ( ! ( i & 1 ) )
rStrm.WriteUInt16( (sal_uInt16)0 );
rStrm .WriteUInt16( (sal_uInt16)0 )
rStrm.WriteUInt16( 0 );
rStrm .WriteUInt16( 0 )
.WriteUInt32( (sal_uInt32)0x1f )
.WriteUInt32( (sal_uInt32)1 )
.WriteUInt32( (sal_uInt32)0 );
@ -1138,8 +1138,8 @@ void PPTWriter::ImplWriteNotes( sal_uInt32 nPageNum )
mpPptEscherEx->OpenContainer( EPP_Notes );
mpPptEscherEx->AddAtom( 8, EPP_NotesAtom, 1 );
mpStrm->WriteUInt32( (sal_uInt32)nPageNum + 0x100 )
.WriteUInt16( (sal_uInt16)3 ) // follow master ....
.WriteUInt16( (sal_uInt16)0 );
.WriteUInt16( 3 ) // follow master ....
.WriteUInt16( 0 );
ImplCreateHeaderFooters( mXPagePropSet );

View File

@ -204,7 +204,7 @@ sal_uInt32 PPTWriter::ImplSlideViewInfoContainer( sal_uInt32 nInstance, SvStream
.WriteInt32( nXOrigin ).WriteInt32( nYOrigin ) // Origin
.WriteUChar( 1 ) // Bool1 varScale - Set if zoom to fit is set
.WriteUChar( 0 ) // bool1 draftMode - Not used
.WriteUInt16( (sal_uInt16)0 ) // padword
.WriteUInt16( 0 ) // padword
.WriteUInt32( (sal_uInt32)( ( 7 << 4 ) | ( EPP_GuideAtom << 16 ) ) ).WriteUInt32( (sal_uInt32)8 )
.WriteUInt32( (sal_uInt32)0 ) // Type of the guide. If the guide is horizontal this value is zero. If it's vertical, it's one.
.WriteInt32( nPosition1 ) // Position of the guide in master coordinates. X coordinate if it's vertical, and Y coordinate if it's horizontal.
@ -228,7 +228,7 @@ sal_uInt32 PPTWriter::ImplOutlineViewInfoContainer( SvStream* pStrm )
.WriteInt32( (sal_Int32)-780 ).WriteInt32( (sal_Int32)-84 ) // Origin
.WriteUChar( 1 ) // bool1 varScale - Set if zoom to fit is set
.WriteUChar( 0 ) // bool1 draftMode - Not used
.WriteUInt16( (sal_uInt16)0 ); // padword
.WriteUInt16( 0 ); // padword
}
return nSize;
}
@ -270,7 +270,7 @@ sal_uInt32 PPTWriter::ImplProgBinaryTagContainer( SvStream* pStrm, SvMemoryStrea
pStrm->WriteUInt32( (sal_uInt32)( 0xf | ( EPP_ProgBinaryTag << 16 ) ) ).WriteUInt32( (sal_uInt32)0 )
.WriteUInt32( (sal_uInt32)( EPP_CString << 16 ) ).WriteUInt32( (sal_uInt32)14 )
.WriteUInt32( (sal_uInt32)0x5f005f ).WriteUInt32( (sal_uInt32)0x50005f )
.WriteUInt32( (sal_uInt32)0x540050 ).WriteUInt16( (sal_uInt16)0x39 );
.WriteUInt32( (sal_uInt32)0x540050 ).WriteUInt16( 0x39 );
}
if ( pStrm && pBinTagStrm )
{
@ -373,12 +373,12 @@ sal_uInt32 PPTWriter::ImplInsertBookmarkURL( const OUString& rBookmarkURL, const
}
maHyperlink.push_back( EPPTHyperlink( sBookmarkURL, nType ) );
mpExEmbed->WriteUInt16( (sal_uInt16)0xf )
.WriteUInt16( (sal_uInt16)EPP_ExHyperlink )
mpExEmbed->WriteUInt16( 0xf )
.WriteUInt16( EPP_ExHyperlink )
.WriteUInt32( (sal_uInt32)0 );
sal_uInt32 nHyperSize, nHyperStart = mpExEmbed->Tell();
mpExEmbed->WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)EPP_ExHyperlinkAtom )
mpExEmbed->WriteUInt16( 0 )
.WriteUInt16( EPP_ExHyperlinkAtom )
.WriteUInt32( (sal_uInt32)4 )
.WriteUInt32( nHyperId );
@ -406,7 +406,7 @@ bool PPTWriter::ImplCloseDocument()
SvMemoryStream aTxMasterStyleAtomStrm( 0x200, 0x200 );
{
EscherExAtom aTxMasterStyleAtom( aTxMasterStyleAtomStrm, EPP_TxMasterStyleAtom, EPP_TEXTTYPE_Other );
aTxMasterStyleAtomStrm.WriteUInt16( (sal_uInt16)5 ); // paragraph count
aTxMasterStyleAtomStrm.WriteUInt16( 5 ); // paragraph count
sal_uInt16 nLev;
bool bFirst = true;
for ( nLev = 0; nLev < 5; nLev++ )
@ -444,11 +444,11 @@ bool PPTWriter::ImplCloseDocument()
// CREATE HYPERLINK CONTAINER
if ( nExEmbedSize )
{
mpStrm->WriteUInt16( (sal_uInt16)0xf )
.WriteUInt16( (sal_uInt16)EPP_ExObjList )
mpStrm->WriteUInt16( 0xf )
.WriteUInt16( EPP_ExObjList )
.WriteUInt32( (sal_uInt32)( nExEmbedSize + 12 ) )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)EPP_ExObjListAtom )
.WriteUInt16( 0 )
.WriteUInt16( EPP_ExObjListAtom )
.WriteUInt32( (sal_uInt32)4 )
.WriteUInt32( (sal_uInt32)mnExEmbed );
mpPptEscherEx->InsertPersistOffset( EPP_Persist_ExObj, mpStrm->Tell() );
@ -456,15 +456,15 @@ bool PPTWriter::ImplCloseDocument()
}
// CREATE ENVIRONMENT
mpStrm->WriteUInt16( (sal_uInt16)0xf ).WriteUInt16( (sal_uInt16)EPP_Environment ).WriteUInt32( (sal_uInt32)nEnvironment );
mpStrm->WriteUInt16( 0xf ).WriteUInt16( EPP_Environment ).WriteUInt32( (sal_uInt32)nEnvironment );
// Open Container ( EPP_SrKinsoku )
mpStrm->WriteUInt16( (sal_uInt16)0x2f ).WriteUInt16( (sal_uInt16)EPP_SrKinsoku ).WriteUInt32( (sal_uInt32)12 );
mpStrm->WriteUInt16( 0x2f ).WriteUInt16( EPP_SrKinsoku ).WriteUInt32( (sal_uInt32)12 );
mpPptEscherEx->AddAtom( 4, EPP_SrKinsokuAtom, 0, 3 );
mpStrm->WriteInt32( (sal_Int32)0 ); // SrKinsoku Level 0
// Open Container ( EPP_FontCollection )
mpStrm->WriteUInt16( (sal_uInt16)0xf ).WriteUInt16( (sal_uInt16)EPP_FontCollection ).WriteUInt32( (sal_uInt32)maFontCollection.GetCount() * 76 );
mpStrm->WriteUInt16( 0xf ).WriteUInt16( EPP_FontCollection ).WriteUInt32( (sal_uInt32)maFontCollection.GetCount() * 76 );
for ( sal_uInt32 i = 0; i < maFontCollection.GetCount(); i++ )
{
@ -745,7 +745,7 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj )
if ( nPropertyFlags & 0xf )
rOut.WriteInt16( nBulletFlags );
if ( nPropertyFlags & 0x80 )
rOut.WriteUInt16( (sal_uInt16)( pPara->cBulletId ) );
rOut.WriteUInt16( ( pPara->cBulletId ) );
if ( nPropertyFlags & 0x10 )
rOut.WriteUInt16( nFontId );
if ( nPropertyFlags & 0x40 )
@ -766,17 +766,17 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj )
rOut.WriteUInt32( nBulletColor );
}
if ( nPropertyFlags & 0x00000800 )
rOut.WriteUInt16( (sal_uInt16)( pPara->mnTextAdjust ) );
rOut.WriteUInt16( ( pPara->mnTextAdjust ) );
if ( nPropertyFlags & 0x00001000 )
rOut.WriteUInt16( (sal_uInt16)( nLineSpacing ) );
rOut.WriteUInt16( ( nLineSpacing ) );
if ( nPropertyFlags & 0x00002000 )
rOut.WriteUInt16( (sal_uInt16)( pPara->mnLineSpacingTop ) );
rOut.WriteUInt16( ( pPara->mnLineSpacingTop ) );
if ( nPropertyFlags & 0x00004000 )
rOut.WriteUInt16( (sal_uInt16)( pPara->mnLineSpacingBottom ) );
rOut.WriteUInt16( ( pPara->mnLineSpacingBottom ) );
if ( nPropertyFlags & 0x100 )
rOut.WriteUInt16( (sal_uInt16)(pPara->nTextOfs) );
rOut.WriteUInt16( (pPara->nTextOfs) );
if ( nPropertyFlags & 0x400 )
rOut.WriteUInt16( (sal_uInt16)(pPara->nBulletOfs) );
rOut.WriteUInt16( (pPara->nBulletOfs) );
if ( nPropertyFlags & 0x000e0000 )
{
sal_uInt16 nAsianSettings = 0;
@ -960,13 +960,13 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj )
.WriteUInt32( nPropertyFlags ); //PropertyFlags
if ( nPropertyFlags & 0xffff )
rOut.WriteUInt16( (sal_uInt16)( nCharAttr ) );
rOut.WriteUInt16( ( nCharAttr ) );
if ( nPropertyFlags & 0x00010000 )
rOut.WriteUInt16( rPortion.mnFont );
if ( nPropertyFlags & 0x00200000 )
rOut.WriteUInt16( rPortion.mnAsianOrComplexFont );
if ( nPropertyFlags & 0x00020000 )
rOut.WriteUInt16( (sal_uInt16)( rPortion.mnCharHeight ) );
rOut.WriteUInt16( ( rPortion.mnCharHeight ) );
if ( nPropertyFlags & 0x00040000 )
rOut.WriteUInt32( (sal_uInt32)nCharColor );
if ( nPropertyFlags & 0x00080000 )
@ -1113,7 +1113,7 @@ 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( ( pFieldEntry->nFieldType & 0xff ) ) // Type
.WriteUChar( 0 ).WriteUInt16( (sal_uInt16)0 ); // PadBytes
.WriteUChar( 0 ).WriteUInt16( 0 ); // PadBytes
}
break;
case 3 :
@ -1276,7 +1276,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
pRuleOut->WriteUInt32( nTextRulerAtomFlags );
if ( nTextRulerAtomFlags & 4 )
{
pRuleOut->WriteUInt16( (sal_uInt16)nTabCount );
pRuleOut->WriteUInt16( nTabCount );
for ( i = 0; i < nTabs; i++ )
{
sal_uInt16 nPosition = (sal_uInt16)( ( pTabStop[ i ].Position / 4.40972 ) + nTextOfs );
@ -1369,7 +1369,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
rExtBuStr.WriteUInt32( (sal_uInt32)nNumberingType );
}
if ( nBulletFlags & 0x2000000 )
rExtBuStr.WriteUInt16( (sal_uInt16)pBulletPara->nStartWith );
rExtBuStr.WriteUInt16( pBulletPara->nStartWith );
rExtBuStr.WriteUInt32( (sal_uInt32)0 ).WriteUInt32( (sal_uInt32)0 );
}
sal_uInt32 nBulletSize = ( rExtBuStr.Tell() - nPos2 ) - 8;
@ -1895,7 +1895,7 @@ void PPTWriter::ImplWriteObjectEffect( SvStream& rSt,
.WriteUInt16( nOrder ) // order of build ( 1.. )
.WriteUInt16( nSlideCount ).WriteUChar( nBuildType ).WriteUChar( nFlyMethod ).WriteUChar( nFlyDirection )
.WriteUChar( nAfterEffect ).WriteUChar( nSubEffect ).WriteUChar( nOleVerb )
.WriteUInt16( (sal_uInt16)0 ); // PadWord
.WriteUInt16( 0 ); // PadWord
}
void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentation::ClickAction eCa, bool bMediaClickAction )
@ -2118,7 +2118,7 @@ bool PPTWriter::ImplCreatePresentationPlaceholder( const bool bMasterPage, const
mpStrm->WriteUInt32( (sal_uInt32)0 ) // PlacementID
.WriteUChar( nPlaceHolderId ) // PlaceHolderID
.WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER )
.WriteUInt16( (sal_uInt16)0 ); // padword
.WriteUInt16( 0 ); // padword
mpPptEscherEx->CloseContainer(); // ESCHER_ClientData
if ( aClientTextBox.Tell() )
@ -2816,7 +2816,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
mpStrm->WriteUInt32( (sal_uInt32)0 ) // PlacementID
.WriteUChar( EPP_PLACEHOLDER_MASTERTITLE ) // PlaceHolderID
.WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER )
.WriteUInt16( (sal_uInt16)0 ); // padword
.WriteUInt16( 0 ); // padword
mpPptEscherEx->CloseContainer(); // ESCHER_ClientData
mpPptEscherEx->OpenContainer( ESCHER_ClientTextbox );
mpPptEscherEx->AddAtom( 4, EPP_TextHeaderAtom );
@ -2831,9 +2831,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
mpStrm->WriteUInt16( nChar );
}
mpPptEscherEx->AddAtom( 6, EPP_BaseTextPropAtom );
mpStrm->WriteUInt32( (sal_uInt32)( mnTextSize + 1 ) ).WriteUInt16( (sal_uInt16)0 );
mpStrm->WriteUInt32( (sal_uInt32)( mnTextSize + 1 ) ).WriteUInt16( 0 );
mpPptEscherEx->AddAtom( 10, EPP_TextSpecInfoAtom );
mpStrm->WriteUInt32( (sal_uInt32)( mnTextSize + 1 ) ).WriteUInt32( (sal_uInt32)1 ).WriteUInt16( (sal_uInt16)0 );
mpStrm->WriteUInt32( (sal_uInt32)( mnTextSize + 1 ) ).WriteUInt32( (sal_uInt32)1 ).WriteUInt16( 0 );
mpPptEscherEx->CloseContainer(); // ESCHER_ClientTextBox
mpPptEscherEx->CloseContainer(); // ESCHER_SpContainer
}
@ -2909,7 +2909,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
mpStrm->WriteUInt32( (sal_uInt32)1 ) // PlacementID
.WriteUChar( PlaceHolderID )/*(sal_uInt8)EPP_PLACEHOLDER_MASTERBODY */ // PlaceHolderID
.WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER )
.WriteUInt16( (sal_uInt16)0 ); // padword
.WriteUInt16( 0 ); // padword
mpPptEscherEx->CloseContainer(); // ESCHER_ClientData
mpPptEscherEx->OpenContainer( ESCHER_ClientTextbox ); // printf
mpPptEscherEx->AddAtom( 4, EPP_TextHeaderAtom );
@ -2933,7 +2933,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
}
mpPptEscherEx->EndAtom( EPP_BaseTextPropAtom );
mpPptEscherEx->AddAtom( 10, EPP_TextSpecInfoAtom );
mpStrm->WriteUInt32( (sal_uInt32)( mnTextSize ) ).WriteUInt32( (sal_uInt32)1 ).WriteUInt16( (sal_uInt16)0 );
mpStrm->WriteUInt32( (sal_uInt32)( mnTextSize ) ).WriteUInt32( (sal_uInt32)1 ).WriteUInt16( 0 );
mpPptEscherEx->CloseContainer(); // ESCHER_ClientTextBox
mpPptEscherEx->CloseContainer(); // ESCHER_SpContainer
@ -3135,24 +3135,24 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
// SJ: creating the Media RefObj
sal_uInt32 nRefId = ++mnExEmbed;
mpExEmbed->WriteUInt16( (sal_uInt16)0xf )
.WriteUInt16( (sal_uInt16)EPP_ExMCIMovie ) // PPT_PST_ExAviMovie
mpExEmbed->WriteUInt16( 0xf )
.WriteUInt16( EPP_ExMCIMovie ) // PPT_PST_ExAviMovie
.WriteUInt32( (sal_uInt32)0 );
sal_uInt32 nSize, nStart = mpExEmbed->Tell();
mpExEmbed->WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)EPP_ExObjRefAtom )
mpExEmbed->WriteUInt16( 0 )
.WriteUInt16( EPP_ExObjRefAtom )
.WriteUInt32( (sal_uInt32)4 )
.WriteUInt32( nRefId );
mpExEmbed->WriteUInt16( (sal_uInt16)0xf )
.WriteUInt16( (sal_uInt16)EPP_ExVideo )
mpExEmbed->WriteUInt16( 0xf )
.WriteUInt16( EPP_ExVideo )
.WriteUInt32( (sal_uInt32)0 );
mpExEmbed->WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)EPP_ExMediaAtom )
mpExEmbed->WriteUInt16( 0 )
.WriteUInt16( EPP_ExMediaAtom )
.WriteUInt32( (sal_uInt32)8 )
.WriteUInt32( nRefId )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)0x435 );
.WriteUInt16( 0 )
.WriteUInt16( 0x435 );
sal_uInt16 i, nStringLen = (sal_uInt16)aMediaURL.getLength();
mpExEmbed->WriteUInt32( (sal_uInt32)( EPP_CString << 16 ) ).WriteUInt32( (sal_uInt32)( nStringLen * 2 ) );
@ -3171,14 +3171,14 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
if ( !pClientData )
pClientData = new SvMemoryStream( 0x200, 0x200 );
pClientData->WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)EPP_ExObjRefAtom )
pClientData->WriteUInt16( 0 )
.WriteUInt16( EPP_ExObjRefAtom )
.WriteUInt32( (sal_uInt32)4 )
.WriteUInt32( nRefId );
// write EPP_InteractiveInfo container for no_action
pClientData->WriteUInt32( (sal_uInt32)( ( EPP_InteractiveInfo << 16 ) | 0xf ) ).WriteUInt32( (sal_uInt32)24 );
pClientData->WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)EPP_InteractiveInfoAtom )
pClientData->WriteUInt16( 0 )
.WriteUInt16( EPP_InteractiveInfoAtom )
.WriteUInt32( (sal_uInt32)16 )
.WriteUInt32( (sal_uInt32) 0 )
.WriteUInt32( (sal_uInt32) 0 )
@ -3252,7 +3252,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
.WriteInt32( nPlacementID ) // PlacementID
.WriteUChar( nPlaceHolderAtom ) // PlaceHolderID
.WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER )
.WriteUInt16( (sal_uInt16)0 ); // padword
.WriteUInt16( 0 ); // padword
}
if ( nOlePictureId )
{
@ -3634,7 +3634,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
aMemStrm.ObjectOwnsMemory( false );
aMemStrm.WriteUInt16( nRowCount )
.WriteUInt16( nRowCount )
.WriteUInt16( (sal_uInt16)4 );
.WriteUInt16( 4 );
std::vector< std::pair< sal_Int32, sal_Int32 > >::const_iterator aIter( aRows.begin() );
while( aIter != aRows.end() )

View File

@ -85,12 +85,12 @@ void PptEscherEx::ImplWriteOptAtom( SvStream& rSt )
{
rSt.WriteUInt32( (sal_uInt32)( ( ESCHER_OPT << 16 ) | ( ESCHER_OPT_COUNT << 4 ) | 0x3 ) )
.WriteUInt32( (sal_uInt32)( nSize - 8 ) )
.WriteUInt16( (sal_uInt16)ESCHER_Prop_fillColor ) .WriteUInt32( (sal_uInt32)0xffb800 )
.WriteUInt16( (sal_uInt16)ESCHER_Prop_fillBackColor ) .WriteUInt32( (sal_uInt32)0 )
.WriteUInt16( (sal_uInt16)ESCHER_Prop_fNoFillHitTest ) .WriteUInt32( (sal_uInt32)0x00100010 )
.WriteUInt16( (sal_uInt16)ESCHER_Prop_lineColor ) .WriteUInt32( (sal_uInt32)0x8000001 )
.WriteUInt16( (sal_uInt16)ESCHER_Prop_fNoLineDrawDash ) .WriteUInt32( (sal_uInt32)0x00080008 )
.WriteUInt16( (sal_uInt16)ESCHER_Prop_shadowColor ) .WriteUInt32( (sal_uInt32)0x8000002 );
.WriteUInt16( ESCHER_Prop_fillColor ) .WriteUInt32( (sal_uInt32)0xffb800 )
.WriteUInt16( ESCHER_Prop_fillBackColor ) .WriteUInt32( (sal_uInt32)0 )
.WriteUInt16( ESCHER_Prop_fNoFillHitTest ) .WriteUInt32( (sal_uInt32)0x00100010 )
.WriteUInt16( ESCHER_Prop_lineColor ) .WriteUInt32( (sal_uInt32)0x8000001 )
.WriteUInt16( ESCHER_Prop_fNoLineDrawDash ) .WriteUInt32( (sal_uInt32)0x00080008 )
.WriteUInt16( ESCHER_Prop_shadowColor ) .WriteUInt32( (sal_uInt32)0x8000002 );
}
}
@ -125,7 +125,7 @@ PptEscherEx::~PptEscherEx()
void PptEscherEx::OpenContainer( sal_uInt16 n_EscherContainer, int nRecInstance )
{
mpOutStrm->WriteUInt16( (sal_uInt16)( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( n_EscherContainer ).WriteUInt32( (sal_uInt32)0 );
mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( n_EscherContainer ).WriteUInt32( (sal_uInt32)0 );
mOffsets.push_back( mpOutStrm->Tell() - 4 );
mRecTypes.push_back( n_EscherContainer );

View File

@ -1231,7 +1231,7 @@ void AnimationExporter::writeZString( SvStream& rStrm, const OUString& rVal )
sal_Int32 i;
for ( i = 0; i < rVal.getLength(); i++ )
rStrm.WriteUInt16( rVal[ i ] );
rStrm.WriteUInt16( (sal_Unicode)0 );
rStrm.WriteUInt16( 0 );
}
void AnimationExporter::exportAnimAction( SvStream& rStrm, const Reference< XAnimationNode >& xNode )

View File

@ -198,7 +198,7 @@ void ExSoundCollection::Write( SvStream& rSt ) const
sal_uInt32 nSoundCount = maEntries.size();
// create SoundCollection Container
rSt.WriteUInt16( (sal_uInt16)0xf ).WriteUInt16( (sal_uInt16)EPP_SoundCollection ).WriteUInt32( (sal_uInt32)( GetSize() - 8 ) );
rSt.WriteUInt16( 0xf ).WriteUInt16( EPP_SoundCollection ).WriteUInt32( (sal_uInt32)( GetSize() - 8 ) );
// create SoundCollAtom ( reference to the next free SoundId );
rSt.WriteUInt32( (sal_uInt32)( EPP_SoundCollAtom << 16 ) ).WriteUInt32( (sal_uInt32)4 ).WriteUInt32( nSoundCount );

View File

@ -121,8 +121,8 @@ void PPTExCharSheet::Write( SvStream& rSt, PptEscherEx*, sal_uInt16 nLev, bool,
else
{
rSt.WriteUInt16( rLev.mnAsianOrComplexFont )
.WriteUInt16( (sal_uInt16)0xffff ) // unknown
.WriteUInt16( (sal_uInt16)0xffff ) // unknown
.WriteUInt16( 0xffff ) // unknown
.WriteUInt16( 0xffff ) // unknown
.WriteUInt16( rLev.mnFontHeight )
.WriteUInt32( nFontColor )
.WriteUInt16( rLev.mnEscapement );
@ -326,15 +326,15 @@ void PPTExParaSheet::Write( SvStream& rSt, PptEscherEx*, sal_uInt16 nLev, bool,
{
rOut.WriteUInt32( (sal_uInt32)( ( EPP_PST_ExtendedParagraphMasterAtom << 16 ) | ( mnInstance << 4 ) ) )
.WriteUInt32( (sal_uInt32)( 5 * 16 + 2 ) )
.WriteUInt16( (sal_uInt16)5 ); // depth
.WriteUInt16( 5 ); // depth
}
sal_uInt16 nBulletId = rLev.mnBulletId;
if ( rLev.mnNumberingType != SVX_NUM_BITMAP )
nBulletId = 0xffff;
rOut.WriteUInt32( (sal_uInt32)0x03800000 )
.WriteUInt16( (sal_uInt16)nBulletId )
.WriteUInt16( nBulletId )
.WriteUInt32( (sal_uInt32)rLev.mnMappedNumType )
.WriteUInt16( (sal_uInt16)rLev.mnBulletStart )
.WriteUInt16( rLev.mnBulletStart )
.WriteUInt32( (sal_uInt32)0 );
}
@ -377,8 +377,8 @@ void PPTExParaSheet::Write( SvStream& rSt, PptEscherEx*, sal_uInt16 nLev, bool,
else
{
rSt.WriteUInt16( rLev.mnDefaultTab )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( 0 )
.WriteUInt16( 0 )
.WriteUInt16( rLev.mnAsianSettings )
.WriteUInt16( rLev.mnBiDi );
}
@ -485,9 +485,9 @@ void PPTExStyleSheet::WriteTxCFStyleAtom( SvStream& rSt )
rSt.WriteUInt32( (sal_uInt32)( EPP_TxCFStyleAtom << 16 ) ) // recordheader
.WriteUInt32( SizeOfTxCFStyleAtom() - 8 )
.WriteUInt16( (sal_uInt16)( 0x80 | nCharFlags ) )
.WriteUInt16( (sal_uInt16)nFlags )
.WriteUInt16( (sal_uInt16)nCharFlags )
.WriteUInt16( ( 0x80 | nCharFlags ) )
.WriteUInt16( nFlags )
.WriteUInt16( nCharFlags )
.WriteInt32( (sal_Int32)-1 ) // ?
.WriteUInt16( rCharStyle.mnFontHeight )
.WriteUInt32( rCharStyle.mnFontColor );

View File

@ -224,7 +224,7 @@ void PortionObj::Write( SvStream* pStrm, bool bLast )
if ( bLast && mbLastPortion )
nCount--;
for ( sal_uInt32 i = 0; i < nCount; i++ )
pStrm->WriteUInt16( (sal_uInt16)mpText[ i ] );
pStrm->WriteUInt16( mpText[ i ] );
}
void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGetPropStateValue )

View File

@ -301,13 +301,13 @@ SvStream& WriteSdPublishingDesign(SvStream& rOut, const SdPublishingDesign& rDes
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aDesignName,
RTL_TEXTENCODING_UTF8);
rOut.WriteUInt16( (sal_uInt16)rDesign.m_eMode );
rOut.WriteUInt16( rDesign.m_eMode );
rOut.WriteUChar( rDesign.m_bContentPage );
rOut.WriteUChar( rDesign.m_bNotes );
rOut.WriteUInt16( rDesign.m_nResolution );
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aCompression,
RTL_TEXTENCODING_UTF8);
rOut.WriteUInt16( (sal_uInt16)rDesign.m_eFormat );
rOut.WriteUInt16( rDesign.m_eFormat );
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aAuthor,
RTL_TEXTENCODING_UTF8);
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aEMail,
@ -328,7 +328,7 @@ SvStream& WriteSdPublishingDesign(SvStream& rOut, const SdPublishingDesign& rDes
rOut.WriteUChar( rDesign.m_bUseAttribs );
rOut.WriteUChar( rDesign.m_bUseColor );
rOut.WriteUInt16( (sal_uInt16)rDesign.m_eScript );
rOut.WriteUInt16( rDesign.m_eScript );
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aURL,
RTL_TEXTENCODING_UTF8);
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aCGI,

View File

@ -100,7 +100,7 @@ void MorphDlg::SaveSettings() const
{
SdIOCompat aCompat( *xOStm, STREAM_WRITE, 1 );
xOStm->WriteUInt16( (sal_uInt16) m_pMtfSteps->GetValue() )
xOStm->WriteUInt16( m_pMtfSteps->GetValue() )
.WriteUChar( m_pCbxOrientation->IsChecked() )
.WriteUChar( m_pCbxAttributes->IsChecked() );
}

View File

@ -334,8 +334,8 @@ void SdVectorizeDlg::SaveSettings() const
if( xOStm.Is() )
{
SdIOCompat aCompat( *xOStm, STREAM_WRITE, 1 );
xOStm->WriteUInt16( (sal_uInt16) m_pNmLayers->GetValue() ).WriteUInt16( (sal_uInt16) m_pMtReduce->GetValue() );
xOStm->WriteUInt16( (sal_uInt16) m_pMtFillHoles->GetValue() ).WriteUChar( m_pCbFillHoles->IsChecked() );
xOStm->WriteUInt16( m_pNmLayers->GetValue() ).WriteUInt16( m_pMtReduce->GetValue() );
xOStm->WriteUInt16( m_pMtFillHoles->GetValue() ).WriteUChar( m_pCbFillHoles->IsChecked() );
}
}

View File

@ -86,7 +86,7 @@ SfxPoolItem* SvxZoomItem::Create( SvStream& rStrm, sal_uInt16 /*nVersion*/ ) con
SvStream& SvxZoomItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const
{
rStrm.WriteUInt16( (sal_uInt16)GetValue() )
rStrm.WriteUInt16( GetValue() )
.WriteUInt16( nValueSet )
.WriteSChar( eType );
return rStrm;

View File

@ -129,7 +129,7 @@ SvStream& SvxMacroTableDtor::Write( SvStream& rStream ) const
if( SVX_MACROTBL_VERSION40 <= nVersion )
rStream.WriteUInt16( nVersion );
rStream.WriteUInt16( (sal_uInt16)aSvxMacroTable.size() );
rStream.WriteUInt16( aSvxMacroTable.size() );
SvxMacroTable::const_iterator it = aSvxMacroTable.begin();
while( it != aSvxMacroTable.end() && rStream.GetError() == SVSTREAM_OK )
@ -140,7 +140,7 @@ SvStream& SvxMacroTableDtor::Write( SvStream& rStream ) const
writeByteString(rStream, rMac.GetMacName());
if( SVX_MACROTBL_VERSION40 <= nVersion )
rStream.WriteUInt16( (sal_uInt16)rMac.GetScriptType() );
rStream.WriteUInt16( rMac.GetScriptType() );
++it;
}
return rStream;

View File

@ -224,7 +224,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
rStream.WriteUInt16( convertSfxItemKindToUInt16(pItem->GetKind()) );
else
{
rStream.WriteUInt16( (sal_uInt16) pItem->GetRefCount() );
rStream.WriteUInt16( pItem->GetRefCount() );
if( pItem->GetRefCount() > SFX_ITEMS_OLD_MAXREF )
rStream.SetError( ERRCODE_IO_NOTSTORABLEINBINARYFORMAT );
}

View File

@ -118,7 +118,7 @@ ImpSvNumMultipleWriteHeader::~ImpSvNumMultipleWriteHeader()
{
sal_uLong nDataEnd = rStream.Tell();
rStream.WriteUInt16( (sal_uInt16) SV_NUMID_SIZES );
rStream.WriteUInt16( SV_NUMID_SIZES );
rStream.WriteUInt32( aMemStream.Tell() );
rStream.Write( aMemStream.GetData(), aMemStream.Tell() );

View File

@ -786,8 +786,8 @@ bool SvNumberFormatter::Save( SvStream& rStream ) const
ImpSvNumMultipleWriteHeader aHdr( rStream );
// As of 364i we store what SYSTEM locale really was, before it was hard
// coded LANGUAGE_SYSTEM.
rStream.WriteUInt16( (sal_uInt16) SV_NUMBERFORMATTER_VERSION );
rStream.WriteUInt16( (sal_uInt16) SvtSysLocale().GetLanguageTag().getLanguageType() ).WriteUInt16( (sal_uInt16) IniLnge );
rStream.WriteUInt16( SV_NUMBERFORMATTER_VERSION );
rStream.WriteUInt16( SvtSysLocale().GetLanguageTag().getLanguageType() ).WriteUInt16( IniLnge );
const SvNumberFormatTable* pTable = &aFTable;
SvNumberFormatTable::const_iterator it = pTable->begin();
@ -801,8 +801,8 @@ bool SvNumberFormatter::Save( SvStream& rStream ) const
pEntry->GetNewStandardDefined() || (it->first % SV_COUNTRY_LANGUAGE_OFFSET == 0) )
{
rStream.WriteUInt32( it->first )
.WriteUInt16( (sal_uInt16) LANGUAGE_SYSTEM )
.WriteUInt16( (sal_uInt16) pEntry->GetLanguage() );
.WriteUInt16( LANGUAGE_SYSTEM )
.WriteUInt16( pEntry->GetLanguage() );
pEntry->Save(rStream, aHdr);
}
++it;
@ -811,7 +811,7 @@ bool SvNumberFormatter::Save( SvStream& rStream ) const
// as of SV_NUMBERFORMATTER_VERSION_YEAR2000
aHdr.StartEntry();
rStream.WriteUInt16( (sal_uInt16) GetYear2000() );
rStream.WriteUInt16( GetYear2000() );
aHdr.EndEntry();
return rStream.GetError() ? false : true;

View File

@ -1983,7 +1983,7 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
rHdr.StartEntry();
rStream.WriteUniOrByteString( aFormatstring, rStream.GetStreamCharSet() );
rStream.WriteInt16( eType ).WriteDouble( fLimit1 ).WriteDouble( fLimit2 ).WriteUInt16( (sal_uInt16) eOp1 ).WriteUInt16( (sal_uInt16) eOp2 )
rStream.WriteInt16( eType ).WriteDouble( fLimit1 ).WriteDouble( fLimit2 ).WriteUInt16( eOp1 ).WriteUInt16( eOp2 )
.WriteUChar( bOldStandard ).WriteUChar( bIsUsed );
for (sal_uInt16 i = 0; i < 4; i++)
{

View File

@ -108,7 +108,7 @@ SvStream& WriteGraphicAttr( SvStream& rOStm, const GraphicAttr& rAttr )
rOStm.WriteDouble( rAttr.mfGamma );
rOStm.WriteUInt32( rAttr.mnMirrFlags ).WriteUInt16( rAttr.mnRotate10 );
rOStm.WriteInt16( rAttr.mnContPercent ).WriteInt16( rAttr.mnLumPercent ).WriteInt16( rAttr.mnRPercent ).WriteInt16( rAttr.mnGPercent ).WriteInt16( rAttr.mnBPercent );
rOStm.WriteUChar( rAttr.mbInvert ).WriteUChar( rAttr.mcTransparency ).WriteUInt16( (sal_uInt16) rAttr.meDrawMode );
rOStm.WriteUChar( rAttr.mbInvert ).WriteUChar( rAttr.mcTransparency ).WriteUInt16( rAttr.meDrawMode );
rOStm.WriteInt32( rAttr.mnLeftCrop )
.WriteInt32( rAttr.mnTopCrop )
.WriteInt32( rAttr.mnRightCrop )

View File

@ -173,7 +173,7 @@ void SgaObject::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
static const sal_uInt32 nInventor = COMPAT_FORMAT( 'S', 'G', 'A', '3' );
rOut.WriteUInt32( nInventor ).WriteUInt16( (sal_uInt16) 0x0004 ).WriteUInt16( GetVersion() ).WriteUInt16( (sal_uInt16) GetObjKind() );
rOut.WriteUInt32( nInventor ).WriteUInt16( 0x0004 ).WriteUInt16( GetVersion() ).WriteUInt16( GetObjKind() );
rOut.WriteUChar( bIsThumbBmp );
if( bIsThumbBmp )
@ -367,7 +367,7 @@ BitmapEx SgaObjectSound::GetThumbBmp() const
void SgaObjectSound::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
SgaObject::WriteData( rOut, rDestDir );
rOut.WriteUInt16( (sal_uInt16) eSoundType );
rOut.WriteUInt16( eSoundType );
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}

View File

@ -1297,9 +1297,9 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
sal_uInt32 nCount = GetObjectCount();
bool bRel;
rOStm.WriteUInt16( (sal_uInt16) 0x0004 );
rOStm.WriteUInt16( 0x0004 );
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, GetRealName(), RTL_TEXTENCODING_UTF8);
rOStm.WriteUInt32( nCount ).WriteUInt16( (sal_uInt16) osl_getThreadTextEncoding() );
rOStm.WriteUInt32( nCount ).WriteUInt16( osl_getThreadTextEncoding() );
for( sal_uInt32 i = 0; i < nCount; i++ )
{
@ -1351,7 +1351,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
rOStm.WriteUChar( bRel );
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aPath, RTL_TEXTENCODING_UTF8);
rOStm.WriteUInt32( pObj->nOffset ).WriteUInt16( (sal_uInt16) pObj->eObjKind );
rOStm.WriteUInt32( pObj->nOffset ).WriteUInt16( pObj->eObjKind );
}
// more recently, a 512-byte reserve buffer is written,

View File

@ -76,7 +76,7 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
const SvxMacro& rMac = it->second;
if( STARBASIC == rMac.GetScriptType() )
{
rStrm.WriteUInt16( (sal_uInt16)it->first );
rStrm.WriteUInt16( it->first );
// UNICODE: rStrm << pMac->GetLibName();
rStrm.WriteUniOrByteString(rMac.GetLibName(), rStrm.GetStreamCharSet());
@ -98,7 +98,7 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
const SvxMacro& rMac = it->second;
if( STARBASIC != rMac.GetScriptType() )
{
rStrm.WriteUInt16( (sal_uInt16)it->first );
rStrm.WriteUInt16( it->first );
// UNICODE: rStrm << pMac->GetLibName();
rStrm.WriteUniOrByteString(rMac.GetLibName(), rStrm.GetStreamCharSet());
@ -106,7 +106,7 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
// UNICODE: rStrm << pMac->GetMacName();
rStrm.WriteUniOrByteString(rMac.GetMacName(), rStrm.GetStreamCharSet());
rStrm.WriteUInt16( (sal_uInt16)rMac.GetScriptType() );
rStrm.WriteUInt16( rMac.GetScriptType() );
}
}
}

View File

@ -535,7 +535,7 @@ bool SwBoxAutoFmt::Save( SvStream& rStream, sal_uInt16 fileVersion ) const
// --- from 680/dr25 on: store strings as UTF-8
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStream, sNumFmtString,
RTL_TEXTENCODING_UTF8);
rStream.WriteUInt16( (sal_uInt16)eSysLanguage ).WriteUInt16( (sal_uInt16)eNumFmtLanguage );
rStream.WriteUInt16( eSysLanguage ).WriteUInt16( eNumFmtLanguage );
return 0 == rStream.GetError();
}
@ -574,7 +574,7 @@ bool SwBoxAutoFmt::SaveVersionNo( SvStream& rStream, sal_uInt16 fileVersion ) co
rStream.WriteUInt16( aRotateAngle.GetVersion( fileVersion ) );
rStream.WriteUInt16( aRotateMode.GetVersion( fileVersion ) );
rStream.WriteUInt16( (sal_uInt16)0 ); // NumberFormat
rStream.WriteUInt16( 0 ); // NumberFormat
return 0 == rStream.GetError();
}

View File

@ -322,7 +322,7 @@ bool SwEditShell::GetSelectedText( OUString &rBuf, int nHndlParaBrk )
if (!IsError(aWriter.Write(xWrt)))
{
aStream.WriteUInt16( (sal_Unicode)'\0' );
aStream.WriteUInt16( '\0' );
const sal_Unicode *p = (sal_Unicode*)aStream.GetBuffer();
if (p)

View File

@ -191,7 +191,7 @@ void SwUnoCursorHelper::GetTextFromPam(SwPaM & rPam, OUString & rBuffer)
0x7ffffff > (( lLen = aStream.GetSize() )
/ sizeof( sal_Unicode )) + 1 )
{
aStream.WriteUInt16( (sal_Unicode)'\0' );
aStream.WriteUInt16( '\0' );
aStream.Seek( 0 );
aStream.ResetError();

View File

@ -1415,19 +1415,19 @@ void WinwordAnchoring::WriteData( EscherEx& rEx ) const
if (mbInline)
{
rEx.AddAtom(18, DFF_msofbtUDefProp, 3, 3); //Prop id is 0xF122
rSt.WriteUInt16( (sal_uInt16)0x0390 ).WriteUInt32( 3 );
rSt.WriteUInt16( (sal_uInt16)0x0392 ).WriteUInt32( 3 );
rSt.WriteUInt16( 0x0390 ).WriteUInt32( 3 );
rSt.WriteUInt16( 0x0392 ).WriteUInt32( 3 );
//This sub property is required to be in the dummy inline frame as
//well
rSt.WriteUInt16( (sal_uInt16)0x053F ).WriteUInt32( nInlineHack );
rSt.WriteUInt16( 0x053F ).WriteUInt32( nInlineHack );
}
else
{
rEx.AddAtom(24, DFF_msofbtUDefProp, 3, 4 ); //Prop id is 0xF122
rSt.WriteUInt16( (sal_uInt16)0x038F ).WriteUInt32( mnXAlign );
rSt.WriteUInt16( (sal_uInt16)0x0390 ).WriteUInt32( mnXRelTo );
rSt.WriteUInt16( (sal_uInt16)0x0391 ).WriteUInt32( mnYAlign );
rSt.WriteUInt16( (sal_uInt16)0x0392 ).WriteUInt32( mnYRelTo );
rSt.WriteUInt16( 0x038F ).WriteUInt32( mnXAlign );
rSt.WriteUInt16( 0x0390 ).WriteUInt32( mnXRelTo );
rSt.WriteUInt16( 0x0391 ).WriteUInt32( mnYAlign );
rSt.WriteUInt16( 0x0392 ).WriteUInt32( mnYRelTo );
}
}
}
@ -1516,7 +1516,7 @@ void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShape
WriteFrmExtraData(rFmt);
AddAtom(6, DFF_msofbtUDefProp, 3, 1); //Prop id is 0xF122
GetStream().WriteUInt16( (sal_uInt16)0x053F ).WriteUInt32( nInlineHack );
GetStream().WriteUInt16( 0x053F ).WriteUInt32( nInlineHack );
CloseContainer(); // ESCHER_SpContainer
}
@ -2204,8 +2204,8 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
OpenContainer( ESCHER_DggContainer );
sal_uInt16 nColorCount = 4;
pStrm ->WriteUInt16( (sal_uInt16)( nColorCount << 4 ) ) // instance
.WriteUInt16( (sal_uInt16)ESCHER_SplitMenuColors ) // record type
pStrm ->WriteUInt16( ( nColorCount << 4 ) ) // instance
.WriteUInt16( ESCHER_SplitMenuColors ) // record type
.WriteUInt32( (sal_uInt32)( nColorCount * 4 ) ) // size
.WriteUInt32( (sal_uInt32)0x08000004 )
.WriteUInt32( (sal_uInt32)0x08000001 )

View File

@ -3852,7 +3852,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
SwWW8Writer::WriteString_xstz( *pDataStrm, OUString( ffentrymcr ), true );
SwWW8Writer::WriteString_xstz( *pDataStrm, OUString( ffexitmcr ), true );
if (type==2) {
pDataStrm->WriteUInt16( (sal_uInt16)0xFFFF );
pDataStrm->WriteUInt16( 0xFFFF );
const int items=aListItems.size();
pDataStrm->WriteUInt32( (sal_uInt32)items );
for(int i=0;i<items;i++) {

View File

@ -325,7 +325,7 @@ void SvPersistStream::WriteCompressed( SvStream & rStm, sal_uInt32 nVal )
rStm.WriteUChar( (LEN_4 | (nVal >> 24)) );
// 2nd highest sal_uInt8
rStm.WriteUChar( (nVal >> 16) );
rStm.WriteUInt16( (sal_uInt16)(nVal) );
rStm.WriteUInt16( (nVal) );
}
else
#endif

View File

@ -182,7 +182,7 @@ void EMFWriter::ImplBeginPlusRecord( sal_uInt16 nType, sal_uInt16 nFlags )
mbRecordPlusOpen = true;
mnRecordPlusPos = m_rStm.Tell();
m_rStm.WriteUInt16( (sal_uInt16) nType ).WriteUInt16( (sal_uInt16) nFlags );
m_rStm.WriteUInt16( nType ).WriteUInt16( nFlags );
m_rStm.SeekRel( 8 );
}
}
@ -266,7 +266,7 @@ void EMFWriter::ImplWritePlusPoint( const Point& rPoint )
{
// Convert to pixels
const Point aPoint(maVDev.LogicToPixel( rPoint, maDestMapMode ));
m_rStm.WriteUInt16( (sal_uInt16) aPoint.X() ).WriteUInt16( (sal_uInt16) aPoint.Y() );
m_rStm.WriteUInt16( aPoint.X() ).WriteUInt16( aPoint.Y() );
}
void EMFWriter::ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_uInt32& nTrans )
@ -357,7 +357,7 @@ bool EMFWriter::WriteEMF(const GDIMetaFile& rMtf)
.WriteInt32( (sal_Int32) 0 ).WriteInt32( (sal_Int32) 0 ).WriteInt32( (sal_Int32) ( aMtfSizePix.Width() - 1 ) ).WriteInt32( (sal_Int32) ( aMtfSizePix.Height() - 1 ) )
.WriteInt32( (sal_Int32) 0 ).WriteInt32( (sal_Int32) 0 ).WriteInt32( (sal_Int32) ( aMtfSizeLog.Width() - 1 ) ).WriteInt32( (sal_Int32) ( aMtfSizeLog.Height() - 1 ) )
.WriteUInt32( (sal_uInt32) 0x464d4520 ).WriteUInt32( (sal_uInt32) 0x10000 ).WriteUInt32( (sal_uInt32) ( nEndPos - nHeaderPos ) )
.WriteUInt32( (sal_uInt32) mnRecordCount ).WriteUInt16( (sal_uInt16) ( mnHandleCount + 1 ) ).WriteUInt16( (sal_uInt16) 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 )
.WriteUInt32( (sal_uInt32) mnRecordCount ).WriteUInt16( ( mnHandleCount + 1 ) ).WriteUInt16( 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 )
.WriteInt32( (sal_Int32) aMtfSizePix.Width() ).WriteInt32( (sal_Int32) aMtfSizePix.Height() )
.WriteInt32( (sal_Int32) ( aMtfSizeLog.Width() / 100 ) ).WriteInt32( (sal_Int32) ( aMtfSizeLog.Height() / 100 ) )
.WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 )
@ -556,15 +556,15 @@ void EMFWriter::ImplCheckTextAttr()
m_rStm.WriteUChar( nPitchAndFamily );
for( i = 0; i < 32; i++ )
m_rStm.WriteUInt16( (sal_Unicode) ( ( i < aFontName.getLength() ) ? aFontName[ i ] : 0 ) );
m_rStm.WriteUInt16( ( ( i < aFontName.getLength() ) ? aFontName[ i ] : 0 ) );
// dummy elfFullName
for( i = 0; i < 64; i++ )
m_rStm.WriteUInt16( (sal_Unicode) 0 );
m_rStm.WriteUInt16( 0 );
// dummy elfStyle
for( i = 0; i < 32; i++ )
m_rStm.WriteUInt16( (sal_Unicode) 0 );
m_rStm.WriteUInt16( 0 );
// dummy elfVersion, elfStyleSize, elfMatch, elfReserved
m_rStm.WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ).WriteUInt32( (sal_uInt32) 0 ) ;
@ -579,7 +579,7 @@ void EMFWriter::ImplCheckTextAttr()
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 );
m_rStm.WriteUInt16( 0 );
ImplEndRecord();
@ -919,11 +919,11 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, c
// write text
for( i = 0; i < nLen; i++ )
m_rStm.WriteUInt16( (sal_Unicode)rText[ i ] );
m_rStm.WriteUInt16( rText[ i ] );
// padding word
if( nLen & 1 )
m_rStm.WriteUInt16( (sal_uInt16) 0 );
m_rStm.WriteUInt16( 0 );
// write DX array
ImplWriteExtent( pDX[ 0 ] );

View File

@ -1194,8 +1194,8 @@ bool EnhWMFReader::ReadEnhWMF()
aTmp.WriteUChar( 'B' )
.WriteUChar( 'M' )
.WriteUInt32( (sal_uInt32)cbBitsSrc )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( 0 )
.WriteUInt16( 0 )
.WriteUInt32( (sal_uInt32)cbBmiSrc + 14 );
pWMF->Seek( nStart + offBmiSrc );
pWMF->Read( pBuf + 14, cbBmiSrc );
@ -1258,8 +1258,8 @@ bool EnhWMFReader::ReadEnhWMF()
aTmp.WriteUChar( 'B' )
.WriteUChar( 'M' )
.WriteUInt32( (sal_uInt32)cbBitsSrc )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( 0 )
.WriteUInt16( 0 )
.WriteUInt32( (sal_uInt32)cbBmiSrc + 14 );
pWMF->Seek( nStart + offBmiSrc );
pWMF->Read( pBuf + 14, cbBmiSrc );
@ -1328,8 +1328,8 @@ bool EnhWMFReader::ReadEnhWMF()
aTmp.WriteUChar( 'B' )
.WriteUChar( 'M' )
.WriteUInt32( (sal_uInt32)cbBitsSrc )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( 0 )
.WriteUInt16( 0 )
.WriteUInt32( (sal_uInt32)cbBmiSrc + 14 );
pWMF->Seek( nStart + offBmiSrc );
pWMF->Read( pBuf + 14, cbBmiSrc );
@ -1568,8 +1568,8 @@ bool EnhWMFReader::ReadEnhWMF()
aTmp.WriteUChar( 'B' )
.WriteUChar( 'M' )
.WriteUInt32( (sal_uInt32)cbBits )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( (sal_uInt16)0 )
.WriteUInt16( 0 )
.WriteUInt16( 0 )
.WriteUInt32( (sal_uInt32)cbBmi + 14 );
pWMF->Seek( nStart + offBmi );
pWMF->Read( pBuf + 14, cbBmi );

View File

@ -294,12 +294,12 @@ void WMFWriter::WMFRecord_CreateBrushIndirect(const Color& rColor)
WriteRecordHeader(0x00000007,W_META_CREATEBRUSHINDIRECT);
if( rColor==Color(COL_TRANSPARENT) )
pWMF->WriteUInt16( (sal_uInt16) W_BS_HOLLOW );
pWMF->WriteUInt16( W_BS_HOLLOW );
else
pWMF->WriteUInt16( (sal_uInt16) W_BS_SOLID );
pWMF->WriteUInt16( W_BS_SOLID );
WriteColor( rColor );
pWMF->WriteUInt16( (sal_uInt16) 0 );
pWMF->WriteUInt16( 0 );
}
void WMFWriter::WMFRecord_CreateFontIndirect(const vcl::Font & rFont)
@ -424,9 +424,9 @@ void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_In
nCheckSum = rtl_crc32( nCheckSum, pData, nLen );
WriteRecordHeader( 3 + 9 + ( ( nLen + 1 ) >> 1 ), W_META_ESCAPE );
pWMF->WriteUInt16( (sal_uInt16)W_MFCOMMENT )
.WriteUInt16( (sal_uInt16)( nLen + 14 ) ) // we will always have a fourteen byte escape header:
.WriteUInt16( (sal_uInt16)0x4f4f ) // OO
pWMF->WriteUInt16( W_MFCOMMENT )
.WriteUInt16( ( nLen + 14 ) ) // we will always have a fourteen byte escape header:
.WriteUInt16( 0x4f4f ) // OO
.WriteUInt32( (sal_uInt32)0xa2c2a ) // evil magic number
.WriteUInt32( (sal_uInt32)nCheckSum ) // crc32 checksum about nEsc & pData
.WriteUInt32( (sal_uInt32)nEsc ); // escape number
@ -558,7 +558,7 @@ void WMFWriter::TrueExtTextOut( const Point& rPoint, const OUString& rString,
WriteRecordHeader( 0, W_META_EXTTEXTOUT );
WritePointYX( rPoint );
sal_uInt16 nNewTextLen = static_cast<sal_uInt16>(rByteString.getLength());
pWMF->WriteUInt16( nNewTextLen ).WriteUInt16( (sal_uInt16)0 );
pWMF->WriteUInt16( nNewTextLen ).WriteUInt16( 0 );
write_uInt8s_FromOString(*pWMF, rByteString, nNewTextLen);
if ( nNewTextLen & 1 )
pWMF->WriteUChar( 0 );
@ -581,7 +581,7 @@ void WMFWriter::TrueExtTextOut( const Point& rPoint, const OUString& rString,
OString aTemp(&nUniChar, 1, aSrcFont.GetCharSet());
j = aTemp.getLength();
while ( --j > 0 )
pWMF->WriteUInt16( (sal_uInt16)0 );
pWMF->WriteUInt16( 0 );
}
}
pConvertedDXAry.reset();
@ -655,7 +655,7 @@ void WMFWriter::WMFRecord_PolyPolygon(const PolyPolygon & rPolyPoly)
}
WriteRecordHeader(0,W_META_POLYPOLYGON);
pWMF->WriteUInt16( nCount );
for (i=0; i<nCount; i++) pWMF->WriteUInt16( (sal_uInt16)(aSimplePolyPoly.GetObject(i).GetSize()) );
for (i=0; i<nCount; i++) pWMF->WriteUInt16( (aSimplePolyPoly.GetObject(i).GetSize()) );
for (i=0; i<nCount; i++) {
pPoly=&(aSimplePolyPoly.GetObject(i));
nSize=pPoly->GetSize();
@ -697,14 +697,14 @@ void WMFWriter::WMFRecord_SelectObject(sal_uInt16 nObjectHandle)
void WMFWriter::WMFRecord_SetBkMode(bool bTransparent)
{
WriteRecordHeader(0x00000004,W_META_SETBKMODE);
if (bTransparent) pWMF->WriteUInt16( (sal_uInt16)W_TRANSPARENT );
else pWMF->WriteUInt16( (sal_uInt16)W_OPAQUE );
if (bTransparent) pWMF->WriteUInt16( W_TRANSPARENT );
else pWMF->WriteUInt16( W_OPAQUE );
}
void WMFWriter::WMFRecord_SetStretchBltMode()
{
WriteRecordHeader( 0x00000004, W_META_SETSTRETCHBLTMODE );
pWMF->WriteUInt16( (sal_uInt16) 3 ); // STRETCH_DELETESCANS
pWMF->WriteUInt16( 3 ); // STRETCH_DELETESCANS
}
void WMFWriter::WMFRecord_SetPixel(const Point & rPoint, const Color & rColor)
@ -1661,13 +1661,13 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, bool bPlaceable )
}
nMetafileHeaderPos=pWMF->Tell();
pWMF->WriteUInt16( (sal_uInt16)0x0001 ) // type: file
.WriteUInt16( (sal_uInt16)0x0009 ) // header length in words
.WriteUInt16( (sal_uInt16)0x0300 ) // Version as BCD number
pWMF->WriteUInt16( 0x0001 ) // type: file
.WriteUInt16( 0x0009 ) // header length in words
.WriteUInt16( 0x0300 ) // Version as BCD number
.WriteUInt32( (sal_uInt32) 0x00000000 ) // file length (without 1st header), is later corrected by UpdateHeader()
.WriteUInt16( (sal_uInt16)MAXOBJECTHANDLES ) // maxmimum number of simultaneous objects
.WriteUInt16( MAXOBJECTHANDLES ) // maxmimum number of simultaneous objects
.WriteUInt32( (sal_uInt32) 0x00000000 ) // maximum record length, is later corrected by UpdateHeader()
.WriteUInt16( (sal_uInt16)0x0000 ); // reserved
.WriteUInt16( 0x0000 ); // reserved
}
void WMFWriter::UpdateHeader()
@ -1891,8 +1891,8 @@ void WMFWriter::WriteEMFRecord( SvMemoryStream& rStream, sal_uInt32 nCurSize, sa
{
// according to http://msdn.microsoft.com/en-us/library/dd366152%28PROT.13%29.aspx
WriteRecordHeader( 0, W_META_ESCAPE );
pWMF->WriteUInt16( (sal_uInt16)W_MFCOMMENT ) // same as META_ESCAPE_ENHANCED_METAFILE
.WriteUInt16( (sal_uInt16)( nCurSize + 34 ) ) // we will always have a 34 byte escape header:
pWMF->WriteUInt16( W_MFCOMMENT ) // same as META_ESCAPE_ENHANCED_METAFILE
.WriteUInt16( ( nCurSize + 34 ) ) // we will always have a 34 byte escape header:
.WriteUInt32( (sal_uInt32) 0x43464D57 ) // WMFC
.WriteUInt32( (sal_uInt32) 0x00000001 ) // Comment type
.WriteUInt32( (sal_uInt32) 0x00010000 ) // version

View File

@ -720,8 +720,8 @@ SvStream& WriteAnimation( SvStream& rOStm, const Animation& rAnimation )
WritePair( rOStm, rAnimBmp.aPosPix );
WritePair( rOStm, rAnimBmp.aSizePix );
WritePair( rOStm, rAnimation.maGlobalSize );
rOStm.WriteUInt16( (sal_uInt16) ( ( ANIMATION_TIMEOUT_ON_CLICK == rAnimBmp.nWait ) ? 65535 : rAnimBmp.nWait ) );
rOStm.WriteUInt16( (sal_uInt16) rAnimBmp.eDisposal );
rOStm.WriteUInt16( ( ( ANIMATION_TIMEOUT_ON_CLICK == rAnimBmp.nWait ) ? 65535 : rAnimBmp.nWait ) );
rOStm.WriteUInt16( rAnimBmp.eDisposal );
rOStm.WriteUChar( rAnimBmp.bUserInput );
rOStm.WriteUInt32( (sal_uInt32) rAnimation.mnLoopCount );
rOStm.WriteUInt32( nDummy32 ); // Unused

View File

@ -352,7 +352,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol
nAllFlagCount); // Flags themselves
rOStm.WriteInt32( nActionSize );
rOStm.WriteUInt16( (sal_uInt16)nAllPolygonCount );
rOStm.WriteUInt16( nAllPolygonCount );
for(a = 0; a < nPolygonCount; a++)
{

View File

@ -1363,10 +1363,10 @@ bool ImplWriteDIBFileHeader(SvStream& rOStm, BitmapReadAccess& rAcc, bool bUseDI
const sal_uInt32 nPalCount((rAcc.HasPalette() ? rAcc.GetPaletteEntryCount() : isBitfieldCompression(rAcc.GetScanlineFormat()) ? 3UL : 0UL));
const sal_uInt32 nOffset(14 + (bUseDIBV5 ? DIBV5HEADERSIZE : DIBINFOHEADERSIZE) + nPalCount * 4UL);
rOStm.WriteUInt16( (sal_uInt16)0x4D42 ); // 'MB' from BITMAPFILEHEADER
rOStm.WriteUInt16( 0x4D42 ); // 'MB' from BITMAPFILEHEADER
rOStm.WriteUInt32( (sal_uInt32)(nOffset + (rAcc.Height() * rAcc.GetScanlineSize())) );
rOStm.WriteUInt16( (sal_uInt16)0 );
rOStm.WriteUInt16( (sal_uInt16)0 );
rOStm.WriteUInt16( 0 );
rOStm.WriteUInt16( 0 );
rOStm.WriteUInt32( nOffset );
return( rOStm.GetError() == 0UL );

View File

@ -707,15 +707,15 @@ SvStream& WriteImpl_Font( SvStream& rOStm, const Impl_Font& rImpl_Font )
rOStm.WriteUniOrByteString( rImpl_Font.maStyleName, rOStm.GetStreamCharSet() );
WritePair( rOStm, rImpl_Font.maSize );
rOStm.WriteUInt16( (sal_uInt16) GetStoreCharSet( rImpl_Font.meCharSet ) );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meFamily );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.mePitch );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meWeight );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meUnderline );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meStrikeout );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meItalic );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.maLanguageTag.getLanguageType( false) );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meWidthType );
rOStm.WriteUInt16( GetStoreCharSet( rImpl_Font.meCharSet ) );
rOStm.WriteUInt16( rImpl_Font.meFamily );
rOStm.WriteUInt16( rImpl_Font.mePitch );
rOStm.WriteUInt16( rImpl_Font.meWeight );
rOStm.WriteUInt16( rImpl_Font.meUnderline );
rOStm.WriteUInt16( rImpl_Font.meStrikeout );
rOStm.WriteUInt16( rImpl_Font.meItalic );
rOStm.WriteUInt16( rImpl_Font.maLanguageTag.getLanguageType( false) );
rOStm.WriteUInt16( rImpl_Font.meWidthType );
rOStm.WriteInt16( rImpl_Font.mnOrientation );
@ -726,12 +726,12 @@ SvStream& WriteImpl_Font( SvStream& rOStm, const Impl_Font& rImpl_Font )
// new in version 2
rOStm.WriteUChar( rImpl_Font.meRelief );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.maCJKLanguageTag.getLanguageType( false) );
rOStm.WriteUInt16( rImpl_Font.maCJKLanguageTag.getLanguageType( false) );
rOStm.WriteUChar( rImpl_Font.mbVertical );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meEmphasisMark );
rOStm.WriteUInt16( rImpl_Font.meEmphasisMark );
// new in version 3
rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meOverline );
rOStm.WriteUInt16( rImpl_Font.meOverline );
return rOStm;
}

View File

@ -254,7 +254,7 @@ SvStream& WriteGfxLink( SvStream& rOStream, const GfxLink& rGfxLink )
VersionCompat* pCompat = new VersionCompat( rOStream, STREAM_WRITE, 2 );
// Version 1
rOStream.WriteUInt16( (sal_uInt16) rGfxLink.GetType() ).WriteUInt32( rGfxLink.GetDataSize() ).WriteUInt32( rGfxLink.GetUserId() );
rOStream.WriteUInt16( rGfxLink.GetType() ).WriteUInt32( rGfxLink.GetDataSize() ).WriteUInt32( rGfxLink.GetUserId() );
// Version 2
WritePair( rOStream, rGfxLink.GetPrefSize() );

View File

@ -303,7 +303,7 @@ SvStream& WriteImpl_Gradient( SvStream& rOStm, const Impl_Gradient& rImpl_Gradie
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
rOStm.WriteUInt16( (sal_uInt16) rImpl_Gradient.meStyle );
rOStm.WriteUInt16( rImpl_Gradient.meStyle );
WriteColor( rOStm, rImpl_Gradient.maStartColor );
WriteColor( rOStm, rImpl_Gradient.maEndColor );
rOStm.WriteUInt16( rImpl_Gradient.mnAngle )

View File

@ -135,7 +135,7 @@ SvStream& WriteImplHatch( SvStream& rOStm, const ImplHatch& rImplHatch )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
rOStm.WriteUInt16( (sal_uInt16) rImplHatch.meStyle );
rOStm.WriteUInt16( rImplHatch.meStyle );
WriteColor( rOStm, rImplHatch.maColor );
rOStm.WriteInt32( rImplHatch.mnDistance ).WriteUInt16( rImplHatch.mnAngle );

View File

@ -229,7 +229,7 @@ SvStream& WriteImplLineInfo( SvStream& rOStm, const ImplLineInfo& rImplLineInfo
VersionCompat aCompat( rOStm, STREAM_WRITE, 4 );
// version 1
rOStm.WriteUInt16( (sal_uInt16) rImplLineInfo.meStyle ).WriteInt32( rImplLineInfo.mnWidth );
rOStm.WriteUInt16( rImplLineInfo.meStyle ).WriteInt32( rImplLineInfo.mnWidth );
// since version2
rOStm.WriteUInt16( rImplLineInfo.mnDashCount ).WriteInt32( rImplLineInfo.mnDashLen );
@ -237,10 +237,10 @@ SvStream& WriteImplLineInfo( SvStream& rOStm, const ImplLineInfo& rImplLineInfo
rOStm.WriteInt32( rImplLineInfo.mnDistance );
// since version3
rOStm.WriteUInt16( (sal_uInt16) rImplLineInfo.meLineJoin );
rOStm.WriteUInt16( rImplLineInfo.meLineJoin );
// since version4
rOStm.WriteUInt16( (sal_uInt16) rImplLineInfo.meLineCap );
rOStm.WriteUInt16( rImplLineInfo.meLineCap );
return rOStm;
}

View File

@ -60,7 +60,7 @@ SvStream& WriteImplMapMode( SvStream& rOStm, const ImplMapMode& rImplMapMode )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
rOStm.WriteUInt16( (sal_uInt16) rImplMapMode.meUnit );
rOStm.WriteUInt16( rImplMapMode.meUnit );
WritePair( rOStm, rImplMapMode.maOrigin );
WriteFraction( rOStm, rImplMapMode.maScaleX );
WriteFraction( rOStm, rImplMapMode.maScaleY );

View File

@ -2979,7 +2979,7 @@ void MetaTextAlignAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
MetaAction::Write(rOStm, pData);
VersionCompat aCompat(rOStm, STREAM_WRITE, 1);
rOStm.WriteUInt16( (sal_uInt16) maAlign );
rOStm.WriteUInt16( maAlign );
}
void MetaTextAlignAction::Read( SvStream& rIStm, ImplMetaReadData* )
@ -3216,7 +3216,7 @@ void MetaRasterOpAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
MetaAction::Write(rOStm, pData);
VersionCompat aCompat(rOStm, STREAM_WRITE, 1);
rOStm.WriteUInt16( (sal_uInt16) meRasterOp );
rOStm.WriteUInt16( meRasterOp );
}
void MetaRasterOpAction::Read( SvStream& rIStm, ImplMetaReadData* )

View File

@ -1642,7 +1642,7 @@ SvStream& WriteRegion( SvStream& rOStrm, const Region& rRegion )
aRegionType = REGION_RECTANGLE;
}
rOStrm.WriteUInt16( (sal_uInt16)aRegionType );
rOStrm.WriteUInt16( aRegionType );
// get RegionBand
const RegionBand* pRegionBand = rRegion.getRegionBand();

View File

@ -263,7 +263,7 @@ void RegionBand::save(SvStream& rOStrm) const
while(pBand)
{
// put boundaries
rOStrm.WriteUInt16( (sal_uInt16)STREAMENTRY_BANDHEADER );
rOStrm.WriteUInt16( STREAMENTRY_BANDHEADER );
rOStrm.WriteInt32( pBand->mnYTop );
rOStrm.WriteInt32( pBand->mnYBottom );
@ -273,7 +273,7 @@ void RegionBand::save(SvStream& rOStrm) const
while(pSep)
{
// put separation
rOStrm.WriteUInt16( (sal_uInt16)STREAMENTRY_SEPARATION );
rOStrm.WriteUInt16( STREAMENTRY_SEPARATION );
rOStrm.WriteInt32( pSep->mnXLeft );
rOStrm.WriteInt32( pSep->mnXRight );
@ -285,7 +285,7 @@ void RegionBand::save(SvStream& rOStrm) const
}
// put endmarker
rOStrm.WriteUInt16( (sal_uInt16)STREAMENTRY_END );
rOStrm.WriteUInt16( STREAMENTRY_END );
}
bool RegionBand::isSingleRectangle() const

View File

@ -148,7 +148,7 @@ SvStream& WriteImplWallpaper( SvStream& rOStm, const ImplWallpaper& rImplWallpap
// version 1
WriteColor( rOStm, rImplWallpaper.maColor );
rOStm.WriteUInt16( (sal_uInt16) rImplWallpaper.meStyle );
rOStm.WriteUInt16( rImplWallpaper.meStyle );
// version 2
rOStm.WriteUChar( bRect ).WriteUChar( bGrad ).WriteUChar( bBmp ).WriteUChar( bDummy ).WriteUChar( bDummy ).WriteUChar( bDummy );