remove unnecessary casts's

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

Change-Id: I63f18be8e940098c2acbbc73ee49ede3a949fcb2
This commit is contained in:
Noel Grandin 2014-09-25 05:27:36 +02:00
parent 8f684e21de
commit d46b16e1e4
30 changed files with 95 additions and 104 deletions

View File

@ -1308,7 +1308,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
(*m_pFileStream).WriteChar( cTyp );
if ( nDbaseType == VisualFoxPro )
(*m_pFileStream).WriteUInt32( sal_uInt32(nRecLength-1) );
(*m_pFileStream).WriteUInt32( nRecLength-1 );
else
m_pFileStream->Write(aBuffer, 4);
@ -1422,7 +1422,7 @@ bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
m_pMemoStream->SetStreamSize(512);
m_pMemoStream->Seek(0L);
(*m_pMemoStream).WriteUInt32( sal_uInt32(1) ); // pointer to the first free block
(*m_pMemoStream).WriteUInt32( 1 ); // pointer to the first free block
m_pMemoStream->Flush();
delete m_pMemoStream;

View File

@ -112,12 +112,12 @@ namespace dbaui
Any aValue = pFieldDesc->GetControlDefault();
if ( aValue >>= nValue )
{
_rStr.WriteInt32( sal_Int32(1) );
_rStr.WriteInt32( 1 );
_rStr.WriteDouble( nValue );
}
else
{
_rStr.WriteInt32( sal_Int32(2) );
_rStr.WriteInt32( 2 );
_rStr.WriteUniOrByteString(::comphelper::getString(aValue), _rStr.GetStreamCharSet());
}
@ -128,9 +128,9 @@ namespace dbaui
_rStr.WriteInt32( pFieldDesc->GetIsNullable() );
_rStr.WriteInt32( pFieldDesc->GetFormatKey() );
_rStr.WriteInt32( (sal_Int32)pFieldDesc->GetHorJustify() );
_rStr.WriteInt32( sal_Int32(pFieldDesc->IsAutoIncrement() ? 1 : 0) );
_rStr.WriteInt32( sal_Int32(pFieldDesc->IsPrimaryKey() ? 1 : 0) );
_rStr.WriteInt32( sal_Int32(pFieldDesc->IsCurrency() ? 1 : 0) );
_rStr.WriteInt32( pFieldDesc->IsAutoIncrement() ? 1 : 0 );
_rStr.WriteInt32( pFieldDesc->IsPrimaryKey() ? 1 : 0 );
_rStr.WriteInt32( pFieldDesc->IsCurrency() ? 1 : 0 );
}
else
_rStr.WriteInt32( (sal_Int32)0 );

View File

@ -359,8 +359,8 @@ bool SvxSizeItem::GetPresentation
SvStream& SvxSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
//#fdo39428 SvStream no longer supports operator<<(long)
rStrm.WriteInt32( sal::static_int_cast<sal_Int32>(aSize.Width()) );
rStrm.WriteInt32( sal::static_int_cast<sal_Int32>(aSize.Height()) );
rStrm.WriteInt32( aSize.Width() );
rStrm.WriteInt32( aSize.Height() );
return rStrm;
}

View File

@ -701,7 +701,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream )
sal_uInt16 nSetFlag(aFmtsSet[i] ? 2 : 0); // fdo#68648 store that too
if(aFmts[i])
{
rStream.WriteUInt16( sal_uInt16(1 | nSetFlag) );
rStream.WriteUInt16( 1 | nSetFlag );
if(bConvertBulletFont && aFmts[i]->GetBulletFont())
{
if(!pConverter)
@ -712,7 +712,7 @@ SvStream& SvxNumRule::Store( SvStream &rStream )
aFmts[i]->Store(rStream, pConverter);
}
else
rStream.WriteUInt16( sal_uInt16(0 | nSetFlag) );
rStream.WriteUInt16( 0 | nSetFlag );
}
//second save of nFeatureFlags for new versions
rStream.WriteUInt16( (sal_uInt16)nFeatureFlags );

View File

@ -4290,7 +4290,7 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM
rSt.WriteUInt16( n16 );
// record type
pMergePicStreamBSE->ReadUInt16( n16 );
rSt.WriteUInt16( sal_uInt16( ESCHER_BlipFirst + nBlibType ) );
rSt.WriteUInt16( ESCHER_BlipFirst + nBlibType );
DBG_ASSERT( n16 == ESCHER_BlipFirst + nBlibType , "EscherGraphicProvider::WriteBlibStoreContainer: BLIP record types differ" );
sal_uInt32 n32;
// record size

View File

@ -171,7 +171,7 @@ void XclExpSstImpl::Save( XclExpStream& rStrm )
sal_uInt16 nRecPos = rStrm.GetRawRecPos() + 4;
aExtSst.WriteUInt32( nStrmPos ) // stream position
.WriteUInt16( nRecPos ) // position from start of SST or CONTINUE
.WriteUInt16( sal_uInt16( 0 ) ); // reserved
.WriteUInt16( 0 ); // reserved
}
rStrm << **aIt;

View File

@ -739,11 +739,11 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa
const sal_uInt8* const pnPattern = sppnPatterns[ ::std::min< size_t >( rFillData.mnPattern - 2, SAL_N_ELEMENTS( sppnPatterns ) ) ];
// create 2-colored 8x8 DIB
SvMemoryStream aMemStrm;
aMemStrm.WriteUInt32( sal_uInt32( 12 ) ).WriteInt16( sal_Int16( 8 ) ).WriteInt16( sal_Int16( 8 ) ).WriteUInt16( sal_uInt16( 1 ) ).WriteUInt16( sal_uInt16( 1 ) );
aMemStrm.WriteUChar( sal_uInt8( 0xFF ) ).WriteUChar( sal_uInt8( 0xFF ) ).WriteUChar( sal_uInt8( 0xFF ) );
aMemStrm.WriteUChar( sal_uInt8( 0x00 ) ).WriteUChar( sal_uInt8( 0x00 ) ).WriteUChar( sal_uInt8( 0x00 ) );
aMemStrm.WriteUInt32( 12 ).WriteInt16( 8 ).WriteInt16( 8 ).WriteUInt16( 1 ).WriteUInt16( 1 );
aMemStrm.WriteUChar( 0xFF ).WriteUChar( 0xFF ).WriteUChar( 0xFF );
aMemStrm.WriteUChar( 0x00 ).WriteUChar( 0x00 ).WriteUChar( 0x00 );
for( size_t nIdx = 0; nIdx < 8; ++nIdx )
aMemStrm.WriteUInt32( sal_uInt32( pnPattern[ nIdx ] ) ); // 32-bit little-endian
aMemStrm.WriteUInt32( pnPattern[ nIdx ] ); // 32-bit little-endian
aMemStrm.Seek( STREAM_SEEK_TO_BEGIN );
Bitmap aBitmap;
ReadDIB(aBitmap, aMemStrm, false);
@ -3629,7 +3629,7 @@ OUString XclImpDffConverter::ReadHlinkProperty( SvStream& rDffStrm ) const
{
// create a faked BIFF record that can be read by XclImpStream class
SvMemoryStream aMemStream;
aMemStream.WriteUInt16( sal_uInt16( 0 ) ).WriteUInt16( nBufferSize );
aMemStream.WriteUInt16( 0 ).WriteUInt16( nBufferSize );
// copy from DFF stream to memory stream
::std::vector< sal_uInt8 > aBuffer( nBufferSize );

View File

@ -450,9 +450,9 @@ bool ScImportExport::ExportStream( SvStream& rStrm, const OUString& rBaseURL, sa
WriteUnicodeOrByteString( rStrm, aRefName, true );
WriteUnicodeOrByteString( rStrm, aExtraBits, true );
if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE )
rStrm.WriteUInt16( sal_Unicode(0) );
rStrm.WriteUInt16( 0 );
else
rStrm.WriteChar( sal_Char(0) );
rStrm.WriteChar( 0 );
return rStrm.GetError() == SVSTREAM_OK;
}
}
@ -487,14 +487,14 @@ void ScImportExport::WriteUnicodeOrByteString( SvStream& rStrm, const OUString&
}
}
if ( bZero )
rStrm.WriteUInt16( sal_Unicode(0) );
rStrm.WriteUInt16( 0 );
}
else
{
OString aByteStr(OUStringToOString(rString, eEnc));
rStrm.WriteCharPtr( aByteStr.getStr() );
if ( bZero )
rStrm.WriteChar( sal_Char(0) );
rStrm.WriteChar( 0 );
}
}
@ -506,13 +506,13 @@ void ScImportExport::WriteUnicodeOrByteEndl( SvStream& rStrm )
switch ( rStrm.GetLineDelimiter() )
{
case LINEEND_CR :
rStrm.WriteUInt16( sal_Unicode('\r') );
rStrm.WriteUInt16( '\r' );
break;
case LINEEND_LF :
rStrm.WriteUInt16( sal_Unicode('\n') );
rStrm.WriteUInt16( '\n' );
break;
default:
rStrm.WriteUInt16( sal_Unicode('\r') ).WriteUInt16( sal_Unicode('\n') );
rStrm.WriteUInt16( '\r' ).WriteUInt16( '\n' );
}
}
else

View File

@ -1418,7 +1418,7 @@ bool PPTWriter::ImplWriteAtomEnding()
mpStrm->Seek( nOfs ); // Fill the VBAInfoAtom with the correct index to the persisttable
mpStrm->WriteUInt32( nPersistEntrys )
.WriteUInt32( n1 )
.WriteInt32( sal_Int32(2) );
.WriteInt32( 2 );
mpStrm->Seek( nOldPos );
}

View File

@ -1068,7 +1068,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
PPTExParaSheet& rParaSheet = mpStyleSheet->GetParaSheet( nTextInstance );
rOut.WriteUInt32( (sal_uInt32)( ( EPP_TextHeaderAtom << 16 ) | ( nAtomInstance << 4 ) ) ).WriteUInt32( (sal_uInt32)4 )
.WriteInt32( sal_Int32(nTextInstance) );
.WriteInt32( nTextInstance );
if ( mbEmptyPresObj )
mnTextSize = 0;

View File

@ -360,7 +360,7 @@ void SfxOleStringHelper::ImplSaveString8( SvStream& rStrm, const OUString& rValu
rStrm.WriteInt32( nSize );
// write character array with trailing NUL character
rStrm.Write(aEncoded.getStr(), aEncoded.getLength());
rStrm.WriteUChar( sal_uInt8( 0 ) );
rStrm.WriteUChar( 0 );
}
void SfxOleStringHelper::ImplSaveString16( SvStream& rStrm, const OUString& rValue ) const
@ -371,10 +371,10 @@ void SfxOleStringHelper::ImplSaveString16( SvStream& rStrm, const OUString& rVal
// write character array with trailing NUL character
for( sal_Int32 nIdx = 0; nIdx < rValue.getLength(); ++nIdx )
rStrm.WriteUInt16( rValue[ nIdx ] );
rStrm.WriteUInt16( sal_uInt16( 0 ) );
rStrm.WriteUInt16( 0 );
// stream is always padded to 32-bit boundary, add 2 bytes on odd character count
if( (nSize & 1) == 1 )
rStrm.WriteUInt16( sal_uInt16( 0 ) );
rStrm.WriteUInt16( 0 );
}
@ -1060,7 +1060,7 @@ void SfxOleSection::ImplSave( SvStream& rStrm )
sal_Int32 nPropCount = static_cast< sal_Int32 >( maPropMap.size() + 1 );
if( maDictProp.HasPropertyNames() )
++nPropCount;
rStrm.WriteUInt32( sal_uInt32( 0 ) ).WriteInt32( nPropCount );
rStrm.WriteUInt32( 0 ).WriteInt32( nPropCount );
// write placeholders for property ID/position pairs
sal_Size nPropPosPos = rStrm.Tell();
@ -1137,7 +1137,7 @@ void SfxOleSection::SaveProperty( SvStream& rStrm, SfxOlePropertyBase& rProp, sa
SaveObject( rStrm, rProp );
// align to 32-bit
while( (rStrm.Tell() & 3) != 0 )
rStrm.WriteUChar( sal_uInt8( 0 ) );
rStrm.WriteUChar( 0 );
// write property ID/position pair
rStrm.Seek( rnPropPosPos );
rStrm.WriteInt32( rProp.GetPropId() ).WriteUInt32( nPropPos );
@ -1247,10 +1247,10 @@ void SfxOlePropertySet::ImplSave( SvStream& rStrm )
// write property set header
SvGlobalName aGuid;
sal_Int32 nSectCount = static_cast< sal_Int32 >( maSectionMap.size() );
rStrm .WriteUInt16( sal_uInt16( 0xFFFE ) ) // byte order
.WriteUInt16( sal_uInt16( 0 ) ) // version
.WriteUInt16( sal_uInt16( 1 ) ) // OS minor version
.WriteUInt16( sal_uInt16( 2 ) ); // OS type always windows for text encoding
rStrm .WriteUInt16( 0xFFFE ) // byte order
.WriteUInt16( 0 ) // version
.WriteUInt16( 1 ) // OS minor version
.WriteUInt16( 2 ); // OS type always windows for text encoding
WriteSvGlobalName( rStrm, aGuid ); // unused guid
rStrm .WriteInt32( nSectCount ); // number of sections

View File

@ -188,7 +188,7 @@ SfxPoolItem * CntUInt16Item::Create(SvStream & rStream, sal_uInt16) const
// virtual
SvStream & CntUInt16Item::Store(SvStream &rStream, sal_uInt16) const
{
rStream.WriteUInt16( sal_uInt16(m_nValue) );
rStream.WriteUInt16( m_nValue );
return rStream;
}

View File

@ -139,8 +139,8 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
rStream.WriteUInt16( SFX_ITEMPOOL_TAG_TRICK4OLD );
// Work around SfxStyleSheet bug
rStream.WriteUInt16( sal_uInt16(0) ); // Version
rStream.WriteUInt16( sal_uInt16(0) ); // Count (or else 2nd loop breaks)
rStream.WriteUInt16( 0 ); // Version
rStream.WriteUInt16( 0 ); // Count (or else 2nd loop breaks)
}
// Every Pool as a whole is a record
@ -172,7 +172,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
// Workaround for bug in SetVersionMap 312
if ( SOFFICE_FILEFORMAT_31 == pImp->mnFileFormatVersion )
rStream.WriteUInt16( sal_uInt16(nNewWhich+1) );
rStream.WriteUInt16( nNewWhich+1 );
}
}

View File

@ -111,10 +111,10 @@ SvStream& WriteGraphicAttr( SvStream& rOStm, const GraphicAttr& rAttr )
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 );
//#fdo39428 SvStream no longer supports operator<<(long)
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(rAttr.mnLeftCrop) )
.WriteInt32( sal::static_int_cast<sal_Int32>(rAttr.mnTopCrop) )
.WriteInt32( sal::static_int_cast<sal_Int32>(rAttr.mnRightCrop) )
.WriteInt32( sal::static_int_cast<sal_Int32>(rAttr.mnBottomCrop) );
rOStm.WriteInt32( rAttr.mnLeftCrop )
.WriteInt32( rAttr.mnTopCrop )
.WriteInt32( rAttr.mnRightCrop )
.WriteInt32( rAttr.mnBottomCrop );
return rOStm;
}

View File

@ -87,11 +87,10 @@ SvStream& WriteTransferableObjectDescriptor( SvStream& rOStm, const Transferable
rOStm.SeekRel( 4 );
WriteSvGlobalName( rOStm, rObjDesc.maClassName );
rOStm.WriteUInt32( nViewAspect );
//#fdo39428 Remove SvStream operator<<(long)
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(rObjDesc.maSize.Width()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(rObjDesc.maSize.Height()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(rObjDesc.maDragStartPos.X()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(rObjDesc.maDragStartPos.Y()) );
rOStm.WriteInt32( rObjDesc.maSize.Width() );
rOStm.WriteInt32( rObjDesc.maSize.Height() );
rOStm.WriteInt32( rObjDesc.maDragStartPos.X() );
rOStm.WriteInt32( rObjDesc.maDragStartPos.Y() );
rOStm.WriteUniOrByteString( rObjDesc.maTypeName, osl_getThreadTextEncoding() );
rOStm.WriteUniOrByteString( rObjDesc.maDisplayName, osl_getThreadTextEncoding() );
rOStm.WriteUInt32( nSig1 ).WriteUInt32( nSig2 );

View File

@ -679,8 +679,8 @@ SfxPoolItem* SdrFractionItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
SvStream& SdrFractionItem::Store(SvStream& rOut, sal_uInt16 /*nItemVers*/) const
{
rOut.WriteInt32( sal_Int32(nValue.GetNumerator()) );
rOut.WriteInt32( sal_Int32(nValue.GetDenominator()) );
rOut.WriteInt32( nValue.GetNumerator() );
rOut.WriteInt32( nValue.GetDenominator() );
return rOut;
}

View File

@ -154,14 +154,14 @@ sal_uLong SwASCWriter::WriteStream()
switch(GetAsciiOptions().GetCharSet())
{
case RTL_TEXTENCODING_UTF8:
Strm().WriteUChar( sal_uInt8(0xEF) ).WriteUChar( sal_uInt8(0xBB) ). WriteUChar( sal_uInt8(0xBF) );
Strm().WriteUChar( 0xEF ).WriteUChar( 0xBB ).WriteUChar( 0xBF );
break;
case RTL_TEXTENCODING_UCS2:
Strm().SetEndianSwap(false);
#ifdef OSL_LITENDIAN
Strm().WriteUChar( sal_uInt8(0xFF) ).WriteUChar( sal_uInt8(0xFE) );
Strm().WriteUChar( 0xFF ).WriteUChar( 0xFE );
#else
Strm().WriteUChar( sal_uInt8(0xFE) ).WriteUChar( sal_uInt8(0xFF) );
Strm().WriteUChar( 0xFE ).WriteUChar( 0xFF );
#endif
break;

View File

@ -769,7 +769,7 @@ bool RtfExport::DisallowInheritingOutlineNumbering(const SwFmt& rFmt)
if (((const SwTxtFmtColl*)pParent)->IsAssignedToListLevelOfOutlineStyle())
{
// Level 9 disables the outline
Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LEVEL).WriteInt32(sal_Int32(9));
Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LEVEL).WriteInt32(9);
bRet = true;
}

View File

@ -212,7 +212,7 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFm
SwWW8Writer::WriteLong(tmpStrm, rTarFrm.getLength()+1);
SwWW8Writer::WriteString16(tmpStrm, rTarFrm, false);
tmpStrm.WriteUInt16( sal_uInt16( 0 ) );
tmpStrm.WriteUInt16( 0 );
mnFlags |= WW8_HLINK_FRAME;
}
@ -238,7 +238,7 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFm
//For UNICODE
SwWW8Writer::WriteLong(tmpStrm, 2*aFileName.getLength()+6);
SwWW8Writer::WriteLong(tmpStrm, 2*aFileName.getLength());
tmpStrm.WriteUInt16( sal_uInt16(0x0003) );
tmpStrm.WriteUInt16( 0x0003 );
SwWW8Writer::WriteString16(tmpStrm, aFileName, false);
}
else if( eProtocol != INET_PROT_NOT_VALID )
@ -270,7 +270,7 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFm
}
rStrm.Write( maGuidStdLink,16 );
rStrm .WriteUInt32( sal_uInt32( 2 ) )
rStrm .WriteUInt32( 2 )
.WriteUInt32( mnFlags );
tmpStrm.Seek( STREAM_SEEK_TO_BEGIN );
sal_uInt32 const nLen = tmpStrm.remainingSize();
@ -1415,8 +1415,8 @@ 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( sal_uInt32(3) );
rSt.WriteUInt16( (sal_uInt16)0x0392 ).WriteUInt32( sal_uInt32(3) );
rSt.WriteUInt16( (sal_uInt16)0x0390 ).WriteUInt32( 3 );
rSt.WriteUInt16( (sal_uInt16)0x0392 ).WriteUInt32( 3 );
//This sub property is required to be in the dummy inline frame as
//well
rSt.WriteUInt16( (sal_uInt16)0x053F ).WriteUInt32( nInlineHack );
@ -2113,11 +2113,11 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType
sal_uInt16 nLen = aPoly.GetSize();
aPolyDump.WriteUInt16( nLen );
aPolyDump.WriteUInt16( nLen );
aPolyDump.WriteUInt16( sal_uInt16(8) );
aPolyDump.WriteUInt16( 8 );
for (sal_uInt16 nI = 0; nI < nLen; ++nI)
{
aPolyDump.WriteUInt32( sal_uInt32(aPoly[nI].X()) );
aPolyDump.WriteUInt32( sal_uInt32(aPoly[nI].Y()) );
aPolyDump.WriteUInt32( aPoly[nI].X() );
aPolyDump.WriteUInt32( aPoly[nI].Y() );
}
sal_uInt16 nArrLen = msword_cast<sal_uInt16>(aPolyDump.Tell());

View File

@ -1120,7 +1120,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
SvMemoryStream aMemStream;
struct HyperLinksTable hlStr;
sal_uInt16 mnRawRecId,mnRawRecSize;
aMemStream.WriteUInt16( sal_uInt16( 0 ) ).WriteUInt16( nBufferSize );
aMemStream.WriteUInt16( 0 ).WriteUInt16( nBufferSize );
// copy from DFF stream to memory stream
::std::vector< sal_uInt8 > aBuffer( nBufferSize );

View File

@ -462,13 +462,13 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
nPitch = (sal_uInt16)pFnt->GetPitch();
}
rStream.WriteUInt16( sal_uInt16(aFmt.GetNumberingType()) )
rStream.WriteUInt16( aFmt.GetNumberingType() )
.WriteUInt16( aFmt.GetBulletChar() )
.WriteUChar( aFmt.GetIncludeUpperLevels() > 0 )
.WriteUInt16( aFmt.GetStart() );
rStream.WriteUniOrByteString( aFmt.GetPrefix(), eEncoding );
rStream.WriteUniOrByteString( aFmt.GetSuffix(), eEncoding );
rStream.WriteUInt16( sal_uInt16( aFmt.GetNumAdjust() ) )
rStream.WriteUInt16( aFmt.GetNumAdjust() )
.WriteInt16( aFmt.GetAbsLSpace() )
.WriteInt16( aFmt.GetFirstLineOffset() )
.WriteInt16( aFmt.GetCharTextDistance() )

View File

@ -241,7 +241,7 @@ void VCLXPrinterPropertySet::selectForm( const OUString& rFormDescription ) thro
::osl::MutexGuard aGuard( Mutex );
SvMemoryStream aMem;
aMem.WriteUInt32( sal_uInt32(BINARYSETUPMARKER) );
aMem.WriteUInt32( BINARYSETUPMARKER );
WriteJobSetup( aMem, GetPrinter()->GetJobSetup() );
return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() );
}

View File

@ -498,8 +498,8 @@ SvStream& ReadFraction( SvStream& rIStream, Fraction& rFract )
SvStream& WriteFraction( SvStream& rOStream, const Fraction& rFract )
{
//fdo#39428 SvStream no longer supports operator<<(long)
rOStream.WriteInt32( sal::static_int_cast<sal_Int32>(rFract.nNumerator) );
rOStream.WriteInt32( sal::static_int_cast<sal_Int32>(rFract.nDenominator) );
rOStream.WriteInt32( rFract.nNumerator );
rOStream.WriteInt32( rFract.nDenominator );
return rOStream;
}

View File

@ -38,8 +38,7 @@ SvStream& WritePair( SvStream& rOStream, const Pair& rPair )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "Pair::<< - Solar-Version not set on rOStream" );
//39428 SvStream no longer supports operator<<(long)
rOStream.WriteInt32( sal::static_int_cast<sal_Int32>(rPair.nA) ).WriteInt32( sal::static_int_cast<sal_Int32>(rPair.nB) );
rOStream.WriteInt32( rPair.nA ).WriteInt32( rPair.nB );
return rOStream;
}
@ -173,7 +172,6 @@ SvStream& ReadRectangle( SvStream& rIStream, Rectangle& rRect )
{
DBG_ASSERTWARNING( rIStream.GetVersion(), "Rectangle::>> - Solar-Version not set on rIStream" );
//fdo#39428 SvStream no longer supports operator>>(long&)
sal_Int32 nTmpL(0), nTmpT(0), nTmpR(0), nTmpB(0);
rIStream.ReadInt32( nTmpL ).ReadInt32( nTmpT ).ReadInt32( nTmpR ).ReadInt32( nTmpB );
@ -190,11 +188,10 @@ SvStream& WriteRectangle( SvStream& rOStream, const Rectangle& rRect )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "Rectangle::<< - Solar-Version not set on rOStream" );
//fdo#39428 SvStream no longer supports operator<<(long)
rOStream.WriteInt32( sal::static_int_cast<sal_Int32>(rRect.nLeft) )
.WriteInt32( sal::static_int_cast<sal_Int32>(rRect.nTop) )
.WriteInt32( sal::static_int_cast<sal_Int32>(rRect.nRight) )
.WriteInt32( sal::static_int_cast<sal_Int32>(rRect.nBottom) );
rOStream.WriteInt32( rRect.nLeft )
.WriteInt32( rRect.nTop )
.WriteInt32( rRect.nRight )
.WriteInt32( rRect.nBottom );
return rOStream;
}

View File

@ -1598,9 +1598,8 @@ SvStream& WritePolygon( SvStream& rOStream, const Polygon& rPoly )
{
for( i = 0; i < nPoints; i++ )
{
//fdo#39428 SvStream no longer supports operator<<(long)
rOStream.WriteInt32( sal::static_int_cast<sal_Int32>( rPoly.mpImplPolygon->mpPointAry[i].X() ) )
.WriteInt32( sal::static_int_cast<sal_Int32>( rPoly.mpImplPolygon->mpPointAry[i].Y() ) );
rOStream.WriteInt32( rPoly.mpImplPolygon->mpPointAry[i].X() )
.WriteInt32( rPoly.mpImplPolygon->mpPointAry[i].Y() );
}
}
}
@ -1633,7 +1632,7 @@ void Polygon::ImplWrite( SvStream& rOStream ) const
{
bool bHasPolyFlags = mpImplPolygon->mpFlagAry != NULL;
WritePolygon( rOStream, *this );
rOStream.WriteUChar(sal_uInt8(bHasPolyFlags));
rOStream.WriteUChar(bHasPolyFlags);
if ( bHasPolyFlags )
rOStream.Write( mpImplPolygon->mpFlagAry, mpImplPolygon->mnPoints );

View File

@ -839,7 +839,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
const sal_uLong nOffPos = m_rStm.Tell();
m_rStm.SeekRel( 16 );
m_rStm.WriteUInt32( (sal_uInt32) 0 ).WriteInt32( sal_Int32( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP ) );
m_rStm.WriteUInt32( (sal_uInt32) 0 ).WriteInt32( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP );
ImplWriteSize( rSz );
WriteDIB(rBmp, aMemStm, true, false);

View File

@ -138,8 +138,7 @@ SvStream& WriteImplHatch( SvStream& rOStm, const ImplHatch& rImplHatch )
rOStm.WriteUInt16( (sal_uInt16) rImplHatch.meStyle );
WriteColor( rOStm, rImplHatch.maColor );
//#fdo39428 SvStream no longer supports operator<<(long)
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(rImplHatch.mnDistance) ).WriteUInt16( rImplHatch.mnAngle );
rOStm.WriteInt32( rImplHatch.mnDistance ).WriteUInt16( rImplHatch.mnAngle );
return rOStm;
}

View File

@ -1226,8 +1226,7 @@ bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
// write new style header
VersionCompat* pCompat = new VersionCompat( rOStm, STREAM_WRITE, 1 );
//#fdo39428 SvStream no longer supports operator<<(long)
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(meType) );
rOStm.WriteInt32( meType );
// data size is updated later
nDataFieldPos = rOStm.Tell();
@ -1246,16 +1245,15 @@ bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
// data size is updated later
nDataFieldPos = rOStm.Tell();
rOStm.WriteInt32( (sal_Int32) 0 );
//#fdo39428 SvStream no longer supports operator<<(long)
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(aSize.Width()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(aSize.Height()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(aMapMode.GetMapUnit()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(aMapMode.GetScaleX().GetNumerator()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(aMapMode.GetScaleX().GetDenominator()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(aMapMode.GetScaleY().GetNumerator()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(aMapMode.GetScaleY().GetDenominator()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(aMapMode.GetOrigin().X()) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(aMapMode.GetOrigin().Y()) );
rOStm.WriteInt32( aSize.Width() );
rOStm.WriteInt32( aSize.Height() );
rOStm.WriteInt32( aMapMode.GetMapUnit() );
rOStm.WriteInt32( aMapMode.GetScaleX().GetNumerator() );
rOStm.WriteInt32( aMapMode.GetScaleX().GetDenominator() );
rOStm.WriteInt32( aMapMode.GetScaleY().GetNumerator() );
rOStm.WriteInt32( aMapMode.GetScaleY().GetDenominator() );
rOStm.WriteInt32( aMapMode.GetOrigin().X() );
rOStm.WriteInt32( aMapMode.GetOrigin().Y() );
}
// write data block
@ -1270,8 +1268,7 @@ bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
{
const sal_uLong nStmPos2 = rOStm.Tell();
rOStm.Seek( nDataFieldPos );
//fdo39428 SvStream no longer supports operator<<(long)
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(nStmPos2 - nDataStart) );
rOStm.WriteInt32( nStmPos2 - nDataStart );
rOStm.Seek( nStmPos2 );
bRet = true;
}

View File

@ -231,12 +231,12 @@ SvStream& WriteImplLineInfo( SvStream& rOStm, const ImplLineInfo& rImplLineInfo
//#fdo39428 SvStream no longer supports operator<<(long)
// version 1
rOStm.WriteUInt16( (sal_uInt16) rImplLineInfo.meStyle ).WriteInt32( sal::static_int_cast<sal_Int32>(rImplLineInfo.mnWidth) );
rOStm.WriteUInt16( (sal_uInt16) rImplLineInfo.meStyle ).WriteInt32( rImplLineInfo.mnWidth );
// since version2
rOStm.WriteUInt16( rImplLineInfo.mnDashCount ).WriteInt32( sal::static_int_cast<sal_Int32>(rImplLineInfo.mnDashLen) );
rOStm.WriteUInt16( rImplLineInfo.mnDotCount ).WriteInt32( sal::static_int_cast<sal_Int32>(rImplLineInfo.mnDotLen) );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(rImplLineInfo.mnDistance) );
rOStm.WriteUInt16( rImplLineInfo.mnDashCount ).WriteInt32( rImplLineInfo.mnDashLen );
rOStm.WriteUInt16( rImplLineInfo.mnDotCount ).WriteInt32( rImplLineInfo.mnDotLen );
rOStm.WriteInt32( rImplLineInfo.mnDistance );
// since version3
rOStm.WriteUInt16( (sal_uInt16) rImplLineInfo.meLineJoin );

View File

@ -1547,7 +1547,7 @@ void MetaTextLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
//#fdo39428 SvStream no longer supports operator<<(long)
WritePair( rOStm, maPos );
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(mnWidth) );
rOStm.WriteInt32( mnWidth );
rOStm.WriteUInt32( meStrikeout );
rOStm.WriteUInt32( meUnderline );
// new in version 2
@ -2644,7 +2644,7 @@ void MetaMoveClipRegionAction::Write( SvStream& rOStm, ImplMetaWriteData* pData
MetaAction::Write(rOStm, pData);
VersionCompat aCompat(rOStm, STREAM_WRITE, 1);
//#fdo39428 SvStream no longer supports operator<<(long)
rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(mnHorzMove) ).WriteInt32( sal::static_int_cast<sal_Int32>(mnVertMove) );
rOStm.WriteInt32( mnHorzMove ).WriteInt32( mnVertMove );
}
void MetaMoveClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )