diff options
49 files changed, 401 insertions, 403 deletions
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index 8e52b450a21c..ea2e7335f622 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -95,7 +95,7 @@ void SbiCloseRecord( SvStream& r, sal_Size nOff ) { sal_Size nPos = r.Tell(); r.Seek( nOff + 2 ); - r.WriteInt32( ( nPos - nOff - 8 ) ); + r.WriteInt32(nPos - nOff - 8 ); r.Seek( nPos ); } @@ -287,8 +287,8 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer ) } r .WriteInt32( eCharSet ) .WriteInt32( nDimBase ) - .WriteInt16( nFlags ) - .WriteInt16( 0 ) + .WriteInt16( nFlags ) + .WriteInt16( 0 ) .WriteInt32( 0 ) .WriteInt32( 0 ); diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 91b98d7d1322..a9981240e034 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -2065,11 +2065,11 @@ bool SbMethod::StoreData( SvStream& rStrm ) const { if( !SbxMethod::StoreData( rStrm ) ) return false; - rStrm.WriteInt16( nDebugFlags ) - .WriteInt16( nLine1 ) - .WriteInt16( nLine2 ) - .WriteInt16( nStart ) - .WriteUChar( bInvalid ); + rStrm.WriteInt16( nDebugFlags ) + .WriteInt16( nLine1 ) + .WriteInt16( nLine2 ) + .WriteInt16( nStart ) + .WriteUChar( bInvalid ); return true; } diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 420715b261c3..4754c98785f1 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -783,7 +783,7 @@ bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 nVer ) bool SbxDimArray::StoreData( SvStream& rStrm ) const { - rStrm.WriteInt16( m_vDimensions.size() ); + rStrm.WriteInt16( m_vDimensions.size() ); for( short i = 0; i < static_cast<short>(m_vDimensions.size()); i++ ) { short lb, ub; diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx index 6e795a9efa30..f13b4c9811d7 100644 --- a/basic/source/sbx/sbxbase.cxx +++ b/basic/source/sbx/sbxbase.cxx @@ -268,7 +268,7 @@ bool SbxBase::Store( SvStream& rStrm ) bool bRes = StoreData( rStrm ); sal_Size nNewPos = rStrm.Tell(); rStrm.Seek( nOldPos ); - rStrm.WriteUInt32( ( nNewPos - nOldPos ) ); + rStrm.WriteUInt32( nNewPos - nOldPos ); rStrm.Seek( nNewPos ); if( rStrm.GetError() != SVSTREAM_OK ) bRes = false; diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index a7d8d4bf5af3..e677d7dfe8c4 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -690,7 +690,7 @@ bool SbxObject::StoreData( SvStream& rStrm ) const } sal_Size nNew = rStrm.Tell(); rStrm.Seek( nPos ); - rStrm.WriteUInt32( ( nNew - nPos ) ); + rStrm.WriteUInt32( nNew - nPos ); rStrm.Seek( nNew ); if( !pMethods->Store( rStrm ) ) { @@ -832,7 +832,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) OString aClassNameStr(OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US)); rStrm.WriteCharPtr( "Object( " ) .WriteCharPtr( OString::number(reinterpret_cast<sal_Int64>(this)).getStr() ).WriteCharPtr( "=='" ) - .WriteCharPtr( aNameStr.isEmpty() ? "<unnamed>" : aNameStr.getStr() ).WriteCharPtr( "', " ) + .WriteCharPtr( aNameStr.isEmpty() ? "<unnamed>" : aNameStr.getStr() ).WriteCharPtr( "', " ) .WriteCharPtr( "of class '" ).WriteCharPtr( aClassNameStr.getStr() ).WriteCharPtr( "', " ) .WriteCharPtr( "counts " ) .WriteCharPtr( OString::number(GetRefCount()).getStr() ) @@ -842,7 +842,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) OString aParentNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); rStrm.WriteCharPtr( "in parent " ) .WriteCharPtr( OString::number(reinterpret_cast<sal_Int64>(GetParent())).getStr() ) - .WriteCharPtr( "=='" ).WriteCharPtr( aParentNameStr.isEmpty() ? "<unnamed>" : aParentNameStr.getStr() ).WriteCharPtr( "'" ); + .WriteCharPtr( "=='" ).WriteCharPtr( aParentNameStr.isEmpty() ? "<unnamed>" : aParentNameStr.getStr() ).WriteCharPtr( "'" ); } else { diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index d96b2071206a..0994bb2769fb 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1221,15 +1221,15 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) memset(aBuffer,0,sizeof(aBuffer)); m_pFileStream->Seek(0L); - (*m_pFileStream).WriteUChar( nDbaseType ); // dBase format - (*m_pFileStream).WriteUChar( (aDate.GetYear() % 100) ); // current date + (*m_pFileStream).WriteUChar( nDbaseType ); // dBase format + (*m_pFileStream).WriteUChar( aDate.GetYear() % 100 ); // current date (*m_pFileStream).WriteUChar( aDate.GetMonth() ); (*m_pFileStream).WriteUChar( aDate.GetDay() ); - (*m_pFileStream).WriteUInt32( 0 ); // number of data records - (*m_pFileStream).WriteUInt16( ((m_pColumns->getCount()+1) * 32 + 1) ); // header information, - // pColumns contains always an additional column + (*m_pFileStream).WriteUInt32( 0 ); // number of data records + (*m_pFileStream).WriteUInt16( (m_pColumns->getCount()+1) * 32 + 1 ); // header information, + // pColumns contains always an additional column (*m_pFileStream).WriteUInt16( 0 ); // record length will be determined later m_pFileStream->Write(aBuffer, 20); @@ -1348,7 +1348,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) { sal_Int32 nPrec = SvDbaseConverter::ConvertPrecisionToDbase(nPrecision,nScale); - (*m_pFileStream).WriteUChar( ( nPrec) ); + (*m_pFileStream).WriteUChar( nPrec ); (*m_pFileStream).WriteUChar( nScale ); nRecLength += (sal_uInt16)nPrec; } diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index d46d4733ba77..a8797550e04a 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -532,7 +532,7 @@ bool ORTFImportExport::Write() } m_pStream->WriteChar( '}' ).WriteCharPtr( SAL_NEWLINE_STRING ); - m_pStream->WriteUChar( 0 ); + m_pStream->WriteUChar( 0 ); return ((*m_pStream).GetError() == SVSTREAM_OK); } diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index f7902b21ab33..66f0ba3e639b 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1239,7 +1239,7 @@ SvStream& SvxProtectItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) if( IsPosProtected() ) cProt |= 0x01; if( IsSizeProtected() ) cProt |= 0x02; if( IsCntntProtected() ) cProt |= 0x04; - rStrm.WriteSChar( cProt ); + rStrm.WriteSChar( cProt ); return rStrm; } @@ -1489,12 +1489,12 @@ bool SvxShadowItem::GetPresentation SvStream& SvxShadowItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteSChar( GetLocation() ) + rStrm.WriteSChar( GetLocation() ) .WriteUInt16( GetWidth() ) - .WriteUChar( (aShadowColor.GetTransparency() > 0) ); + .WriteUChar( aShadowColor.GetTransparency() > 0 ); WriteColor( rStrm, GetColor() ); WriteColor( rStrm, GetColor() ); - rStrm.WriteSChar( (aShadowColor.GetTransparency() > 0 ? 0 : 1) ); //BRUSH_NULL : BRUSH_SOLID + rStrm.WriteSChar( aShadowColor.GetTransparency() > 0 ? 0 : 1 ); //BRUSH_NULL : BRUSH_SOLID return rStrm; } @@ -1753,7 +1753,7 @@ namespace bool lcl_lineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine, bool bConvert, bool bGuessWidth) { - rSvxLine.SetColor( Color(rLine.Color)); + rSvxLine.SetColor( Color(rLine.Color)); if ( bGuessWidth ) { rSvxLine.GuessLinesWidths( rSvxLine.GetBorderLineStyle(), @@ -2589,7 +2589,7 @@ SvStream& SvxBoxInfoItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) cFlags |= 0x02; if ( IsMinDist() ) cFlags |= 0x04; - rStrm.WriteSChar( cFlags ) + rStrm.WriteSChar( cFlags ) .WriteUInt16( GetDefDist() ); const SvxBorderLine* pLine[ 2 ]; pLine[ 0 ] = GetHori(); @@ -3840,7 +3840,7 @@ SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 /*nItemVersion*/ ) rStream.WriteUChar( false ); WriteColor( rStream, aColor ); WriteColor( rStream, aColor ); - rStream.WriteSChar( (aColor.GetTransparency() > 0 ? 0 : 1) ); //BRUSH_NULL : BRUSH_SOLID + rStream.WriteSChar( aColor.GetTransparency() > 0 ? 0 : 1 ); //BRUSH_NULL : BRUSH_SOLID sal_uInt16 nDoLoad = 0; diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index aeca389ba342..3537700d8613 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -265,11 +265,11 @@ SfxPoolItem* SvxLineSpacingItem::Create(SvStream& rStrm, sal_uInt16) const SvStream& SvxLineSpacingItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteSChar( GetPropLineSpace() ) - .WriteInt16( GetInterLineSpace() ) + rStrm.WriteSChar( GetPropLineSpace() ) + .WriteInt16( GetInterLineSpace() ) .WriteUInt16( GetLineHeight() ) - .WriteSChar( GetLineSpaceRule() ) - .WriteSChar( GetInterLineSpaceRule() ); + .WriteSChar( GetLineSpaceRule() ) + .WriteSChar( GetInterLineSpaceRule() ); return rStrm; } @@ -503,7 +503,7 @@ SvStream& SvxAdjustItem::Store( SvStream& rStrm, sal_uInt16 nItemVersion ) const nFlags |= 0x0002; if ( bLastBlock ) nFlags |= 0x0004; - rStrm.WriteSChar( nFlags ); + rStrm.WriteSChar( nFlags ); } return rStrm; } @@ -600,7 +600,7 @@ SfxPoolItem* SvxOrphansItem::Create(SvStream& rStrm, sal_uInt16) const SvStream& SvxOrphansItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteSChar( GetValue() ); + rStrm.WriteSChar( GetValue() ); return rStrm; } @@ -795,11 +795,11 @@ SfxPoolItem* SvxHyphenZoneItem::Create(SvStream& rStrm, sal_uInt16) const SvStream& SvxHyphenZoneItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { - rStrm.WriteSChar( (sal_Int8) IsHyphen() ) - .WriteSChar( (sal_Int8) IsPageEnd() ) - .WriteSChar( GetMinLead() ) - .WriteSChar( GetMinTrail() ) - .WriteSChar( GetMaxHyphens() ); + rStrm.WriteSChar( (sal_Int8) IsHyphen() ) + .WriteSChar( (sal_Int8) IsPageEnd() ) + .WriteSChar( GetMinLead() ) + .WriteSChar( GetMinTrail() ) + .WriteSChar( GetMaxHyphens() ); return rStrm; } @@ -1158,14 +1158,14 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) nCount = (sal_uInt16)(nNew < lA3Width ? ( lA3Width - nNew ) / nDefDist + 1 : 0); } - rStrm.WriteSChar( ( nTabs + nCount ) ); + rStrm.WriteSChar( nTabs + nCount ); for ( short i = 0; i < nTabs; i++ ) { const SvxTabStop& rTab = (*this)[ i ]; rStrm.WriteInt32( rTab.GetTabPos() ) - .WriteSChar( rTab.GetAdjustment() ) - .WriteUChar( rTab.GetDecimal() ) - .WriteUChar( rTab.GetFill() ); + .WriteSChar( rTab.GetAdjustment() ) + .WriteUChar( rTab.GetDecimal() ) + .WriteUChar( rTab.GetFill() ); } if ( bStoreDefTabs ) @@ -1173,9 +1173,9 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) { SvxTabStop aSwTabStop(nNew, SVX_TAB_ADJUST_DEFAULT); rStrm.WriteInt32( aSwTabStop.GetTabPos() ) - .WriteSChar( aSwTabStop.GetAdjustment() ) - .WriteUChar( aSwTabStop.GetDecimal() ) - .WriteUChar( aSwTabStop.GetFill() ); + .WriteSChar( aSwTabStop.GetAdjustment() ) + .WriteUChar( aSwTabStop.GetDecimal() ) + .WriteUChar( aSwTabStop.GetFill() ); nNew += nDefDist; } diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 67f22e537e4f..5209e55e3341 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -373,7 +373,7 @@ SvStream& SvxFontItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) co bool bToBats = IsStarSymbol( GetFamilyName() ); rStrm.WriteUChar( GetFamily() ).WriteUChar( GetPitch() ) - .WriteUChar( (bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet())) ); + .WriteUChar( bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet()) ); OUString aStoreFamilyName( GetFamilyName() ); if( bToBats ) diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 9e14d9b9863c..cb6d5f70e1e4 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -758,8 +758,8 @@ bool Sane::Start( BitmapTransporter& rBitmap ) aConverter.WriteUInt32( nWidth ); aConverter.WriteUInt32( nHeight ); aConverter.Seek( 38 ); - aConverter.WriteUInt32( (1000*nWidth/nWidthMM) ); - aConverter.WriteUInt32( (1000*nHeight/nHeightMM) ); + aConverter.WriteUInt32( 1000*nWidth/nWidthMM ); + aConverter.WriteUInt32( 1000*nHeight/nHeightMM ); bWidthSet = true; } aConverter.Seek(60); diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx index b1fe002071a3..dfa8bbdee213 100644 --- a/filter/source/flash/swfwriter2.cxx +++ b/filter/source/flash/swfwriter2.cxx @@ -121,7 +121,7 @@ void BitStream::writeTo( SvStream& out ) const vector< sal_uInt8>::iterator aEnd( maData.end() ); while(aIter != aEnd) { - out.WriteUChar( (*aIter++) ); + out.WriteUChar( *aIter++ ); } } @@ -154,7 +154,7 @@ void Tag::write( SvStream &out ) sal_uInt16 nCode = ( mnTagId << 6 ) | ( bLarge ? 0x3f : _uInt16(nSz) ); out.WriteUChar( nCode ); - out.WriteUChar( (nCode >> 8) ); + out.WriteUChar( nCode >> 8 ); if( bLarge ) { @@ -199,7 +199,7 @@ void Tag::addI16( sal_Int16 nValue ) void Tag::addUI16( sal_uInt16 nValue ) { WriteUChar( nValue ); - WriteUChar( (nValue >> 8) ); + WriteUChar( nValue >> 8 ); } diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index 18809d526dfa..0d21b0adc012 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -341,7 +341,7 @@ void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF) void METWriter::WriteBigEndianShort(sal_uInt16 nWord) { - pMET->WriteUChar( (nWord>>8) ).WriteUChar( (nWord&0x00ff) ); + pMET->WriteUChar( nWord>>8 ).WriteUChar( nWord&0x00ff ); } @@ -356,8 +356,8 @@ void METWriter::WritePoint(Point aPt) { Point aNewPt = OutputDevice::LogicToLogic( aPt, aPictureMapMode, aTargetMapMode ); - pMET->WriteInt32( ( aNewPt.X() - aPictureRect.Left() ) ) - .WriteInt32( ( aPictureRect.Bottom() - aNewPt.Y() ) ); + pMET->WriteInt32( aNewPt.X() - aPictureRect.Left() ) + .WriteInt32( aPictureRect.Bottom() - aNewPt.Y() ); } @@ -534,9 +534,9 @@ void METWriter::WriteColorAttributeTable(sal_uInt32 nFieldId, BitmapPalette* pPa { const BitmapColor& rCol = (*pPalette)[ nIndex ]; - pMET->WriteUChar( rCol.GetRed() ); - pMET->WriteUChar( rCol.GetGreen() ); - pMET->WriteUChar( rCol.GetBlue() ); + pMET->WriteUChar( rCol.GetRed() ); + pMET->WriteUChar( rCol.GetGreen() ); + pMET->WriteUChar( rCol.GetBlue() ); nIndex++; } } @@ -868,8 +868,8 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *) Size aUnitsPerDecimeter=OutputDevice::LogicToLogic(Size(10,10),MapMode(MAP_CM),aPictureMapMode); pMET->WriteUChar( 0xf6 ).WriteUChar( 0x28 ).WriteUChar( 0x40 ).WriteUChar( 0x00 ) .WriteUChar( 0x05 ).WriteUChar( 0x01 ) - .WriteUInt32( (aUnitsPerDecimeter.Width()) ) - .WriteUInt32( (aUnitsPerDecimeter.Height()) ) + .WriteUInt32( aUnitsPerDecimeter.Width() ) + .WriteUInt32( aUnitsPerDecimeter.Height() ) .WriteUInt32( 0 ) .WriteUInt32( 0 ).WriteUInt32( aPictureRect.GetWidth() ) .WriteUInt32( 0 ).WriteUInt32( aPictureRect.GetHeight() ) @@ -1153,8 +1153,8 @@ void METWriter::METBitBlt(Point aPt, Size aSize, const Size& rBmpSizePixel) WritePoint(Point(aPt.X(),aPt.Y()+aSize.Height())); WritePoint(Point(aPt.X()+aSize.Width(),aPt.Y())); pMET->WriteUInt32( 0 ).WriteUInt32( 0 ) - .WriteUInt32( (rBmpSizePixel.Width()) ) - .WriteUInt32( (rBmpSizePixel.Height()) ); + .WriteUInt32( rBmpSizePixel.Width() ) + .WriteUInt32( rBmpSizePixel.Height() ); } void METWriter::METSetAndPushLineInfo( const LineInfo& rLineInfo ) @@ -1303,7 +1303,7 @@ void METWriter::METLine(const Polygon & rPolygon) else { pMET->WriteUChar( 0x81 ); // Line at current pos } - pMET->WriteUChar( (nOrderPoints*8) ); + pMET->WriteUChar( nOrderPoints*8 ); for (j=0; j<nOrderPoints; j++) WritePoint(rPolygon.GetPoint(i++)); } } @@ -1348,7 +1348,7 @@ void METWriter::METFullArc(Point aCenter, double fMultiplier) WillWriteOrder(14); pMET->WriteUChar( 0xc7 ).WriteUChar( 12 ); WritePoint(aCenter); - pMET->WriteInt32( (fMultiplier*65536.0+0.5) ); + pMET->WriteInt32( fMultiplier*65536.0+0.5 ); } @@ -1364,9 +1364,9 @@ void METWriter::METPartialArcAtCurPos(Point aCenter, double fMultiplier, WillWriteOrder(22); pMET->WriteUChar( 0xa3 ).WriteUChar( 20 ); WritePoint(aCenter); - pMET->WriteInt32( (fMultiplier*65536.0+0.5) ); - pMET->WriteInt32( (fStartAngle*65536.0+0.5) ); - pMET->WriteInt32( (fSweepAngle*65536.0+0.5) ); + pMET->WriteInt32( fMultiplier*65536.0+0.5 ); + pMET->WriteInt32( fStartAngle*65536.0+0.5 ); + pMET->WriteInt32( fSweepAngle*65536.0+0.5 ); } @@ -1376,7 +1376,7 @@ void METWriter::METChrStr( Point aPt, const OUString& aUniStr ) osl_getThreadTextEncoding())); sal_uInt16 nLen = aStr.getLength(); WillWriteOrder( 11 + nLen ); - pMET->WriteUChar( 0xc3 ).WriteUChar( ( 9 + nLen ) ); + pMET->WriteUChar( 0xc3 ).WriteUChar( 9 + nLen ); WritePoint(aPt); for (sal_uInt16 i = 0; i < nLen; ++i) pMET->WriteChar( aStr[i] ); @@ -1398,9 +1398,9 @@ void METWriter::METSetColor(Color aColor) WillWriteOrder(6); pMET->WriteUChar( 0xa6 ).WriteUChar( 4 ).WriteUChar( 0 ) - .WriteUChar( (aColor.GetBlue()) ) - .WriteUChar( (aColor.GetGreen()) ) - .WriteUChar( (aColor.GetRed()) ); + .WriteUChar( aColor.GetBlue() ) + .WriteUChar( aColor.GetGreen() ) + .WriteUChar( aColor.GetRed() ); } @@ -1411,9 +1411,9 @@ void METWriter::METSetBackgroundColor(Color aColor) WillWriteOrder(6); pMET->WriteUChar( 0xa7 ).WriteUChar( 4 ).WriteUChar( 0 ) - .WriteUChar( (aColor.GetBlue()) ) - .WriteUChar( (aColor.GetGreen()) ) - .WriteUChar( (aColor.GetRed()) ); + .WriteUChar( aColor.GetBlue() ) + .WriteUChar( aColor.GetGreen() ) + .WriteUChar( aColor.GetRed() ); } void METWriter::METSetMix(RasterOp eROP) diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx index 818883fef505..b9b9bfa7d085 100644 --- a/filter/source/graphicfilter/epbm/epbm.cxx +++ b/filter/source/graphicfilter/epbm/epbm.cxx @@ -153,7 +153,7 @@ void PBMWriter::ImplWriteBody() m_rOStm.WriteUChar( nBYTE ); } if ( ( x & 7 ) != 0 ) - m_rOStm.WriteUChar( ( nBYTE << ( ( x ^ 7 ) + 1 ) ) ); + m_rOStm.WriteUChar( nBYTE << ( ( x ^ 7 ) + 1 ) ); } } else @@ -168,7 +168,7 @@ void PBMWriter::ImplWriteBody() nxCount = 69; m_rOStm.WriteUChar( 10 ); } - m_rOStm.WriteUChar( ( ( mpAcc->GetPixelIndex( y, x ) ^ 1 ) + '0' ) ) ; + m_rOStm.WriteUChar( ( mpAcc->GetPixelIndex( y, x ) ^ 1 ) + '0' ) ; } m_rOStm.WriteUChar( 10 ); } diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx index a2a437d58e5f..c27fab059bf0 100644 --- a/filter/source/graphicfilter/epgm/epgm.cxx +++ b/filter/source/graphicfilter/epgm/epgm.cxx @@ -165,12 +165,12 @@ void PGMWriter::ImplWriteBody() nNumb = nDat / 100; if ( nNumb ) { - m_rOStm.WriteUChar( ( nNumb + '0' ) ); + m_rOStm.WriteUChar( nNumb + '0' ); nDat -= ( nNumb * 100 ); nNumb = nDat / 10; - m_rOStm.WriteUChar( ( nNumb + '0' ) ); + m_rOStm.WriteUChar( nNumb + '0' ); nDat -= ( nNumb * 10 ); - m_rOStm.WriteUChar( ( nDat + '0' ) ); + m_rOStm.WriteUChar( nDat + '0' ); nCount -= 4; } else @@ -178,14 +178,14 @@ void PGMWriter::ImplWriteBody() nNumb = nDat / 10; if ( nNumb ) { - m_rOStm.WriteUChar( ( nNumb + '0' ) ); + m_rOStm.WriteUChar( nNumb + '0' ); nDat -= ( nNumb * 10 ); - m_rOStm.WriteUChar( ( nDat + '0' ) ); + m_rOStm.WriteUChar( nDat + '0' ); nCount -= 3; } else { - m_rOStm.WriteUChar( ( nDat + '0' ) ); + m_rOStm.WriteUChar( nDat + '0' ); nCount -= 2; } } diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index aa8d045fbf41..f11528e0a714 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -916,7 +916,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nPackType = 4; // writing PixMap-Structure: - pPict->WriteUInt16( (nDstRowBytes|0x8000) ) // Bytes per row and the fact that it's a 'PixMap' + 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 @@ -1100,7 +1100,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nPackType = 0; // write PixMap-Structure: - pPict->WriteUInt16( (nDstRowBytes|0x8000) ) // Bytes per row and the fact that it's a 'PixMap' + 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 @@ -1120,7 +1120,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, // writing and reading the palette: nColTabSize = pAcc->GetPaletteEntryCount(); - pPict->WriteUInt32( 0 ).WriteUInt16( 0x8000 ).WriteUInt16( ( nColTabSize - 1 ) ); + pPict->WriteUInt32( 0 ).WriteUInt16( 0x8000 ).WriteUInt16( nColTabSize - 1 ); for ( i = 0; i < nColTabSize; i++ ) { @@ -2175,7 +2175,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( ((nPos-512)&0x0000ffff) ); + pPict->WriteUInt16( (nPos-512) & 0xffff ); pPict->Seek(nPos); } diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx index bd4289961f66..258f0721cd90 100644 --- a/filter/source/graphicfilter/eppm/eppm.cxx +++ b/filter/source/graphicfilter/eppm/eppm.cxx @@ -174,12 +174,12 @@ void PPMWriter::ImplWriteBody() nNumb = nDat[ i ] / 100; if ( nNumb ) { - m_rOStm.WriteUChar( ( nNumb + '0' ) ); + m_rOStm.WriteUChar( nNumb + '0' ); nDat[ i ] -= ( nNumb * 100 ); nNumb = nDat[ i ] / 10; - m_rOStm.WriteUChar( ( nNumb + '0' ) ); + m_rOStm.WriteUChar( nNumb + '0' ); nDat[ i ] -= ( nNumb * 10 ); - m_rOStm.WriteUChar( ( nDat[ i ] + '0' ) ); + m_rOStm.WriteUChar( nDat[ i ] + '0' ); nCount -= 4; } else @@ -187,14 +187,14 @@ void PPMWriter::ImplWriteBody() nNumb = nDat[ i ] / 10; if ( nNumb ) { - m_rOStm.WriteUChar( ( nNumb + '0' ) ); + m_rOStm.WriteUChar( nNumb + '0' ); nDat[ i ] -= ( nNumb * 10 ); - m_rOStm.WriteUChar( ( nDat[ i ] + '0' ) ); + m_rOStm.WriteUChar( nDat[ i ] + '0' ); nCount -= 3; } else { - m_rOStm.WriteUChar( ( nDat[ i ] + '0' ) ); + m_rOStm.WriteUChar( nDat[ i ] + '0' ); nCount -= 2; } } diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index da5edcce41ec..f0896e684972 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -2615,7 +2615,7 @@ void PSWriter::ImplWriteF( sal_Int32 nNumber, sal_uLong nCount, sal_uLong nMode void PSWriter::ImplWriteByte( sal_uInt8 nNumb, sal_uLong nMode ) { - mpPS->WriteUChar( ( nNumb ) ); + mpPS->WriteUChar( nNumb ); mnCursorPos++; ImplExecMode( nMode ); } @@ -2625,14 +2625,14 @@ void PSWriter::ImplWriteByte( sal_uInt8 nNumb, sal_uLong nMode ) void PSWriter::ImplWriteHexByte( sal_uInt8 nNumb, sal_uLong nMode ) { if ( ( nNumb >> 4 ) > 9 ) - mpPS->WriteUChar( ( ( nNumb >> 4 ) + 'A' - 10 ) ); + mpPS->WriteUChar( ( nNumb >> 4 ) + 'A' - 10 ); else - mpPS->WriteUChar( ( ( nNumb >> 4 ) + '0' ) ); + mpPS->WriteUChar( ( nNumb >> 4 ) + '0' ); if ( ( nNumb & 0xf ) > 9 ) - mpPS->WriteUChar( ( ( nNumb & 0xf ) + 'A' - 10 ) ); + mpPS->WriteUChar( ( nNumb & 0xf ) + 'A' - 10 ); else - mpPS->WriteUChar( ( ( nNumb & 0xf ) + '0' ) ); + mpPS->WriteUChar( ( nNumb & 0xf ) + '0' ); mnCursorPos += 2; ImplExecMode( nMode ); } diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx index 24d21d28b6de..589f69802cbd 100644 --- a/filter/source/graphicfilter/eras/eras.cxx +++ b/filter/source/graphicfilter/eras/eras.cxx @@ -150,7 +150,7 @@ bool RASWriter::ImplWriteHeader() { m_rOStm.WriteUInt32( 0x59a66a95 ).WriteUInt32( mnWidth ).WriteUInt32( mnHeight ) .WriteUInt32( mnDepth ) - .WriteUInt32( (( ( ( ( mnWidth * mnDepth ) + 15 ) >> 4 ) << 1 ) * mnHeight) ) + .WriteUInt32( ( ( ( ( mnWidth * mnDepth ) + 15 ) >> 4 ) << 1 ) * mnHeight ) .WriteUInt32( 2 ); if ( mnDepth > 8 ) @@ -158,7 +158,7 @@ bool RASWriter::ImplWriteHeader() else { - m_rOStm.WriteUInt32( 1 ).WriteUInt32( ( mnColors * 3 ) ); + m_rOStm.WriteUInt32( 1 ).WriteUInt32( mnColors * 3 ); } } else mbStatus = false; diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx index 408b48bbf61a..a4b2768005fb 100644 --- a/filter/source/graphicfilter/etiff/etiff.cxx +++ b/filter/source/graphicfilter/etiff/etiff.cxx @@ -266,7 +266,7 @@ bool TIFFWriter::ImplWriteHeader( bool bMultiPage ) { sal_uInt32 nCurrentPos = m_rOStm.Tell(); m_rOStm.Seek( mnLatestIfdPos ); - m_rOStm.WriteUInt32( ( nCurrentPos - mnStreamOfs ) ); // offset to the IFD + m_rOStm.WriteUInt32( nCurrentPos - mnStreamOfs ); // offset to the IFD m_rOStm.Seek( nCurrentPos ); // (OFS8) TIFF image file directory (IFD) @@ -342,17 +342,17 @@ void TIFFWriter::ImplWritePalette() for ( i = 0; i < mnColors; i++ ) { const BitmapColor& rColor = mpAcc->GetPaletteColor( i ); - m_rOStm.WriteUInt16( ( rColor.GetRed() << 8 ) ); + m_rOStm.WriteUInt16( rColor.GetRed() << 8 ); } for ( i = 0; i < mnColors; i++ ) { const BitmapColor& rColor = mpAcc->GetPaletteColor( i ); - m_rOStm.WriteUInt16( ( rColor.GetGreen() << 8 ) ); + m_rOStm.WriteUInt16( rColor.GetGreen() << 8 ); } for ( i = 0; i < mnColors; i++ ) { const BitmapColor& rColor = mpAcc->GetPaletteColor( i ); - m_rOStm.WriteUInt16( ( rColor.GetBlue() << 8 ) ); + m_rOStm.WriteUInt16( rColor.GetBlue() << 8 ); } } @@ -498,13 +498,13 @@ inline void TIFFWriter::WriteBits( sal_uInt16 nCode, sal_uInt16 nCodeLen ) nOffset -= nCodeLen; while ( nOffset < 24 ) { - m_rOStm.WriteUChar( ( dwShift >> 24 ) ); + m_rOStm.WriteUChar( dwShift >> 24 ); dwShift <<= 8; nOffset += 8; } if ( nCode == 257 && nOffset != 32 ) { - m_rOStm.WriteUChar( ( dwShift >> 24 ) ); + m_rOStm.WriteUChar( dwShift >> 24 ); } } diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx index 18b0b2389112..b8e7a470302e 100644 --- a/filter/source/graphicfilter/expm/expm.cxx +++ b/filter/source/graphicfilter/expm/expm.cxx @@ -221,11 +221,11 @@ void XPMWriter::ImplWritePixel( sal_uLong nCol ) const if ( mnColors > 26 ) { sal_uInt8 nDiff = (sal_uInt8) ( nCol / 26 ); - m_rOStm.WriteUChar( ( nDiff + 'A' ) ); - m_rOStm.WriteUChar( ( nCol - ( nDiff*26 ) + 'A' ) ); + m_rOStm.WriteUChar( nDiff + 'A' ); + m_rOStm.WriteUChar( nCol - ( nDiff*26 ) + 'A' ); } else - m_rOStm.WriteUChar( ( nCol + 'A' ) ); + m_rOStm.WriteUChar( nCol + 'A' ); } diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 10b92eccf12e..70d263715c93 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -99,7 +99,7 @@ using namespace ::com::sun::star; EscherExContainer::EscherExContainer( SvStream& rSt, const sal_uInt16 nRecType, const sal_uInt16 nInstance ) : rStrm ( rSt ) { - rStrm.WriteUInt32( ( ( 0xf | ( nInstance << 4 ) ) | ( nRecType << 16 ) ) ).WriteUInt32( 0 ); + rStrm.WriteUInt32( ( 0xf | ( nInstance << 4 ) ) | ( nRecType << 16 ) ).WriteUInt32( 0 ); nContPos = rStrm.Tell(); } EscherExContainer::~EscherExContainer() @@ -117,7 +117,7 @@ EscherExContainer::~EscherExContainer() EscherExAtom::EscherExAtom( SvStream& rSt, const sal_uInt16 nRecType, const sal_uInt16 nInstance, const sal_uInt8 nVersion ) : rStrm ( rSt ) { - rStrm.WriteUInt32( ( ( nVersion | ( nInstance << 4 ) ) | ( nRecType << 16 ) ) ).WriteUInt32( 0 ); + rStrm.WriteUInt32( ( nVersion | ( nInstance << 4 ) ) | ( nRecType << 16 ) ).WriteUInt32( 0 ); nContPos = rStrm.Tell(); } EscherExAtom::~EscherExAtom() @@ -301,7 +301,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( ( ( 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 ); @@ -366,7 +366,7 @@ sal_uInt32 EscherPropertyContainer::GetGradientColor( aColor = pGradient->EndColor; } } - sal_uInt32 nRed = ( ( aColor.GetRed() * nIntensity ) / 100 ); + sal_uInt32 nRed = ( aColor.GetRed() * nIntensity ) / 100; sal_uInt32 nGreen = ( ( aColor.GetGreen() * nIntensity ) / 100 ) << 8; sal_uInt32 nBlue = ( ( aColor.GetBlue() * nIntensity ) / 100 ) << 16; return nRed | nGreen | nBlue; @@ -4161,8 +4161,8 @@ void EscherBlibEntry::WriteBlibEntry( SvStream& rSt, bool bWritePictureOffset, s { sal_uInt32 nPictureOffset = ( bWritePictureOffset ) ? mnPictureOffset : 0; - rSt.WriteUInt32( ( ( ESCHER_BSE << 16 ) | ( ( (sal_uInt16)meBlibType << 4 ) | 2 ) ) ) - .WriteUInt32( ( 36 + nResize ) ) + rSt.WriteUInt32( ( ESCHER_BSE << 16 ) | ( ( (sal_uInt16)meBlibType << 4 ) | 2 ) ) + .WriteUInt32( 36 + nResize ) .WriteUChar( meBlibType ); switch ( meBlibType ) @@ -4177,7 +4177,7 @@ void EscherBlibEntry::WriteBlibEntry( SvStream& rSt, bool bWritePictureOffset, s rSt.Write( &mnIdentifier[ 0 ], 16 ); rSt.WriteUInt16( 0 ) - .WriteUInt32( ( mnSize + mnSizeExtra ) ) + .WriteUInt32( mnSize + mnSizeExtra ) .WriteUInt32( mnRefCount ) .WriteUInt32( nPictureOffset ) .WriteUInt32( 0 ); @@ -4262,8 +4262,8 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM sal_uInt32 nSize = GetBlibStoreContainerSize( pMergePicStreamBSE ); if ( nSize ) { - rSt.WriteUInt32( ( ( ESCHER_BstoreContainer << 16 ) | 0x1f ) ) - .WriteUInt32( ( nSize - 8 ) ); + rSt.WriteUInt32( ( ESCHER_BstoreContainer << 16 ) | 0x1f ) + .WriteUInt32( nSize - 8 ); if ( pMergePicStreamBSE ) { @@ -4455,7 +4455,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin if ( mnFlags & _E_GRAPH_PROV_USE_INSTANCES ) { - rPicOutStrm.WriteUInt32( ( 0x7f90000 | (sal_uInt16)( mnBlibEntrys << 4 ) ) ) + rPicOutStrm.WriteUInt32( 0x7f90000 | (sal_uInt16)( mnBlibEntrys << 4 ) ) .WriteUInt32( 0 ); nAtomSize = rPicOutStrm.Tell(); if ( eBlibType == PNG ) @@ -4495,7 +4495,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin //nInstance = ( eBlibType == PNG ) ? 0xf01e6e00 : 0xf01d46a0; - rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( ( p_EscherBlibEntry->mnSize + nExtra ) ); + rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( p_EscherBlibEntry->mnSize + nExtra ); rPicOutStrm.Write( p_EscherBlibEntry->mnIdentifier, 16 ); rPicOutStrm.WriteUChar( 0xff ); rPicOutStrm.Write( pGraphicAry, p_EscherBlibEntry->mnSize ); @@ -4515,7 +4515,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin nExtra = eBlibType == WMF ? 0x42 : 0x32; // !EMF -> no change p_EscherBlibEntry->mnSizeExtra = nExtra + 8; nInstance = ( eBlibType == WMF ) ? 0xf01b2170 : 0xf01a3d40; // !EMF -> no change - rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( ( p_EscherBlibEntry->mnSize + nExtra ) ); + rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( p_EscherBlibEntry->mnSize + nExtra ); if ( eBlibType == WMF ) // !EMF -> no change rPicOutStrm.Write( p_EscherBlibEntry->mnIdentifier, 16 ); rPicOutStrm.Write( p_EscherBlibEntry->mnIdentifier, 16 ); @@ -4561,7 +4561,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin { sal_uInt32 nPos = rPicOutStrm.Tell(); rPicOutStrm.Seek( nAtomSize - 4 ); - rPicOutStrm.WriteUInt32( ( nPos - nAtomSize ) ); + rPicOutStrm.WriteUInt32( nPos - nAtomSize ); rPicOutStrm.Seek( nPos ); } nBlibId = ImplInsertBlib( p_EscherBlibEntry ), p_EscherBlibEntry = NULL; @@ -4884,7 +4884,7 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm ) if ( nCount ) { sal_uInt32 nRecHdPos, nCurrentPos, nSize; - rStrm .WriteUInt16( ( ( nCount << 4 ) | 0xf ) ) // open an ESCHER_SolverContainer + rStrm .WriteUInt16( ( nCount << 4 ) | 0xf ) // open an ESCHER_SolverContainer .WriteUInt16( ESCHER_SolverContainer ) .WriteUInt32( 0 ); @@ -4907,7 +4907,7 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm ) if ( aConnectorRule.nShapeB ) aConnectorRule.ncptiB = pPtr->GetConnectorRule( false ); } - rStrm .WriteUInt32( ( ( ESCHER_ConnectorRule << 16 ) | 1 ) ) // atom hd + rStrm .WriteUInt32( ( ESCHER_ConnectorRule << 16 ) | 1 ) // atom hd .WriteUInt32( 24 ) .WriteUInt32( aConnectorRule.nRuleId ) .WriteUInt32( aConnectorRule.nShapeA ) @@ -5159,7 +5159,7 @@ void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom ) if ( (nCurPos < nEndOfRecord) || ((nCurPos == nEndOfRecord) && (bContainer || bExpandEndOfAtom)) ) { mpOutStrm->SeekRel( -4 ); - mpOutStrm->WriteUInt32( ( nSize + nBytes ) ); + mpOutStrm->WriteUInt32( nSize + nBytes ); if ( !bContainer ) mpOutStrm->SeekRel( nSize ); } @@ -5241,7 +5241,7 @@ bool EscherEx::InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ) void EscherEx::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance ) { - mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( nEscherContainer ).WriteUInt32( 0 ); + mpOutStrm->WriteUInt16( ( nRecInstance << 4 ) | 0xf ).WriteUInt16( nEscherContainer ).WriteUInt32( 0 ); mOffsets.push_back( mpOutStrm->Tell() - 4 ); mRecTypes.push_back( nEscherContainer ); switch( nEscherContainer ) @@ -5344,13 +5344,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( ( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( ( nSize - 8 ) ); + mpOutStrm->WriteUInt16( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ).WriteUInt16( nRecType ).WriteUInt32( nSize - 8 ); mpOutStrm->Seek( nOldPos ); } void EscherEx::AddAtom( sal_uInt32 nAtomSize, sal_uInt16 nRecType, int nRecVersion, int nRecInstance ) { - mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ) ).WriteUInt16( nRecType ).WriteUInt32( nAtomSize ); + mpOutStrm->WriteUInt16( ( nRecInstance << 4 ) | ( nRecVersion & 0xf ) ).WriteUInt16( nRecType ).WriteUInt32( nAtomSize ); } void EscherEx::AddChildAnchor( const Rectangle& rRect ) @@ -5367,8 +5367,8 @@ void EscherEx::AddClientAnchor( const Rectangle& rRect ) AddAtom( 8, ESCHER_ClientAnchor ); mpOutStrm->WriteInt16( rRect.Top() ) .WriteInt16( rRect.Left() ) - .WriteInt16( ( rRect.GetWidth() + rRect.Left() ) ) - .WriteInt16( ( rRect.GetHeight() + rRect.Top() ) ); + .WriteInt16( rRect.GetWidth() + rRect.Left() ) + .WriteInt16( rRect.GetHeight() + rRect.Top() ); } EscherExHostAppData* EscherEx::EnterAdditionalTextGroup() diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 2b2536935815..107b38a820b2 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -154,7 +154,7 @@ static sal_uInt32 nMSOleObjCntr = 0; void Impl_OlePres::Write( SvStream & rStm ) { WriteClipboardFormat( rStm, FORMAT_GDIMETAFILE ); - rStm.WriteInt32( (nJobLen +4) ); // a TargetDevice that's always empty + rStm.WriteInt32( nJobLen + 4 ); // a TargetDevice that's always empty if( nJobLen ) rStm.Write( pJob, nJobLen ); rStm.WriteUInt32( nAspect ); @@ -196,7 +196,7 @@ void Impl_OlePres::Write( SvStream & rStm ) } sal_uLong nEndPos = rStm.Tell(); rStm.Seek( nPos ); - rStm.WriteUInt32( (nEndPos - nPos - 4) ); + rStm.WriteUInt32( nEndPos - nPos - 4 ); rStm.Seek( nEndPos ); } diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index ac81ac5b0d2b..a6c5e3ffa562 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -790,18 +790,17 @@ bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions ) bool ScAutoFormatData::Save(SvStream& rStream, sal_uInt16 fileVersion) { sal_uInt16 nVal = AUTOFORMAT_DATA_ID; - bool b; rStream.WriteUInt16( nVal ); // --- from 680/dr25 on: store strings as UTF-8 write_uInt16_lenPrefixed_uInt8s_FromOUString(rStream, aName, RTL_TEXTENCODING_UTF8); rStream.WriteUInt16( nStrResId ); - rStream.WriteUChar( ( b = bIncludeFont ) ); - rStream.WriteUChar( ( b = bIncludeJustify ) ); - rStream.WriteUChar( ( b = bIncludeFrame ) ); - rStream.WriteUChar( ( b = bIncludeBackground ) ); - rStream.WriteUChar( ( b = bIncludeValueFormat ) ); - rStream.WriteUChar( ( b = bIncludeWidthHeight ) ); + rStream.WriteUChar( bIncludeFont ); + rStream.WriteUChar( bIncludeJustify ); + rStream.WriteUChar( bIncludeFrame ); + rStream.WriteUChar( bIncludeBackground ); + rStream.WriteUChar( bIncludeValueFormat ); + rStream.WriteUChar( bIncludeWidthHeight ); if (fileVersion >= SOFFICE_FILEFORMAT_50) WriteAutoFormatSwBlob( rStream, m_swFields ); @@ -1091,7 +1090,7 @@ bool ScAutoFormat::Save() bRet &= (rStream.GetError() == 0); - rStream.WriteUInt16( (maData.size() - 1) ); + rStream.WriteUInt16( maData.size() - 1 ); bRet &= (rStream.GetError() == 0); MapType::iterator it = maData.begin(), itEnd = maData.end(); if (it != itEnd) diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 4d8817480935..8ca7598589ec 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -320,7 +320,7 @@ bool ScImportExport::ExportString( OUString& rText, sal_uLong nFmt ) // mba: no BaseURL for data exc if( ExportStream( aStrm, OUString(), nFmt ) ) { - aStrm.WriteUInt16( 0 ); + aStrm.WriteUInt16( 0 ); aStrm.Seek( STREAM_SEEK_TO_END ); rText = OUString( (const sal_Unicode*) aStrm.GetData() ); diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index ee806335b054..c66192f7e2fa 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -177,7 +177,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ mpPptEscherEx->AddAtom( 24, EPP_SlideAtom, 2 ); mpStrm->WriteInt32( static_cast<sal_Int32>(rLayout.nLayout) ); mpStrm->Write( rLayout.nPlaceHolder, 8 ); // placeholderIDs (8 parts) - mpStrm->WriteUInt32( (nMasterNum | 0x80000000) )// master ID (equals 0x80000000 on a master page) + mpStrm->WriteUInt32( nMasterNum | 0x80000000 ) // master ID (equals 0x80000000 on a master page) .WriteUInt32( nPageNum + 0x100 ) // notes ID (equals null if no notes are present) .WriteUInt16( nMode ) .WriteUInt16( 0 ); // padword @@ -547,8 +547,8 @@ void PPTWriter::ImplWriteExtParaHeader( SvMemoryStream& rSt, sal_uInt32 nRef, sa { if ( rSt.Tell() ) { - aBuExOutlineStream.WriteUInt32( ( ( EPP_PST_ExtendedParagraphHeaderAtom << 16 ) - | ( nRef << 4 ) ) ) + aBuExOutlineStream.WriteUInt32( ( EPP_PST_ExtendedParagraphHeaderAtom << 16 ) + | ( nRef << 4 ) ) .WriteUInt32( 8 ) .WriteUInt32( nSlideId ) .WriteUInt32( nInstance ); @@ -838,7 +838,7 @@ bool PPTWriter::ImplCreateDocument() const sal_Unicode* pCustomShow = aCustomShow.getStr(); for ( i = 0; i < nCustomShowNameLen; i++ ) { - mpStrm->WriteUInt16( ( pCustomShow[ i ] ) ); + mpStrm->WriteUInt16( pCustomShow[ i ] ); } } for ( i = nCustomShowNameLen; i < 32; i++, mpStrm->WriteUInt16( 0 ) ) ; @@ -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( ( pCustomShowName[ k++ ] ) ) ) ; + for ( sal_uInt32 k = 0; k < nNamedShowLen; mpStrm->WriteUInt16( pCustomShowName[ k++ ] ) ) ; mAny = aXCont->getByName( pUString[ i ] ); if ( mAny.getValue() ) { @@ -902,7 +902,7 @@ bool PPTWriter::ImplCreateDocument() if (pIter != maSlideNameList.end()) { sal_uInt32 nPageNumber = pIter - maSlideNameList.begin(); - mpStrm->WriteUInt32( ( nPageNumber + 0x100 ) ); // unique slide id + mpStrm->WriteUInt32( nPageNumber + 0x100 ); // unique slide id } } } @@ -971,7 +971,7 @@ bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm ) case 1 : // click action to slidenumber { rStrm.WriteUInt32( 0x1f ).WriteUInt32( 1 ).WriteUInt32( 0 ); // path - rStrm.WriteUInt32( 0x1f ).WriteUInt32( ( nUrlLen + 1 ) ); + rStrm.WriteUInt32( 0x1f ).WriteUInt32( nUrlLen + 1 ); for ( sal_Int32 i = 0; i < nUrlLen; i++ ) { rStrm.WriteUInt16( rUrl[ i ] ); @@ -984,7 +984,7 @@ bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm ) sal_Int32 i; rStrm .WriteUInt32( 0x1f ) - .WriteUInt32( ( nUrlLen + 1 ) ); + .WriteUInt32( nUrlLen + 1 ); for ( i = 0; i < nUrlLen; i++ ) { rStrm.WriteUInt16( rUrl[ i ] ); @@ -1001,7 +1001,7 @@ bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm ) } nCurrentOfs = rStrm.Tell(); rStrm.Seek( nParaOfs ); - rStrm.WriteUInt32( ( nCurrentOfs - ( nParaOfs + 4 ) ) ); + rStrm.WriteUInt32( nCurrentOfs - ( nParaOfs + 4 ) ); rStrm.WriteUInt32( nParaCount ); rStrm.Seek( nCurrentOfs ); return true; @@ -1426,7 +1426,7 @@ bool PPTWriter::ImplWriteAtomEnding() nPos = mpStrm->Tell(); mpStrm->Seek( nPersistOfs ); mpPptEscherEx->AddAtom( ( nPersistEntrys + 1 ) << 2, EPP_PersistPtrIncrementalBlock ); // insert Record Header - mpStrm->WriteUInt32( ( ( nPersistEntrys << 20 ) | 1 ) ); + mpStrm->WriteUInt32( ( nPersistEntrys << 20 ) | 1 ); mpStrm->Seek( nPos ); mpCurUserStrm->WriteUInt32( nPos ); // set offset to current edit diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 83ccbfaf1e19..0fafe1dabc12 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -154,9 +154,9 @@ sal_uInt32 PPTWriter::ImplVBAInfoContainer( SvStream* pStrm ) sal_uInt32 nSize = 28; if ( pStrm ) { - pStrm->WriteUInt32( ( 0x1f | ( EPP_VBAInfo << 16 ) ) ) - .WriteUInt32( ( nSize - 8 ) ) - .WriteUInt32( ( 2 | ( EPP_VBAInfoAtom << 16 ) ) ) + pStrm->WriteUInt32( 0x1f | ( EPP_VBAInfo << 16 ) ) + .WriteUInt32( nSize - 8 ) + .WriteUInt32( 2 | ( EPP_VBAInfoAtom << 16 ) ) .WriteUInt32( 12 ); mpPptEscherEx->InsertPersistOffset( EPP_Persist_VBAInfoAtom, pStrm->Tell() ); pStrm->WriteUInt32( 0 ) @@ -193,11 +193,11 @@ sal_uInt32 PPTWriter::ImplSlideViewInfoContainer( sal_uInt32 nInstance, SvStream nPosition1 = 0xb40; nPosition2 = 0x870; } - pStrm->WriteUInt32( ( 0xf | ( EPP_SlideViewInfo << 16 ) | ( nInstance << 4 ) ) ) - .WriteUInt32( ( nSize - 8 ) ) - .WriteUInt32( ( EPP_SlideViewInfoAtom << 16 ) ).WriteUInt32( 3 ) + pStrm->WriteUInt32( 0xf | ( EPP_SlideViewInfo << 16 ) | ( nInstance << 4 ) ) + .WriteUInt32( nSize - 8 ) + .WriteUInt32( EPP_SlideViewInfoAtom << 16 ).WriteUInt32( 3 ) .WriteUChar( bShowGuides ).WriteUChar( bSnapToGrid ).WriteUChar( bSnapToShape ) - .WriteUInt32( ( EPP_ViewInfoAtom << 16 ) ).WriteUInt32( 52 ) + .WriteUInt32( EPP_ViewInfoAtom << 16 ).WriteUInt32( 52 ) .WriteInt32( nScaling ).WriteInt32( 100 ).WriteInt32( nScaling ).WriteInt32( 100 ) // scaling atom - Keeps the current scale .WriteInt32( nScaling ).WriteInt32( 100 ).WriteInt32( nScaling ).WriteInt32( 100 ) // scaling atom - Keeps the previous scale .WriteInt32( 0x17ac ).WriteInt32( nMasterCoordinate )// Origin - Keeps the origin in master coordinates @@ -205,10 +205,10 @@ sal_uInt32 PPTWriter::ImplSlideViewInfoContainer( sal_uInt32 nInstance, SvStream .WriteUChar( 1 ) // Bool1 varScale - Set if zoom to fit is set .WriteUChar( 0 ) // bool1 draftMode - Not used .WriteUInt16( 0 ) // padword - .WriteUInt32( ( ( 7 << 4 ) | ( EPP_GuideAtom << 16 ) ) ).WriteUInt32( 8 ) + .WriteUInt32( ( 7 << 4 ) | ( EPP_GuideAtom << 16 ) ).WriteUInt32( 8 ) .WriteUInt32( 0 ) // Type of the guide. If the guide is horizontal this value is zero. If it's vertical, it's one. .WriteInt32( nPosition1 ) // Position of the guide in master coordinates. X coordinate if it's vertical, and Y coordinate if it's horizontal. - .WriteUInt32( ( ( 7 << 4 ) | ( EPP_GuideAtom << 16 ) ) ).WriteUInt32( 8 ) + .WriteUInt32( ( 7 << 4 ) | ( EPP_GuideAtom << 16 ) ).WriteUInt32( 8 ) .WriteInt32( 1 ) // Type of the guide. If the guide is horizontal this value is zero. If it's vertical, it's one. .WriteInt32( nPosition2 ); // Position of the guide in master coordinates. X coordinate if it's vertical, and Y coordinate if it's horizontal. } @@ -220,8 +220,8 @@ sal_uInt32 PPTWriter::ImplOutlineViewInfoContainer( SvStream* pStrm ) sal_uInt32 nSize = 68; if ( pStrm ) { - pStrm->WriteUInt32( ( 0xf | ( EPP_OutlineViewInfo << 16 ) ) ).WriteUInt32( ( nSize - 8 ) ) - .WriteUInt32( ( EPP_ViewInfoAtom << 16 ) ).WriteUInt32( 52 ) + pStrm->WriteUInt32( 0xf | ( EPP_OutlineViewInfo << 16 ) ).WriteUInt32( nSize - 8 ) + .WriteUInt32( EPP_ViewInfoAtom << 16 ).WriteUInt32( 52 ) .WriteInt32( 170 ).WriteInt32( 200 ).WriteInt32( 170 ).WriteInt32( 200 ) // scaling atom - Keeps the current scale .WriteInt32( 170 ).WriteInt32( 200 ).WriteInt32( 170 ).WriteInt32( 200 ) // scaling atom - Keeps the previous scale .WriteInt32( 0x17ac ).WriteInt32( 0xdda ) // Origin - Keeps the origin in master coordinates @@ -247,15 +247,15 @@ sal_uInt32 PPTWriter::ImplProgBinaryTag( SvStream* pStrm ) if ( pStrm ) { - pStrm->WriteUInt32( ( EPP_BinaryTagData << 16 ) ).WriteUInt32( ( nSize - 8 ) ); + pStrm->WriteUInt32( EPP_BinaryTagData << 16 ).WriteUInt32( nSize - 8 ); if ( nPictureStreamSize ) { - pStrm->WriteUInt32( ( 0xf | ( EPP_PST_ExtendedBuGraContainer << 16 ) ) ).WriteUInt32( nPictureStreamSize ); + pStrm->WriteUInt32( 0xf | ( EPP_PST_ExtendedBuGraContainer << 16 ) ).WriteUInt32( nPictureStreamSize ); pStrm->Write( aBuExPictureStream.GetData(), nPictureStreamSize ); } if ( nOutlineStreamSize ) { - pStrm->WriteUInt32( ( 0xf | ( EPP_PST_ExtendedPresRuleContainer << 16 ) ) ).WriteUInt32( nOutlineStreamSize ); + pStrm->WriteUInt32( 0xf | ( EPP_PST_ExtendedPresRuleContainer << 16 ) ).WriteUInt32( nOutlineStreamSize ); pStrm->Write( aBuExOutlineStream.GetData(), nOutlineStreamSize ); } } @@ -267,8 +267,8 @@ sal_uInt32 PPTWriter::ImplProgBinaryTagContainer( SvStream* pStrm, SvMemoryStrea sal_uInt32 nSize = 8 + 8 + 14; if ( pStrm ) { - pStrm->WriteUInt32( ( 0xf | ( EPP_ProgBinaryTag << 16 ) ) ).WriteUInt32( 0 ) - .WriteUInt32( ( EPP_CString << 16 ) ).WriteUInt32( 14 ) + pStrm->WriteUInt32( 0xf | ( EPP_ProgBinaryTag << 16 ) ).WriteUInt32( 0 ) + .WriteUInt32( EPP_CString << 16 ).WriteUInt32( 14 ) .WriteUInt32( 0x5f005f ).WriteUInt32( 0x50005f ) .WriteUInt32( 0x540050 ).WriteUInt16( 0x39 ); } @@ -276,7 +276,7 @@ sal_uInt32 PPTWriter::ImplProgBinaryTagContainer( SvStream* pStrm, SvMemoryStrea { sal_uInt32 nLen = pBinTagStrm->Tell(); nSize += nLen + 8; - pStrm->WriteUInt32( ( EPP_BinaryTagData << 16 ) ).WriteUInt32( nLen ); + pStrm->WriteUInt32( EPP_BinaryTagData << 16 ).WriteUInt32( nLen ); pStrm->Write( pBinTagStrm->GetData(), nLen ); } else @@ -285,7 +285,7 @@ sal_uInt32 PPTWriter::ImplProgBinaryTagContainer( SvStream* pStrm, SvMemoryStrea if ( pStrm ) { pStrm->SeekRel( - ( (sal_Int32)nSize - 4 ) ); - pStrm->WriteUInt32( ( nSize - 8 ) ); + pStrm->WriteUInt32( nSize - 8 ); pStrm->SeekRel( nSize - 8 ); } return nSize; @@ -299,13 +299,13 @@ sal_uInt32 PPTWriter::ImplProgTagContainer( SvStream* pStrm, SvMemoryStream* pBi nSize = 8; if ( pStrm ) { - pStrm->WriteUInt32( ( 0xf | ( EPP_ProgTags << 16 ) ) ).WriteUInt32( 0 ); + pStrm->WriteUInt32( 0xf | ( EPP_ProgTags << 16 ) ).WriteUInt32( 0 ); } nSize += ImplProgBinaryTagContainer( pStrm, pBinTagStrm ); if ( pStrm ) { pStrm->SeekRel( - ( (sal_Int32)nSize - 4 ) ); - pStrm->WriteUInt32( ( nSize - 8 ) ); + pStrm->WriteUInt32( nSize - 8 ); pStrm->SeekRel( nSize - 8 ); } } @@ -317,7 +317,7 @@ sal_uInt32 PPTWriter::ImplDocumentListContainer( SvStream* pStrm ) sal_uInt32 nSize = 8; if ( pStrm ) { - pStrm->WriteUInt32( ( ( EPP_List << 16 ) | 0xf ) ).WriteUInt32( 0 ); + pStrm->WriteUInt32( ( EPP_List << 16 ) | 0xf ).WriteUInt32( 0 ); } nSize += ImplVBAInfoContainer( pStrm ); @@ -329,7 +329,7 @@ sal_uInt32 PPTWriter::ImplDocumentListContainer( SvStream* pStrm ) if ( pStrm ) { pStrm->SeekRel( - ( (sal_Int32)nSize - 4 ) ); - pStrm->WriteUInt32( ( nSize - 8 ) ); + pStrm->WriteUInt32( nSize - 8 ); pStrm->SeekRel( nSize - 8 ); } return nSize; @@ -340,16 +340,16 @@ sal_uInt32 PPTWriter::ImplMasterSlideListContainer( SvStream* pStrm ) sal_uInt32 i, nSize = 28 * mnMasterPages + 8; if ( pStrm ) { - pStrm->WriteUInt32( ( 0x1f | ( EPP_SlideListWithText << 16 ) ) ).WriteUInt32( ( nSize - 8 ) ); + pStrm->WriteUInt32( 0x1f | ( EPP_SlideListWithText << 16 ) ).WriteUInt32( nSize - 8 ); for ( i = 0; i < mnMasterPages; i++ ) { - pStrm->WriteUInt32( ( EPP_SlidePersistAtom << 16 ) ).WriteUInt32( 20 ); + pStrm->WriteUInt32( EPP_SlidePersistAtom << 16 ).WriteUInt32( 20 ); mpPptEscherEx->InsertPersistOffset( EPP_MAINMASTER_PERSIST_KEY | i, pStrm->Tell() ); pStrm->WriteUInt32( 0 ) // psrReference - logical reference to the slide persist object ( EPP_MAINMASTER_PERSIST_KEY ) .WriteUInt32( 0 ) // flags - only bit 3 used, if set then slide contains shapes other than placeholders .WriteInt32( 0 ) // numberTexts - number of placeholder texts stored with the persist object. Allows to display outline view without loading the slide persist objects - .WriteInt32( ( 0x80000000 | i ) ) // slideId - Unique slide identifier, used for OLE link monikers for example + .WriteInt32( 0x80000000 | i ) // slideId - Unique slide identifier, used for OLE link monikers for example .WriteUInt32( 0 ); // reserved, usually 0 } } @@ -446,7 +446,7 @@ bool PPTWriter::ImplCloseDocument() { mpStrm->WriteUInt16( 0xf ) .WriteUInt16( EPP_ExObjList ) - .WriteUInt32( ( nExEmbedSize + 12 ) ) + .WriteUInt32( nExEmbedSize + 12 ) .WriteUInt16( 0 ) .WriteUInt16( EPP_ExObjListAtom ) .WriteUInt32( 4 ) @@ -1069,7 +1069,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u { PPTExParaSheet& rParaSheet = mpStyleSheet->GetParaSheet( nTextInstance ); - rOut.WriteUInt32( ( ( EPP_TextHeaderAtom << 16 ) | ( nAtomInstance << 4 ) ) ).WriteUInt32( 4 ) + rOut.WriteUInt32( ( EPP_TextHeaderAtom << 16 ) | ( nAtomInstance << 4 ) ).WriteUInt32( 4 ) .WriteInt32( nTextInstance ); if ( mbEmptyPresObj ) @@ -1089,12 +1089,12 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u sal_uInt32 nSize, nPos = rOut.Tell(); - rOut.WriteUInt32( ( EPP_StyleTextPropAtom << 16 ) ).WriteUInt32( 0 ); + rOut.WriteUInt32( EPP_StyleTextPropAtom << 16 ).WriteUInt32( 0 ); ImplWriteParagraphs( rOut, aTextObj ); ImplWritePortions( rOut, aTextObj ); nSize = rOut.Tell() - nPos; rOut.SeekRel( - ( (sal_Int32)nSize - 4 ) ); - rOut.WriteUInt32( ( nSize - 8 ) ); + rOut.WriteUInt32( nSize - 8 ); rOut.SeekRel( nSize - 8 ); for ( sal_uInt32 i = 0; i < aTextObj.ParagraphCount(); ++i ) @@ -1112,16 +1112,16 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u case 1 : case 2 : { - rOut.WriteUInt32( ( EPP_DateTimeMCAtom << 16 ) ).WriteUInt32( 8 ) - .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ) // TxtOffset to TxtField; + rOut.WriteUInt32( EPP_DateTimeMCAtom << 16 ).WriteUInt32( 8 ) + .WriteUInt32( pFieldEntry->nFieldStartPos ) // TxtOffset to TxtField; .WriteUChar( ( pFieldEntry->nFieldType & 0xff ) ) // Type .WriteUChar( 0 ).WriteUInt16( 0 ); // PadBytes } break; case 3 : { - rOut.WriteUInt32( ( EPP_SlideNumberMCAtom << 16 ) ).WriteUInt32( 4 ) - .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ); + rOut.WriteUInt32( EPP_SlideNumberMCAtom << 16 ).WriteUInt32( 4 ) + .WriteUInt32( pFieldEntry->nFieldStartPos ); } break; case 4 : @@ -1164,8 +1164,8 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u else nHyperId = ImplInsertBookmarkURL( pFieldEntry->aFieldUrl, 2 | ( nHyperId << 8 ), aFile, aTarget, "", "" ); - rOut.WriteUInt32( ( ( EPP_InteractiveInfo << 16 ) | 0xf ) ).WriteUInt32( 24 ) - .WriteUInt32( ( EPP_InteractiveInfoAtom << 16 ) ).WriteUInt32( 16 ) + rOut.WriteUInt32( ( EPP_InteractiveInfo << 16 ) | 0xf ).WriteUInt32( 24 ) + .WriteUInt32( EPP_InteractiveInfoAtom << 16 ).WriteUInt32( 16 ) .WriteUInt32( 0 ) // soundref .WriteUInt32( nHyperId ) // hyperlink id .WriteUChar( 4 ) // hyperlink action @@ -1174,27 +1174,27 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u .WriteUChar( 0 ) // flags .WriteUChar( 8 ) // hyperlink type ? .WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ) - .WriteUInt32( ( EPP_TxInteractiveInfoAtom << 16 ) ).WriteUInt32( 8 ) - .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ) - .WriteUInt32( ( pFieldEntry->nFieldEndPos ) ); + .WriteUInt32( EPP_TxInteractiveInfoAtom << 16 ).WriteUInt32( 8 ) + .WriteUInt32( pFieldEntry->nFieldStartPos ) + .WriteUInt32( pFieldEntry->nFieldEndPos ); } break; case 5 : { - rOut.WriteUInt32( ( EPP_GenericDateMCAtom << 16 ) ).WriteUInt32( 4 ) - .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ); + rOut.WriteUInt32( EPP_GenericDateMCAtom << 16 ).WriteUInt32( 4 ) + .WriteUInt32( pFieldEntry->nFieldStartPos ); } break; case 6 : { - rOut.WriteUInt32( ( EPP_HeaderMCAtom << 16 ) ).WriteUInt32( 4 ) - .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ); + rOut.WriteUInt32( EPP_HeaderMCAtom << 16 ).WriteUInt32( 4 ) + .WriteUInt32( pFieldEntry->nFieldStartPos ); } break; case 7 : { - rOut.WriteUInt32( ( EPP_FooterMCAtom << 16 ) ).WriteUInt32( 4 ) - .WriteUInt32( ( pFieldEntry->nFieldStartPos ) ); + rOut.WriteUInt32( EPP_FooterMCAtom << 16 ).WriteUInt32( 4 ) + .WriteUInt32( pFieldEntry->nFieldStartPos ); } break; default: @@ -1274,7 +1274,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u pRuleOut = pTextRule->pOut = new SvMemoryStream( 0x100, 0x100 ); sal_uInt32 nRulePos = pRuleOut->Tell(); - pRuleOut->WriteUInt32( ( EPP_TextRulerAtom << 16 ) ).WriteUInt32( 0 ); + pRuleOut->WriteUInt32( EPP_TextRulerAtom << 16 ).WriteUInt32( 0 ); pRuleOut->WriteUInt32( nTextRulerAtomFlags ); if ( nTextRulerAtomFlags & 4 ) { @@ -1312,7 +1312,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u } sal_uInt32 nBufSize = pRuleOut->Tell() - nRulePos; pRuleOut->SeekRel( - ( (sal_Int32)nBufSize - 4 ) ); - pRuleOut->WriteUInt32( ( nBufSize - 8 ) ); + pRuleOut->WriteUInt32( nBufSize - 8 ); pRuleOut->SeekRel( nBufSize - 8 ); } } @@ -1322,7 +1322,7 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u { sal_uInt32 nNumberingType = 0, nPos2 = rExtBuStr.Tell(); - rExtBuStr.WriteUInt32( ( EPP_PST_ExtendedParagraphAtom << 16 ) ).WriteUInt32( 0 ); + rExtBuStr.WriteUInt32( EPP_PST_ExtendedParagraphAtom << 16 ).WriteUInt32( 0 ); for ( sal_uInt32 i = 0; i < aTextObj.ParagraphCount(); ++i ) { @@ -2035,8 +2035,8 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat sal_uInt32 nContainerSize = 24; if ( nAction == 2 ) nContainerSize += ( aFile.getLength() * 2 ) + 8; - rSt.WriteUInt32( ( ( EPP_InteractiveInfo << 16 ) | 0xf ) ).WriteUInt32( nContainerSize ) - .WriteUInt32( ( EPP_InteractiveInfoAtom << 16 ) ).WriteUInt32( 16 ) + rSt.WriteUInt32( ( EPP_InteractiveInfo << 16 ) | 0xf ).WriteUInt32( nContainerSize ) + .WriteUInt32( EPP_InteractiveInfoAtom << 16 ).WriteUInt32( 16 ) .WriteUInt32( nSoundRef ) .WriteUInt32( nHyperLinkID ) .WriteUChar( nAction ) @@ -2048,13 +2048,13 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat if ( nAction == 2 ) // run program Action { sal_Int32 nLen = aFile.getLength(); - rSt.WriteUInt32( ( ( EPP_CString << 16 ) | 0x20 ) ).WriteUInt32( ( nLen * 2 ) ); + rSt.WriteUInt32( ( EPP_CString << 16 ) | 0x20 ).WriteUInt32( nLen * 2 ); for ( sal_Int32 i = 0; i < nLen; i++ ) rSt.WriteUInt16( aFile[i] ); } - rSt.WriteUInt32( ( ( EPP_InteractiveInfo << 16 ) | 0x1f ) ).WriteUInt32( 24 ) // Mouse Over Action - .WriteUInt32( ( EPP_InteractiveInfo << 16 ) ).WriteUInt32( 16 ); + rSt.WriteUInt32( ( EPP_InteractiveInfo << 16 ) | 0x1f ).WriteUInt32( 24 ) // Mouse Over Action + .WriteUInt32( EPP_InteractiveInfo << 16 ).WriteUInt32( 16 ); for ( int i = 0; i < 4; i++, rSt.WriteUInt32( 0 ) ) ; } @@ -2125,7 +2125,7 @@ bool PPTWriter::ImplCreatePresentationPlaceholder( const bool bMasterPage, const if ( aClientTextBox.Tell() ) { - mpStrm->WriteUInt32( ( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) + mpStrm->WriteUInt32( ( ESCHER_ClientTextbox << 16 ) | 0xf ) .WriteUInt32( aClientTextBox.Tell() ); mpStrm->Write( aClientTextBox.GetData(), aClientTextBox.Tell() ); @@ -2474,7 +2474,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a catch( ::com::sun::star::uno::Exception& ) {} - mpExEmbed->WriteUInt32( ( 0xf | ( EPP_ExControl << 16 ) ) ) + mpExEmbed->WriteUInt32( 0xf | ( EPP_ExControl << 16 ) ) .WriteUInt32( 0 ); // Size of this container sal_uInt32 nSize, nOldPos = mpExEmbed->Tell(); @@ -2484,7 +2484,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a nPageId |= 0x80000000; else nPageId += 0x100; - mpExEmbed->WriteUInt32( ( EPP_ExControlAtom << 16 ) ) + mpExEmbed->WriteUInt32( EPP_ExControlAtom << 16 ) .WriteUInt32( 4 ) .WriteUInt32( nPageId ); PPTExOleObjEntry* pEntry = new PPTExOleObjEntry( OCX_CONTROL, mpExEmbed->Tell() ); @@ -2494,7 +2494,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a mnExEmbed++; - mpExEmbed->WriteUInt32( ( 1 | ( EPP_ExOleObjAtom << 16 ) ) ) + mpExEmbed->WriteUInt32( 1 | ( EPP_ExOleObjAtom << 16 ) ) .WriteUInt32( 24 ) .WriteUInt32( nAspect ) .WriteUInt32( 2 ) @@ -2834,9 +2834,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a mpStrm->WriteUInt16( nChar ); } mpPptEscherEx->AddAtom( 6, EPP_BaseTextPropAtom ); - mpStrm->WriteUInt32( ( mnTextSize + 1 ) ).WriteUInt16( 0 ); + mpStrm->WriteUInt32( mnTextSize + 1 ).WriteUInt16( 0 ); mpPptEscherEx->AddAtom( 10, EPP_TextSpecInfoAtom ); - mpStrm->WriteUInt32( ( mnTextSize + 1 ) ).WriteUInt32( 1 ).WriteUInt16( 0 ); + mpStrm->WriteUInt32( mnTextSize + 1 ).WriteUInt32( 1 ).WriteUInt16( 0 ); mpPptEscherEx->CloseContainer(); // ESCHER_ClientTextBox mpPptEscherEx->CloseContainer(); // ESCHER_SpContainer } @@ -2936,7 +2936,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a } mpPptEscherEx->EndAtom( EPP_BaseTextPropAtom ); mpPptEscherEx->AddAtom( 10, EPP_TextSpecInfoAtom ); - mpStrm->WriteUInt32( ( mnTextSize ) ).WriteUInt32( 1 ).WriteUInt16( 0 ); + mpStrm->WriteUInt32( mnTextSize ).WriteUInt32( 1 ).WriteUInt16( 0 ); mpPptEscherEx->CloseContainer(); // ESCHER_ClientTextBox mpPptEscherEx->CloseContainer(); // ESCHER_SpContainer @@ -3009,12 +3009,12 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a } else { - mpExEmbed->WriteUInt32( ( 0xf | ( EPP_ExEmbed << 16 ) ) ) + mpExEmbed->WriteUInt32( 0xf | ( EPP_ExEmbed << 16 ) ) .WriteUInt32( 0 ); // Size of this container sal_uInt32 nSize, nOldPos = mpExEmbed->Tell(); - mpExEmbed->WriteUInt32( ( EPP_ExEmbedAtom << 16 ) ) + mpExEmbed->WriteUInt32( EPP_ExEmbedAtom << 16 ) .WriteUInt32( 8 ) .WriteUInt32( 0 ) // follow colorscheme : 0->do not follow // 1->follow collorscheme @@ -3041,7 +3041,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a catch( ::com::sun::star::uno::Exception& ) {} - mpExEmbed->WriteUInt32( ( 1 | ( EPP_ExOleObjAtom << 16 ) ) ) + mpExEmbed->WriteUInt32( 1 | ( EPP_ExOleObjAtom << 16 ) ) .WriteUInt32( 24 ) .WriteUInt32( nAspect ) // Aspect .WriteUInt32( 0 ) @@ -3158,7 +3158,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a .WriteUInt16( 0x435 ); sal_uInt16 i, nStringLen = (sal_uInt16)aMediaURL.getLength(); - mpExEmbed->WriteUInt32( ( EPP_CString << 16 ) ).WriteUInt32( ( nStringLen * 2 ) ); + mpExEmbed->WriteUInt32( EPP_CString << 16 ).WriteUInt32( nStringLen * 2 ); for ( i = 0; i < nStringLen; i++ ) { sal_Unicode nChar = aMediaURL[ i ]; @@ -3179,7 +3179,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a .WriteUInt32( 4 ) .WriteUInt32( nRefId ); // write EPP_InteractiveInfo container for no_action - pClientData->WriteUInt32( ( ( EPP_InteractiveInfo << 16 ) | 0xf ) ).WriteUInt32( 24 ); + pClientData->WriteUInt32( ( EPP_InteractiveInfo << 16 ) | 0xf ).WriteUInt32( 24 ); pClientData->WriteUInt16( 0 ) .WriteUInt16( EPP_InteractiveInfoAtom ) .WriteUInt32( 16 ) @@ -3251,7 +3251,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( !pClientData ) pClientData = new SvMemoryStream( 0x200, 0x200 ); - pClientData->WriteUInt32( ( EPP_OEPlaceholderAtom << 16 ) ).WriteUInt32( 8 ) + pClientData->WriteUInt32( EPP_OEPlaceholderAtom << 16 ).WriteUInt32( 8 ) .WriteInt32( nPlacementID ) // PlacementID .WriteUChar( nPlaceHolderAtom ) // PlaceHolderID .WriteUChar( 0 ) // Size of PlaceHolder ( 0 = FULL, 1 = HALF, 2 = QUARTER ) @@ -3262,7 +3262,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( !pClientData ) pClientData = new SvMemoryStream( 0x200, 0x200 ); - pClientData->WriteUInt32( ( EPP_ExObjRefAtom << 16 ) ).WriteUInt32( 4 ) + pClientData->WriteUInt32( EPP_ExObjRefAtom << 16 ).WriteUInt32( 4 ) .WriteUInt32( nOlePictureId ); nOlePictureId = 0; } @@ -3370,7 +3370,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( !pClientTextBox ) pClientTextBox = new SvMemoryStream( 12 ); - pClientTextBox->WriteUInt32( ( EPP_TextHeaderAtom << 16 ) ).WriteUInt32( 4 ) + pClientTextBox->WriteUInt32( EPP_TextHeaderAtom << 16 ).WriteUInt32( 4 ) .WriteUInt32( 7 ); } } @@ -3389,7 +3389,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( pClientData ) { - mpStrm->WriteUInt32( ( ( ESCHER_ClientData << 16 ) | 0xf ) ) + mpStrm->WriteUInt32( ( ESCHER_ClientData << 16 ) | 0xf ) .WriteUInt32( pClientData->Tell() ); mpStrm->Write( pClientData->GetData(), pClientData->Tell() ); @@ -3397,7 +3397,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a } if ( pClientTextBox ) { - mpStrm->WriteUInt32( ( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) + mpStrm->WriteUInt32( ( ESCHER_ClientTextbox << 16 ) | 0xf ) .WriteUInt32( pClientTextBox->Tell() ); mpStrm->Write( pClientTextBox->GetData(), pClientTextBox->Tell() ); @@ -3462,7 +3462,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a else mpPptEscherEx->AddClientAnchor( maRect ); - mpStrm->WriteUInt32( ( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) + mpStrm->WriteUInt32( ( ESCHER_ClientTextbox << 16 ) | 0xf ) .WriteUInt32( pClientTextBox->Tell() ); mpStrm->Write( pClientTextBox->GetData(), pClientTextBox->Tell() ); @@ -3564,8 +3564,8 @@ void PPTWriter::WriteCString( SvStream& rSt, const OUString& rString, sal_uInt32 sal_Int32 nLen = rString.getLength(); if ( nLen ) { - rSt.WriteUInt32( ( ( nInstance << 4 ) | ( EPP_CString << 16 ) ) ) - .WriteUInt32( ( nLen << 1 ) ); + rSt.WriteUInt32( ( nInstance << 4 ) | ( EPP_CString << 16 ) ) + .WriteUInt32( nLen << 1 ); for ( sal_Int32 i = 0; i < nLen; i++ ) rSt.WriteUInt16( rString[i] ); } @@ -3695,7 +3695,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc { SvMemoryStream* pClientData = new SvMemoryStream( 0x200, 0x200 ); ImplProgTagContainer( pClientData, &aExtBu ); - mpStrm->WriteUInt32( ( ( ESCHER_ClientData << 16 ) | 0xf ) ) + mpStrm->WriteUInt32( ( ESCHER_ClientData << 16 ) | 0xf ) .WriteUInt32( pClientData->Tell() ); mpStrm->Write( pClientData->GetData(), pClientData->Tell() ); @@ -3709,7 +3709,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc .WriteInt32( nRight ) .WriteInt32( nBottom ); - mpStrm->WriteUInt32( ( ( ESCHER_ClientTextbox << 16 ) | 0xf ) ) + mpStrm->WriteUInt32( ( ESCHER_ClientTextbox << 16 ) | 0xf ) .WriteUInt32( aClientTextBox.Tell() ); mpStrm->Write( aClientTextBox.GetData(), aClientTextBox.Tell() ); @@ -3844,12 +3844,12 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc void TextObjBinary::Write( SvStream* pStrm ) { sal_uInt32 nSize, nPos = pStrm->Tell(); - pStrm->WriteUInt32( ( EPP_TextCharsAtom << 16 ) ).WriteUInt32( 0 ); + pStrm->WriteUInt32( EPP_TextCharsAtom << 16 ).WriteUInt32( 0 ); for ( sal_uInt32 i = 0; i < ParagraphCount(); ++i ) GetParagraph(i)->Write( pStrm ); nSize = pStrm->Tell() - nPos; pStrm->SeekRel( - ( (sal_Int32)nSize - 4 ) ); - pStrm->WriteUInt32( ( nSize - 8 ) ); + pStrm->WriteUInt32( nSize - 8 ); pStrm->SeekRel( nSize - 8 ); } diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx index b2c36388eb94..346fa881e4b9 100644 --- a/sd/source/filter/eppt/escherex.cxx +++ b/sd/source/filter/eppt/escherex.cxx @@ -34,8 +34,8 @@ sal_uInt32 PptEscherEx::DrawingGroupContainerSize() void PptEscherEx::WriteDrawingGroupContainer( SvStream& rSt ) { sal_uInt32 nSize = DrawingGroupContainerSize(); - rSt.WriteUInt32( ( 0xf | ( 1035 << 16 ) ) ) // EPP_PPDrawingGroup - .WriteUInt32( ( nSize - 8 ) ); + rSt.WriteUInt32( 0xf | ( 1035 << 16 ) ) // EPP_PPDrawingGroup + .WriteUInt32( nSize - 8 ); ImplWriteDggContainer( rSt ); } @@ -57,8 +57,8 @@ void PptEscherEx::ImplWriteDggContainer( SvStream& rSt ) sal_uInt32 nSize = ImplDggContainerSize(); if ( nSize ) { - rSt.WriteUInt32( ( 0xf | ( ESCHER_DggContainer << 16 ) ) ) - .WriteUInt32( ( nSize - 8 ) ); + rSt.WriteUInt32( 0xf | ( ESCHER_DggContainer << 16 ) ) + .WriteUInt32( nSize - 8 ); mxGlobal->SetDggContainer(); mxGlobal->WriteDggAtom( rSt ); @@ -83,8 +83,8 @@ void PptEscherEx::ImplWriteOptAtom( SvStream& rSt ) sal_uInt32 nSize = ImplOptAtomSize(); if ( nSize ) { - rSt.WriteUInt32( ( ( ESCHER_OPT << 16 ) | ( ESCHER_OPT_COUNT << 4 ) | 0x3 ) ) - .WriteUInt32( ( nSize - 8 ) ) + rSt.WriteUInt32( ( ESCHER_OPT << 16 ) | ( ESCHER_OPT_COUNT << 4 ) | 0x3 ) + .WriteUInt32( nSize - 8 ) .WriteUInt16( ESCHER_Prop_fillColor ) .WriteUInt32( 0xffb800 ) .WriteUInt16( ESCHER_Prop_fillBackColor ) .WriteUInt32( 0 ) .WriteUInt16( ESCHER_Prop_fNoFillHitTest ) .WriteUInt32( 0x00100010 ) @@ -109,8 +109,8 @@ void PptEscherEx::ImplWriteSplitMenuColorsAtom( SvStream& rSt ) sal_uInt32 nSize = ImplSplitMenuColorsAtomSize(); if ( nSize ) { - rSt.WriteUInt32( ( ( ESCHER_SplitMenuColors << 16 ) | ( ESCHER_SPLIT_MENU_COLORS_COUNT << 4 ) ) ) - .WriteUInt32( ( nSize - 8 ) ) + rSt.WriteUInt32( ( ESCHER_SplitMenuColors << 16 ) | ( ESCHER_SPLIT_MENU_COLORS_COUNT << 4 ) ) + .WriteUInt32( nSize - 8 ) .WriteUInt32( 0x08000004 ) .WriteUInt32( 0x08000001 ) .WriteUInt32( 0x08000002 ) @@ -125,7 +125,7 @@ PptEscherEx::~PptEscherEx() void PptEscherEx::OpenContainer( sal_uInt16 n_EscherContainer, int nRecInstance ) { - mpOutStrm->WriteUInt16( ( ( nRecInstance << 4 ) | 0xf ) ).WriteUInt16( n_EscherContainer ).WriteUInt32( 0 ); + mpOutStrm->WriteUInt16( ( nRecInstance << 4 ) | 0xf ).WriteUInt16( n_EscherContainer ).WriteUInt32( 0 ); mOffsets.push_back( mpOutStrm->Tell() - 4 ); mRecTypes.push_back( n_EscherContainer ); @@ -253,7 +253,7 @@ sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClie sal_uInt32 nSize = pClientData->Tell(); if ( nSize ) { - mpOutStrm->WriteUInt32( ( ( ESCHER_ClientData << 16 ) | 0xf ) ) + mpOutStrm->WriteUInt32( ( ESCHER_ClientData << 16 ) | 0xf ) .WriteUInt32( nSize ); mpOutStrm->Write( pClientData->GetData(), nSize ); } diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx index 4b732d747bfd..0e8958589891 100644 --- a/sd/source/filter/eppt/pptexsoundcollection.cxx +++ b/sd/source/filter/eppt/pptexsoundcollection.cxx @@ -97,14 +97,14 @@ void ExSoundEntry::Write( SvStream& rSt, sal_uInt32 nId ) const comphelper::getProcessComponentContext() ); // create SoundContainer - rSt.WriteUInt32( ( ( EPP_Sound << 16 ) | 0xf ) ).WriteUInt32( ( GetSize( nId ) - 8 ) ); + rSt.WriteUInt32( ( EPP_Sound << 16 ) | 0xf ).WriteUInt32( GetSize( nId ) - 8 ); OUString aSoundName( ImplGetName() ); sal_Int32 i, nSoundNameLen = aSoundName.getLength(); if ( nSoundNameLen ) { // name of sound ( instance 0 ) - rSt.WriteUInt32( ( EPP_CString << 16 ) ).WriteUInt32( ( nSoundNameLen * 2 ) ); + rSt.WriteUInt32( EPP_CString << 16 ).WriteUInt32( nSoundNameLen * 2 ); for ( i = 0; i < nSoundNameLen; ++i ) rSt.WriteUInt16( aSoundName[i] ); } @@ -113,18 +113,18 @@ void ExSoundEntry::Write( SvStream& rSt, sal_uInt32 nId ) const if ( nExtensionLen ) { // extension of sound ( instance 1 ) - rSt.WriteUInt32( ( ( EPP_CString << 16 ) | 16 ) ).WriteUInt32( ( nExtensionLen * 2 ) ); + rSt.WriteUInt32( ( EPP_CString << 16 ) | 16 ).WriteUInt32( nExtensionLen * 2 ); for ( i = 0; i < nExtensionLen; ++i ) rSt.WriteUInt16( aExtension[i] ); } // id of sound ( instance 2 ) OUString aId( OUString::number(nId ) ); sal_Int32 nIdLen = aId.getLength(); - rSt.WriteUInt32( ( ( EPP_CString << 16 ) | 32 ) ).WriteUInt32( ( nIdLen * 2 ) ); + rSt.WriteUInt32( ( EPP_CString << 16 ) | 32 ).WriteUInt32( nIdLen * 2 ); for ( i = 0; i < nIdLen; ++i ) rSt.WriteUInt16( aId[i] ); - rSt.WriteUInt32( ( EPP_SoundData << 16 ) ).WriteUInt32( ( nFileSize ) ); + rSt.WriteUInt32( EPP_SoundData << 16 ).WriteUInt32( nFileSize ); sal_uInt32 nBytesLeft = nFileSize; SvStream* pSourceFile = ::utl::UcbStreamHelper::CreateStream( aSoundURL, StreamMode::READ ); if ( pSourceFile ) @@ -198,10 +198,10 @@ void ExSoundCollection::Write( SvStream& rSt ) const sal_uInt32 nSoundCount = maEntries.size(); // create SoundCollection Container - rSt.WriteUInt16( 0xf ).WriteUInt16( EPP_SoundCollection ).WriteUInt32( ( GetSize() - 8 ) ); + rSt.WriteUInt16( 0xf ).WriteUInt16( EPP_SoundCollection ).WriteUInt32( GetSize() - 8 ); // create SoundCollAtom ( reference to the next free SoundId ); - rSt.WriteUInt32( ( EPP_SoundCollAtom << 16 ) ).WriteUInt32( 4 ).WriteUInt32( nSoundCount ); + rSt.WriteUInt32( EPP_SoundCollAtom << 16 ).WriteUInt32( 4 ).WriteUInt32( nSoundCount ); boost::ptr_vector<ExSoundEntry>::const_iterator iter; for ( iter = maEntries.begin(); iter != maEntries.end(); ++iter, ++i) diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx index 8278b61ec3c0..b30f1f6636aa 100644 --- a/sd/source/filter/eppt/pptx-stylesheet.cxx +++ b/sd/source/filter/eppt/pptx-stylesheet.cxx @@ -324,8 +324,8 @@ void PPTExParaSheet::Write( SvStream& rSt, PptEscherEx*, sal_uInt16 nLev, bool, SvStream& rOut = pBuProv->aBuExMasterStream; if ( !nLev ) { - rOut.WriteUInt32( ( ( EPP_PST_ExtendedParagraphMasterAtom << 16 ) | ( mnInstance << 4 ) ) ) - .WriteUInt32( ( 5 * 16 + 2 ) ) + rOut.WriteUInt32( ( EPP_PST_ExtendedParagraphMasterAtom << 16 ) | ( mnInstance << 4 ) ) + .WriteUInt32( 5 * 16 + 2 ) .WriteUInt16( 5 ); // depth } sal_uInt16 nBulletId = rLev.mnBulletId; @@ -483,9 +483,9 @@ void PPTExStyleSheet::WriteTxCFStyleAtom( SvStream& rSt ) sal_uInt32 nCharFlags = rCharStyle.mnFlags; nCharFlags &= CharAttr_Italic | CharAttr_Bold | CharAttr_Underline | CharAttr_Shadow; - rSt.WriteUInt32( ( EPP_TxCFStyleAtom << 16 ) ) // recordheader + rSt.WriteUInt32( EPP_TxCFStyleAtom << 16 ) // recordheader .WriteUInt32( SizeOfTxCFStyleAtom() - 8 ) - .WriteUInt16( ( 0x80 | nCharFlags ) ) + .WriteUInt16( 0x80 | nCharFlags ) .WriteUInt16( nFlags ) .WriteUInt16( nCharFlags ) .WriteInt32( -1 ) // ? diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index 2c6cd6245c87..4b29e10c7075 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -164,7 +164,7 @@ bool StgHeader::Store( StgIo& rIo ) .WriteUInt16( nByteOrder ) // 1C Unicode byte order indicator .WriteInt16( nPageSize ) // 1E 1 << nPageSize = block size .WriteInt16( nDataPageSize ) // 20 1 << this size == data block size - .WriteInt32( 0 ).WriteInt32( 0 ).WriteInt16( 0 ) + .WriteInt32( 0 ).WriteInt32( 0 ).WriteInt16( 0 ) .WriteInt32( nFATSize ) // 2C total number of FAT pages .WriteInt32( nTOCstrm ) // 30 starting page for the TOC stream .WriteInt32( nReserved ) // 34 diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx index 254cfe51277e..f52dff841cd8 100644 --- a/sot/source/sdstor/stgole.cxx +++ b/sot/source/sdstor/stgole.cxx @@ -146,14 +146,14 @@ bool StgCompObjStream::Store() return false; Seek( 0L ); OString aAsciiUserName(OUStringToOString(aUserName, RTL_TEXTENCODING_MS_1252)); - WriteInt16( 1 ); // Version? - WriteInt16( -2 ); // 0xFFFE = Byte Order Indicator + WriteInt16( 1 ); // Version? + WriteInt16( -2 ); // 0xFFFE = Byte Order Indicator WriteInt32( 0x0A03 ); // Windows 3.10 WriteInt32( -1L ); WriteClsId( *this, aClsId ); // Class ID - WriteInt32( (aAsciiUserName.getLength() + 1) ); + WriteInt32( aAsciiUserName.getLength() + 1 ); WriteCharPtr( (const char *)aAsciiUserName.getStr() ); - WriteUChar( 0 ); // string terminator + WriteUChar( 0 ); // string terminator WriteClipboardFormat( *this, nCbFormat ); WriteInt32( 0 ); // terminator Commit(); diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx index 01a02003601e..a12b353e94ae 100644 --- a/sot/source/sdstor/storinfo.cxx +++ b/sot/source/sdstor/storinfo.cxx @@ -72,7 +72,7 @@ void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat ) { OString aAsciiCbFmt(OUStringToOString(aCbFmt, RTL_TEXTENCODING_ASCII_US)); - rStm.WriteInt32( (aAsciiCbFmt.getLength() + 1) ); + rStm.WriteInt32( aAsciiCbFmt.getLength() + 1 ); rStm.WriteCharPtr( (const char *)aAsciiCbFmt.getStr() ); rStm.WriteUChar( 0 ); } diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 6e9243e40b3d..52aec869aff5 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -3164,7 +3164,7 @@ OUString UCBStorage::CreateLinkFile( const OUString& rName ) SvStream* pStream = pTempFile->GetStream( STREAM_STD_READWRITE | StreamMode::TRUNC ); // write header - pStream->WriteUInt32( 0x04034b50 ); + pStream->WriteUInt32( 0x04034b50 ); // assemble a new folder name in the destination folder INetURLObject aObj( rName ); diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx index 41453f6cb75c..e6ef65309536 100644 --- a/svl/source/filerec/filerec.cxx +++ b/svl/source/filerec/filerec.cxx @@ -43,15 +43,15 @@ static void lclWriteMiniHeader(SvStream *p, sal_uInt32 nPreTag, sal_uInt32 nStartPos, sal_uInt32 nEndPos) { - (*p).WriteUInt32( sal_uInt32(nPreTag) | - sal_uInt32(nEndPos-nStartPos-SFX_REC_HEADERSIZE_MINI) << 8 ); + (*p).WriteUInt32( sal_uInt32(nPreTag) | + sal_uInt32(nEndPos-nStartPos-SFX_REC_HEADERSIZE_MINI) << 8 ); } static void lclWriteHeader(SvStream *p, sal_uInt32 nRecType, sal_uInt32 nContentTag, sal_uInt32 nContentVer) { - (*p).WriteUInt32( sal_uInt32(nRecType) | - ( sal_uInt32(nContentVer) << 8 ) | - ( sal_uInt32(nContentTag) << 16 ) ); + (*p).WriteUInt32( sal_uInt32(nRecType) | + ( sal_uInt32(nContentVer) << 8 ) | + ( sal_uInt32(nContentTag) << 16 ) ); } #define SFX_REC_CONTENT_HEADER(nContentVer,n1StStartPos,nCurStartPos) \ diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index 765673501d38..046503691784 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -132,7 +132,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const pImp->bStreaming = true; if ( !pStoreMaster ) { - rStream.WriteUInt16( rStream.GetVersion() >= SOFFICE_FILEFORMAT_50 + rStream.WriteUInt16( rStream.GetVersion() >= SOFFICE_FILEFORMAT_50 ? SFX_ITEMPOOL_TAG_STARTPOOL_5 : SFX_ITEMPOOL_TAG_STARTPOOL_4 ); rStream.WriteUInt8( SFX_ITEMPOOL_VER_MAJOR ).WriteUInt8( SFX_ITEMPOOL_VER_MINOR ); @@ -853,7 +853,7 @@ bool SfxItemPool::StoreSurrogate ( SvStream& rStream, const SfxPoolItem* pItem) if ( pItem ) { bool bRealSurrogate = IsItemFlag(*pItem, SFX_ITEM_POOLABLE); - rStream.WriteUInt32( bRealSurrogate + rStream.WriteUInt32( bRealSurrogate ? GetSurrogate( pItem ) : SFX_ITEMS_DIRECT ); return bRealSurrogate; @@ -1162,7 +1162,7 @@ bool SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem, rItem.Store(rStream, nItemVersion); sal_uLong nIEnd = rStream.Tell(); rStream.Seek( nIStart-4 ); - rStream.WriteInt32( ( nIEnd-nIStart ) ); + rStream.WriteInt32( nIEnd-nIStart ); rStream.Seek( nIEnd ); } diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index d3174ee7d276..61db904d9a19 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -83,7 +83,7 @@ void IMapObject::Write( SvStream& rOStm, const OUString& rBaseURL ) const rOStm.WriteUInt16( GetType() ); rOStm.WriteUInt16( GetVersion() ); - rOStm.WriteUInt16( eEncoding ); + rOStm.WriteUInt16( eEncoding ); const OString aRelURL = OUStringToOString( URIHelper::simpleNormalizedMakeRelative(rBaseURL, aURL), eEncoding); diff --git a/svtools/source/misc/imap3.cxx b/svtools/source/misc/imap3.cxx index b0a198a7fa53..31246d3caf28 100644 --- a/svtools/source/misc/imap3.cxx +++ b/svtools/source/misc/imap3.cxx @@ -70,7 +70,7 @@ IMapCompat::~IMapCompat() const sal_uLong nEndPos = pRWStm->Tell(); pRWStm->Seek( nCompatPos ); - pRWStm->WriteUInt32( ( nEndPos - nTotalSize ) ); + pRWStm->WriteUInt32( nEndPos - nTotalSize ); pRWStm->Seek( nEndPos ); } else diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index d963953b6ca0..9e1e6f6bc7e8 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -98,7 +98,7 @@ SvStream& WriteTransferableObjectDescriptor( SvStream& rOStm, const Transferable const sal_uInt32 nLastPos = rOStm.Tell(); rOStm.Seek( nFirstPos ); - rOStm.WriteUInt32( nLastPos - nFirstPos ); + rOStm.WriteUInt32( nLastPos - nFirstPos ); rOStm.Seek( nLastPos ); return rOStm; diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 899802fc6be0..281477a358eb 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -962,18 +962,17 @@ bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions ) bool SwTableAutoFmt::Save( SvStream& rStream, sal_uInt16 fileVersion ) const { sal_uInt16 nVal = AUTOFORMAT_DATA_ID; - bool b; rStream.WriteUInt16( nVal ); // --- from 680/dr25 on: store strings as UTF-8 write_uInt16_lenPrefixed_uInt8s_FromOUString(rStream, m_aName, RTL_TEXTENCODING_UTF8 ); rStream.WriteUInt16( nStrResId ); - rStream.WriteUChar( ( b = bInclFont ) ); - rStream.WriteUChar( ( b = bInclJustify ) ); - rStream.WriteUChar( ( b = bInclFrame ) ); - rStream.WriteUChar( ( b = bInclBackground ) ); - rStream.WriteUChar( ( b = bInclValueFormat ) ); - rStream.WriteUChar( ( b = bInclWidthHeight ) ); + rStream.WriteUChar( bInclFont ); + rStream.WriteUChar( bInclJustify ); + rStream.WriteUChar( bInclFrame ); + rStream.WriteUChar( bInclBackground ); + rStream.WriteUChar( bInclValueFormat ); + rStream.WriteUChar( bInclWidthHeight ); { WriterSpecificAutoFormatBlock block(rStream); diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index b01ba5e64b61..1750d7f7e1c4 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -1091,7 +1091,7 @@ inline void SvStatistics::PrintOn( SvStream &rOS ) const //$ ostream if( nDrawStretchText ) rOS.WriteCharPtr( "\tnDrawStretchText: " ).WriteUInt16( nDrawStretchText ).WriteChar( '\n' ); if( nChangeFont ) - rOS.WriteCharPtr( "\tnChangeFont: " ).WriteUInt16( nChangeFont ).WriteChar( '\n' ); + rOS.WriteCharPtr( "\tnChangeFont: " ).WriteUInt16( nChangeFont ).WriteChar( '\n' ); if( nGetFontMetric ) rOS.WriteCharPtr( "\tnGetFontMetric: " ).WriteUInt16( nGetFontMetric ).WriteChar( '\n' ); rOS.WriteCharPtr( "}\n" ); diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 232ebcc8f01b..d5f0ae026ef1 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2209,9 +2209,9 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt) OpenContainer( ESCHER_DggContainer ); sal_uInt16 nColorCount = 4; - pStrm ->WriteUInt16( ( nColorCount << 4 ) ) // instance + pStrm ->WriteUInt16( nColorCount << 4 ) // instance .WriteUInt16( ESCHER_SplitMenuColors ) // record type - .WriteUInt32( ( nColorCount * 4 ) ) // size + .WriteUInt32( nColorCount * 4 ) // size .WriteUInt32( 0x08000004 ) .WriteUInt32( 0x08000001 ) .WriteUInt32( 0x08000002 ) diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx index c6d76f1de77a..0698c18b98e6 100644 --- a/tools/source/ref/pstm.cxx +++ b/tools/source/ref/pstm.cxx @@ -235,19 +235,19 @@ void SvPersistStream::WriteCompressed( SvStream & rStm, sal_uInt32 nVal ) { #ifdef STOR_NO_OPTIMIZE if( nVal < 0x80 ) - rStm.WriteUChar( (LEN_1 | nVal) ); + rStm.WriteUChar( LEN_1 | nVal ); else if( nVal < 0x4000 ) { - rStm.WriteUChar( (LEN_2 | (nVal >> 8)) ); + rStm.WriteUChar( LEN_2 | (nVal >> 8) ); rStm.WriteUChar( nVal ); } else if( nVal < 0x20000000 ) { // highest sal_uInt8 - rStm.WriteUChar( (LEN_4 | (nVal >> 24)) ); + rStm.WriteUChar( LEN_4 | (nVal >> 24) ); // 2nd highest sal_uInt8 - rStm.WriteUChar( (nVal >> 16) ); - rStm.WriteUInt16( (nVal) ); + rStm.WriteUChar( nVal >> 16 ); + rStm.WriteUInt16( nVal ); } else #endif @@ -368,12 +368,12 @@ static void WriteId { if( (nHdr & P_OBJ) || nId != 0 ) { // Id set only for pointers or DBGUTIL - rStm.WriteUChar( (nHdr) ); + rStm.WriteUChar( nHdr ); SvPersistStream::WriteCompressed( rStm, nId ); } else { // NULL Pointer - rStm.WriteUChar( (nHdr | P_ID_0) ); + rStm.WriteUChar( nHdr | P_ID_0 ); return; } } diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index d0c3588b645b..df9492271720 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -168,7 +168,7 @@ void EMFWriter::ImplEndCommentRecord() { sal_Int32 nActPos = m_rStm.Tell(); m_rStm.Seek( mnRecordPos + 8 ); - m_rStm.WriteUInt32( ( nActPos - mnRecordPos - 0xc ) ); + m_rStm.WriteUInt32( nActPos - mnRecordPos - 0xc ); m_rStm.Seek( nActPos ); } ImplEndRecord(); @@ -197,8 +197,8 @@ void EMFWriter::ImplEndPlusRecord() sal_Int32 nActPos = m_rStm.Tell(); sal_Int32 nSize = nActPos - mnRecordPlusPos; m_rStm.Seek( mnRecordPlusPos + 4 ); - m_rStm.WriteUInt32( ( nSize ) ) // Size - .WriteUInt32( ( nSize - 0xc ) ); // Data Size + m_rStm.WriteUInt32( nSize ) // Size + .WriteUInt32( nSize - 0xc ); // Data Size m_rStm.Seek( nActPos ); mbRecordPlusOpen = false; } @@ -224,8 +224,8 @@ void EMFWriter::WriteEMFPlusHeader( const Size &rMtfSizePix, const Size &rMtfSiz if (nDivY) nDPIY /= nDivY; // DPI Y - m_rStm.WriteInt16( EmfPlusHeader ); - m_rStm.WriteInt16( 0x01 ) // Flags - Dual Mode // TODO: Check this + m_rStm.WriteInt16( EmfPlusHeader ); + m_rStm.WriteInt16( 0x01 ) // Flags - Dual Mode // TODO: Check this .WriteInt32( 0x1C ) // Size .WriteInt32( 0x10 ) // Data Size .WriteInt32( 0xdbc01002 ) // (lower 12bits) 1-> v1 2-> v1.1 // TODO: Check this @@ -355,14 +355,14 @@ bool EMFWriter::WriteEMF(const GDIMetaFile& rMtf) const sal_uLong nEndPos = m_rStm.Tell(); m_rStm.Seek( nHeaderPos ); m_rStm.WriteUInt32( 0x00000001 ).WriteUInt32( 108 ) //use [MS-EMF 2.2.11] HeaderExtension2 Object - .WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( ( aMtfSizePix.Width() - 1 ) ).WriteInt32( ( aMtfSizePix.Height() - 1 ) ) - .WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( ( aMtfSizeLog.Width() - 1 ) ).WriteInt32( ( aMtfSizeLog.Height() - 1 ) ) - .WriteUInt32( 0x464d4520 ).WriteUInt32( 0x10000 ).WriteUInt32( ( nEndPos - nHeaderPos ) ) - .WriteUInt32( mnRecordCount ).WriteUInt16( ( mnHandleCount + 1 ) ).WriteUInt16( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ) + .WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( aMtfSizePix.Width() - 1 ).WriteInt32( aMtfSizePix.Height() - 1 ) + .WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( aMtfSizeLog.Width() - 1 ).WriteInt32( aMtfSizeLog.Height() - 1 ) + .WriteUInt32( 0x464d4520 ).WriteUInt32( 0x10000 ).WriteUInt32( nEndPos - nHeaderPos ) + .WriteUInt32( mnRecordCount ).WriteUInt16( mnHandleCount + 1 ).WriteUInt16( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ) .WriteInt32( aMtfSizePix.Width() ).WriteInt32( aMtfSizePix.Height() ) - .WriteInt32( ( aMtfSizeLog.Width() / 100 ) ).WriteInt32( ( aMtfSizeLog.Height() / 100 ) ) + .WriteInt32( aMtfSizeLog.Width() / 100 ).WriteInt32( aMtfSizeLog.Height() / 100 ) .WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ) - .WriteInt32( ( aMtfSizeLog.Width() * 10 ) ).WriteInt32( ( aMtfSizeLog.Height() * 10 ) ); //use [MS-EMF 2.2.11] HeaderExtension2 Object + .WriteInt32( aMtfSizeLog.Width() * 10 ).WriteInt32( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object m_rStm.Seek( nEndPos ); delete[] mpHandlesUsed; @@ -421,7 +421,7 @@ void EMFWriter::ImplEndRecord() nFillBytes += 3; // each record has to be dword aligned nFillBytes ^= 3; nFillBytes &= 3; - m_rStm.WriteUInt32( ( ( nActPos - mnRecordPos ) + nFillBytes ) ); + m_rStm.WriteUInt32( ( nActPos - mnRecordPos ) + nFillBytes ); m_rStm.Seek( nActPos ); while( nFillBytes-- ) m_rStm.WriteUChar( 0 ); @@ -531,10 +531,10 @@ void EMFWriter::ImplCheckTextAttr() } m_rStm.WriteInt32( nWeight ); - m_rStm.WriteUChar( ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 ) ); - m_rStm.WriteUChar( ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 ) ); - m_rStm.WriteUChar( ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 ) ); - m_rStm.WriteUChar( ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 ) ); + m_rStm.WriteUChar( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 ); + m_rStm.WriteUChar( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 ); + m_rStm.WriteUChar( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 ); + m_rStm.WriteUChar( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 ); m_rStm.WriteUChar( 0 ).WriteUChar( 0 ).WriteUChar( 0 ); switch( rFont.GetPitch() ) @@ -557,15 +557,15 @@ void EMFWriter::ImplCheckTextAttr() m_rStm.WriteUChar( nPitchAndFamily ); for( i = 0; i < 32; i++ ) - m_rStm.WriteUInt16( ( ( 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( 0 ); + m_rStm.WriteUInt16( 0 ); // dummy elfStyle for( i = 0; i < 32; i++ ) - m_rStm.WriteUInt16( 0 ); + m_rStm.WriteUInt16( 0 ); // dummy elfVersion, elfStyleSize, elfMatch, elfReserved m_rStm.WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ).WriteUInt32( 0 ) ; @@ -796,7 +796,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed for ( o = 1; o <= nPoints; o++ ) aNewPoly[ o ] = rPoly[ n - 1 + o ]; ImplWriteRect( aNewPoly.GetBoundRect() ); - m_rStm.WriteUInt32( ( nPoints ) ); + m_rStm.WriteUInt32( nPoints ); for( o = 1; o < aNewPoly.GetSize(); o++ ) ImplWritePoint( aNewPoly[ o ] ); ImplEndRecord(); @@ -863,8 +863,8 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const sal_uLong nEndPos = m_rStm.Tell(); m_rStm.Seek( nOffPos ); - m_rStm.WriteUInt32( 80 ).WriteUInt32( ( nHeaderSize + ( nPalCount << 2 ) ) ); - m_rStm.WriteUInt32( ( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) ).WriteUInt32( nImageSize ); + m_rStm.WriteUInt32( 80 ).WriteUInt32( nHeaderSize + ( nPalCount << 2 ) ); + m_rStm.WriteUInt32( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ).WriteUInt32( nImageSize ); m_rStm.Seek( nEndPos ); ImplEndRecord(); @@ -916,7 +916,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const OUString& rText, c ImplWritePoint( rPos ); m_rStm.WriteUInt32( nLen ).WriteUInt32( 76 ).WriteUInt32( 2 ); m_rStm.WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( 0 ).WriteInt32( 0 ); - m_rStm.WriteUInt32( ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) ) ); + m_rStm.WriteUInt32( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) ); // write text for( i = 0; i < nLen; i++ ) diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index de1c96e934bd..6e4c6cbd4f35 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -247,7 +247,7 @@ void WMFWriter::WriteRectangle(const Rectangle & rRect) void WMFWriter::WriteColor(const Color & rColor) { - pWMF->WriteUChar( rColor.GetRed() ).WriteUChar( rColor.GetGreen() ).WriteUChar( rColor.GetBlue() ).WriteUChar( 0 ); + pWMF->WriteUChar( rColor.GetRed() ).WriteUChar( rColor.GetGreen() ).WriteUChar( rColor.GetBlue() ).WriteUChar( 0 ); } void WMFWriter::WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType) @@ -426,7 +426,7 @@ void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_In WriteRecordHeader( 3 + 9 + ( ( nLen + 1 ) >> 1 ), W_META_ESCAPE ); pWMF->WriteUInt16( W_MFCOMMENT ) - .WriteUInt16( ( nLen + 14 ) ) // we will always have a fourteen byte escape header: + .WriteUInt16( nLen + 14 ) // we will always have a fourteen byte escape header: .WriteUInt16( 0x4f4f ) // OO .WriteUInt32( 0xa2c2a ) // evil magic number .WriteUInt32( nCheckSum ) // crc32 checksum about nEsc & pData @@ -1903,7 +1903,7 @@ 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( W_MFCOMMENT ) // same as META_ESCAPE_ENHANCED_METAFILE - .WriteUInt16( ( nCurSize + 34 ) ) // we will always have a 34 byte escape header: + .WriteUInt16( nCurSize + 34 ) // we will always have a 34 byte escape header: .WriteUInt32( 0x43464D57 ) // WMFC .WriteUInt32( 0x00000001 ) // Comment type .WriteUInt32( 0x00010000 ) // version diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx index 9666e0f49101..7b8fbbe0ae81 100644 --- a/vcl/source/gdi/animate.cxx +++ b/vcl/source/gdi/animate.cxx @@ -720,7 +720,7 @@ SvStream& WriteAnimation( SvStream& rOStm, const Animation& rAnimation ) WritePair( rOStm, rAnimBmp.aPosPix ); WritePair( rOStm, rAnimBmp.aSizePix ); WritePair( rOStm, rAnimation.maGlobalSize ); - rOStm.WriteUInt16( ( ( ANIMATION_TIMEOUT_ON_CLICK == rAnimBmp.nWait ) ? 65535 : rAnimBmp.nWait ) ); + rOStm.WriteUInt16( ( ANIMATION_TIMEOUT_ON_CLICK == rAnimBmp.nWait ) ? 65535 : rAnimBmp.nWait ); rOStm.WriteUInt16( rAnimBmp.eDisposal ); rOStm.WriteUChar( rAnimBmp.bUserInput ); rOStm.WriteUInt32( rAnimation.mnLoopCount ); diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 4e0bb5a0d5a0..cf290bbf3c16 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -85,8 +85,8 @@ void ImplWritePolyPolyAction( SvStream& rOStm, const tools::PolyPolygon& rPolyPo for( n = 0; n < nPoly; n++ ) nPoints = sal::static_int_cast<sal_uInt16>(nPoints + rPolyPoly[ n ].GetSize()); - rOStm.WriteInt16( GDI_POLYPOLYGON_ACTION ); - rOStm.WriteInt32( ( 8 + ( nPoly << 2 ) + ( nPoints << 3 ) ) ); + rOStm.WriteInt16( GDI_POLYPOLYGON_ACTION ); + rOStm.WriteInt32( 8 + ( nPoly << 2 ) + ( nPoints << 3 ) ); rOStm.WriteInt32( nPoly ); for( n = 0; n < nPoly; n++ ) @@ -145,7 +145,7 @@ void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode ) void ImplWriteMapMode( SvStream& rOStm, const MapMode& rMapMode ) { - rOStm.WriteInt16( rMapMode.GetMapUnit() ); + rOStm.WriteInt16( rMapMode.GetMapUnit() ); WritePair( rOStm, rMapMode.GetOrigin() ); rOStm.WriteInt32( rMapMode.GetScaleX().GetNumerator() ); rOStm.WriteInt32( rMapMode.GetScaleX().GetDenominator() ); @@ -155,13 +155,13 @@ void ImplWriteMapMode( SvStream& rOStm, const MapMode& rMapMode ) void ImplWritePushAction( SvStream& rOStm ) { - rOStm.WriteInt16( GDI_PUSH_ACTION ); + rOStm.WriteInt16( GDI_PUSH_ACTION ); rOStm.WriteInt32( 4 ); } void ImplWritePopAction( SvStream& rOStm ) { - rOStm.WriteInt16( GDI_POP_ACTION ); + rOStm.WriteInt16( GDI_POP_ACTION ); rOStm.WriteInt32( 4 ); } @@ -170,7 +170,7 @@ void ImplWriteLineColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle, if( rColor.GetTransparency() > 127 ) nStyle = 0; - rOStm.WriteInt16( GDI_PEN_ACTION ); + rOStm.WriteInt16( GDI_PEN_ACTION ); rOStm.WriteInt32( 16 ); ImplWriteColor( rOStm, rColor ); rOStm.WriteInt32( nWidth ); @@ -179,7 +179,7 @@ void ImplWriteLineColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle, void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle ) { - rOStm.WriteInt16( GDI_FILLBRUSH_ACTION ); + rOStm.WriteInt16( GDI_FILLBRUSH_ACTION ); rOStm.WriteInt32( 20 ); ImplWriteColor( rOStm, rColor ); @@ -190,13 +190,13 @@ void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle { ImplWriteColor( rOStm, COL_WHITE ); rOStm.WriteInt16( nStyle ); - rOStm.WriteInt16( 1 ); + rOStm.WriteInt16( 1 ); } else { ImplWriteColor( rOStm, COL_BLACK ); rOStm.WriteInt16( nStyle ); - rOStm.WriteInt16( 0 ); + rOStm.WriteInt16( 0 ); } } @@ -235,7 +235,7 @@ void ImplWriteFont( SvStream& rOStm, const vcl::Font& rFont, break; } - rOStm.WriteInt16( GDI_FONT_ACTION ); + rOStm.WriteInt16( GDI_FONT_ACTION ); rOStm.WriteInt32( 78 ); rActualCharSet = GetStoreCharSet( rFont.GetCharSet() ); @@ -243,15 +243,15 @@ void ImplWriteFont( SvStream& rOStm, const vcl::Font& rFont, ImplWriteColor( rOStm, rFont.GetFillColor() ); rOStm.Write( aName, 32 ); WritePair( rOStm, rFont.GetSize() ); - rOStm.WriteInt16( 0 ); // no character orientation anymore - rOStm.WriteInt16( rFont.GetOrientation() ); - rOStm.WriteInt16( rActualCharSet ); - rOStm.WriteInt16( rFont.GetFamily() ); - rOStm.WriteInt16( rFont.GetPitch() ); - rOStm.WriteInt16( rFont.GetAlign() ); - rOStm.WriteInt16( nWeight ); - rOStm.WriteInt16( rFont.GetUnderline() ); - rOStm.WriteInt16( rFont.GetStrikeout() ); + rOStm.WriteInt16( 0 ); // no character orientation anymore + rOStm.WriteInt16( rFont.GetOrientation() ); + rOStm.WriteInt16( rActualCharSet ); + rOStm.WriteInt16( rFont.GetFamily() ); + rOStm.WriteInt16( rFont.GetPitch() ); + rOStm.WriteInt16( rFont.GetAlign() ); + rOStm.WriteInt16( nWeight ); + rOStm.WriteInt16( rFont.GetUnderline() ); + rOStm.WriteInt16( rFont.GetStrikeout() ); rOStm.WriteUChar( rFont.GetItalic() != ITALIC_NONE ); rOStm.WriteUChar( rFont.IsOutline() ); rOStm.WriteUChar( rFont.IsShadow() ); @@ -262,7 +262,7 @@ void ImplWriteFont( SvStream& rOStm, const vcl::Font& rFont, void ImplWriteRasterOpAction( SvStream& rOStm, sal_Int16 nRasterOp ) { - rOStm.WriteInt16( GDI_RASTEROP_ACTION ).WriteInt32( 6 ).WriteInt16( nRasterOp ); + rOStm.WriteInt16( GDI_RASTEROP_ACTION ).WriteInt32( 6 ).WriteInt16( nRasterOp ); } bool ImplWriteUnicodeComment( SvStream& rOStm, const OUString& rString ) @@ -342,7 +342,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const tools::PolyPolygo if((bOnlyWhenCurve && nAllFlagCount) || (!bOnlyWhenCurve && nAllPointCount)) { - rOStm.WriteInt16( GDI_EXTENDEDPOLYGON_ACTION ); + rOStm.WriteInt16( GDI_EXTENDEDPOLYGON_ACTION ); const sal_Int32 nActionSize( 4 + // Action size @@ -1363,8 +1363,8 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf ) // Write MagicCode rOStm.WriteCharPtr( "SVGDI" ); // Identifier - rOStm.WriteInt16( 42 ); // HeaderSize - rOStm.WriteInt16( 200 ); // VERSION + rOStm.WriteInt16( 42 ); // HeaderSize + rOStm.WriteInt16( 200 ); // VERSION rOStm.WriteInt32( aPrefSize.Width() ); rOStm.WriteInt32( aPrefSize.Height() ); ImplWriteMapMode( rOStm, rMtf.GetPrefMapMode() ); @@ -1405,7 +1405,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaPixelAction* pAct = static_cast<const MetaPixelAction*>(pAction); - rOStm.WriteInt16( GDI_PIXEL_ACTION ); + rOStm.WriteInt16( GDI_PIXEL_ACTION ); rOStm.WriteInt32( 18 ); WritePair( rOStm, pAct->GetPoint() ); ImplWriteColor( rOStm, pAct->GetColor() ); @@ -1417,7 +1417,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaPointAction* pAct = static_cast<const MetaPointAction*>(pAction); - rOStm.WriteInt16( GDI_POINT_ACTION ); + rOStm.WriteInt16( GDI_POINT_ACTION ); rOStm.WriteInt32( 12 ); WritePair( rOStm, pAct->GetPoint() ); nCount++; @@ -1440,22 +1440,22 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, if(bLineJoin) { - rOStm.WriteInt16( GDI_LINEJOIN_ACTION ); + rOStm.WriteInt16( GDI_LINEJOIN_ACTION ); rOStm.WriteInt32( 6 ); - rOStm.WriteInt16( rInfo.GetLineJoin() ); + rOStm.WriteInt16( rInfo.GetLineJoin() ); } if(bLineCap) { - rOStm.WriteInt16( GDI_LINECAP_ACTION ); + rOStm.WriteInt16( GDI_LINECAP_ACTION ); rOStm.WriteInt32( 6 ); - rOStm.WriteInt16( rInfo.GetLineCap() ); + rOStm.WriteInt16( rInfo.GetLineCap() ); } } if(bLineDashDot) { - rOStm.WriteInt16( GDI_LINEDASHDOT_ACTION ); + rOStm.WriteInt16( GDI_LINEDASHDOT_ACTION ); rOStm.WriteInt32( 4 + 16 ); rOStm.WriteInt16( rInfo.GetDashCount() ); rOStm.WriteInt32( rInfo.GetDashLen() ); @@ -1464,7 +1464,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, rOStm.WriteInt32( rInfo.GetDistance() ); } - rOStm.WriteInt16( GDI_LINE_ACTION ); + rOStm.WriteInt16( GDI_LINE_ACTION ); rOStm.WriteInt32( 20 ); WritePair( rOStm, pAct->GetStartPoint() ); WritePair( rOStm, pAct->GetEndPoint() ); @@ -1497,7 +1497,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaRectAction* pAct = static_cast<const MetaRectAction*>(pAction); - rOStm.WriteInt16( GDI_RECT_ACTION ); + rOStm.WriteInt16( GDI_RECT_ACTION ); rOStm.WriteInt32( 28 ); ImplWriteRect( rOStm, pAct->GetRect() ); rOStm.WriteInt32( 0 ); @@ -1510,7 +1510,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaRoundRectAction* pAct = static_cast<const MetaRoundRectAction*>(pAction); - rOStm.WriteInt16( GDI_RECT_ACTION ); + rOStm.WriteInt16( GDI_RECT_ACTION ); rOStm.WriteInt32( 28 ); ImplWriteRect( rOStm, pAct->GetRect() ); rOStm.WriteInt32( pAct->GetHorzRound() ); @@ -1523,7 +1523,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaEllipseAction* pAct = static_cast<const MetaEllipseAction*>(pAction); - rOStm.WriteInt16( GDI_ELLIPSE_ACTION ); + rOStm.WriteInt16( GDI_ELLIPSE_ACTION ); rOStm.WriteInt32( 20 ); ImplWriteRect( rOStm, pAct->GetRect() ); nCount++; @@ -1534,7 +1534,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaArcAction* pAct = static_cast<const MetaArcAction*>(pAction); - rOStm.WriteInt16( GDI_ARC_ACTION ); + rOStm.WriteInt16( GDI_ARC_ACTION ); rOStm.WriteInt32( 36 ); ImplWriteRect( rOStm, pAct->GetRect() ); WritePair( rOStm, pAct->GetStartPoint() ); @@ -1547,7 +1547,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaPieAction* pAct = static_cast<const MetaPieAction*>(pAction); - rOStm.WriteInt16( GDI_PIE_ACTION ); + rOStm.WriteInt16( GDI_PIE_ACTION ); rOStm.WriteInt32( 36 ); ImplWriteRect( rOStm, pAct->GetRect() ); WritePair( rOStm, pAct->GetStartPoint() ); @@ -1563,8 +1563,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, pAct->GetEndPoint(), POLY_CHORD ); const sal_uInt16 nPoints = aChordPoly.GetSize(); - rOStm.WriteInt16( GDI_POLYGON_ACTION ); - rOStm.WriteInt32( ( 8 + ( nPoints << 3 ) ) ); + rOStm.WriteInt16( GDI_POLYGON_ACTION ); + rOStm.WriteInt32( 8 + ( nPoints << 3 ) ); rOStm.WriteInt32( nPoints ); for( sal_uInt16 n = 0; n < nPoints; n++ ) @@ -1596,22 +1596,22 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, if(bLineJoin) { - rOStm.WriteInt16( GDI_LINEJOIN_ACTION ); + rOStm.WriteInt16( GDI_LINEJOIN_ACTION ); rOStm.WriteInt32( 6 ); - rOStm.WriteInt16( rInfo.GetLineJoin() ); + rOStm.WriteInt16( rInfo.GetLineJoin() ); } if(bLineCap) { - rOStm.WriteInt16( GDI_LINECAP_ACTION ); + rOStm.WriteInt16( GDI_LINECAP_ACTION ); rOStm.WriteInt32( 6 ); - rOStm.WriteInt16( rInfo.GetLineCap() ); + rOStm.WriteInt16( rInfo.GetLineCap() ); } } if(bLineDashDot) { - rOStm.WriteInt16( GDI_LINEDASHDOT_ACTION ); + rOStm.WriteInt16( GDI_LINEDASHDOT_ACTION ); rOStm.WriteInt32( 4 + 16 ); rOStm.WriteInt16( rInfo.GetDashCount() ); rOStm.WriteInt32( rInfo.GetDashLen() ); @@ -1620,8 +1620,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, rOStm.WriteInt32( rInfo.GetDistance() ); } - rOStm.WriteInt16( GDI_POLYLINE_ACTION ); - rOStm.WriteInt32( ( 8 + ( nPoints << 3 ) ) ); + rOStm.WriteInt16( GDI_POLYLINE_ACTION ); + rOStm.WriteInt32( 8 + ( nPoints << 3 ) ); rOStm.WriteInt32( nPoints ); for( sal_uInt16 n = 0; n < nPoints; n++ ) @@ -1670,8 +1670,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly); const sal_uInt16 nPoints(aSimplePoly.GetSize()); - rOStm.WriteInt16( GDI_POLYGON_ACTION ); - rOStm.WriteInt32( ( 8 + ( nPoints << 3 ) ) ); + rOStm.WriteInt16( GDI_POLYGON_ACTION ); + rOStm.WriteInt32( 8 + ( nPoints << 3 ) ); rOStm.WriteInt32( nPoints ); for( sal_uInt16 n = 0; n < nPoints; n++ ) @@ -1710,8 +1710,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, if ( ImplWriteUnicodeComment( rOStm, aUniText ) ) nCount++; - rOStm.WriteInt16( GDI_TEXT_ACTION ); - rOStm.WriteInt32( ( 24 + ( nStrLen + 1 ) ) ); + rOStm.WriteInt16( GDI_TEXT_ACTION ); + rOStm.WriteInt32( 24 + ( nStrLen + 1 ) ); WritePair( rOStm, pAct->GetPoint() ); rOStm.WriteInt32( pAct->GetIndex() ); rOStm.WriteInt32( pAct->GetLen() ); @@ -1749,8 +1749,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, else nAryLen = nLen; // #105987# Write out all of DX array - rOStm.WriteInt16( GDI_TEXTARRAY_ACTION ); - rOStm.WriteInt32( ( 28 + ( nLen + 1 ) + ( nAryLen * 4 ) ) ); + rOStm.WriteInt16( GDI_TEXTARRAY_ACTION ); + rOStm.WriteInt32( 28 + ( nLen + 1 ) + ( nAryLen * 4 ) ); WritePair( rOStm, pAct->GetPoint() ); rOStm.WriteInt32( 0 ); rOStm.WriteInt32( nLen ); @@ -1775,8 +1775,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, if ( ImplWriteUnicodeComment( rOStm, aUniText ) ) nCount++; - rOStm.WriteInt16( GDI_STRETCHTEXT_ACTION ); - rOStm.WriteInt32( ( 28 + ( nStrLen + 1 ) ) ); + rOStm.WriteInt16( GDI_STRETCHTEXT_ACTION ); + rOStm.WriteInt32( 28 + ( nStrLen + 1 ) ); WritePair( rOStm, pAct->GetPoint() ); rOStm.WriteInt32( pAct->GetIndex() ); rOStm.WriteInt32( pAct->GetLen() ); @@ -1791,7 +1791,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaBmpAction* pAct = static_cast<const MetaBmpAction*>(pAction); - rOStm.WriteInt16( GDI_BITMAP_ACTION ); + rOStm.WriteInt16( GDI_BITMAP_ACTION ); rOStm.WriteInt32( 12 ); WritePair( rOStm, pAct->GetPoint() ); WriteDIB(pAct->GetBitmap(), rOStm, false, true); @@ -1803,7 +1803,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaBmpScaleAction* pAct = static_cast<const MetaBmpScaleAction*>(pAction); - rOStm.WriteInt16( GDI_BITMAPSCALE_ACTION ); + rOStm.WriteInt16( GDI_BITMAPSCALE_ACTION ); rOStm.WriteInt32( 20 ); WritePair( rOStm, pAct->GetPoint() ); WritePair( rOStm, pAct->GetSize() ); @@ -1816,7 +1816,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaBmpScalePartAction* pAct = static_cast<const MetaBmpScalePartAction*>(pAction); - rOStm.WriteInt16( GDI_BITMAPSCALEPART_ACTION ); + rOStm.WriteInt16( GDI_BITMAPSCALEPART_ACTION ); rOStm.WriteInt32( 36 ); WritePair( rOStm, pAct->GetDestPoint() ); WritePair( rOStm, pAct->GetDestSize() ); @@ -1832,7 +1832,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, const MetaBmpExAction* pAct = static_cast<const MetaBmpExAction*>(pAction); const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() ); - rOStm.WriteInt16( GDI_BITMAP_ACTION ); + rOStm.WriteInt16( GDI_BITMAP_ACTION ); rOStm.WriteInt32( 12 ); WritePair( rOStm, pAct->GetPoint() ); WriteDIB(aBmp, rOStm, false, true); @@ -1845,7 +1845,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, const MetaBmpExScaleAction* pAct = static_cast<const MetaBmpExScaleAction*>(pAction); const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() ); - rOStm.WriteInt16( GDI_BITMAPSCALE_ACTION ); + rOStm.WriteInt16( GDI_BITMAPSCALE_ACTION ); rOStm.WriteInt32( 20 ); WritePair( rOStm, pAct->GetPoint() ); WritePair( rOStm, pAct->GetSize() ); @@ -1859,7 +1859,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, const MetaBmpExScalePartAction* pAct = static_cast<const MetaBmpExScalePartAction*>(pAction); const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() ); - rOStm.WriteInt16( GDI_BITMAPSCALEPART_ACTION ); + rOStm.WriteInt16( GDI_BITMAPSCALEPART_ACTION ); rOStm.WriteInt32( 36 ); WritePair( rOStm, pAct->GetDestPoint() ); WritePair( rOStm, pAct->GetDestSize() ); @@ -1875,18 +1875,18 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, const MetaGradientAction* pAct = static_cast<const MetaGradientAction*>(pAction); const Gradient& rGrad = pAct->GetGradient(); - rOStm.WriteInt16( GDI_GRADIENT_ACTION ); + rOStm.WriteInt16( GDI_GRADIENT_ACTION ); rOStm.WriteInt32( 46 ); ImplWriteRect( rOStm, pAct->GetRect() ); - rOStm.WriteInt16( rGrad.GetStyle() ); + rOStm.WriteInt16( rGrad.GetStyle() ); ImplWriteColor( rOStm, rGrad.GetStartColor() ); ImplWriteColor( rOStm, rGrad.GetEndColor() ); - rOStm.WriteInt16( rGrad.GetAngle() ); - rOStm.WriteInt16( rGrad.GetBorder() ); - rOStm.WriteInt16( rGrad.GetOfsX() ); - rOStm.WriteInt16( rGrad.GetOfsY() ); - rOStm.WriteInt16( rGrad.GetStartIntensity() ); - rOStm.WriteInt16( rGrad.GetEndIntensity() ); + rOStm.WriteInt16( rGrad.GetAngle() ); + rOStm.WriteInt16( rGrad.GetBorder() ); + rOStm.WriteInt16( rGrad.GetOfsX() ); + rOStm.WriteInt16( rGrad.GetOfsY() ); + rOStm.WriteInt16( rGrad.GetStartIntensity() ); + rOStm.WriteInt16( rGrad.GetEndIntensity() ); nCount++; } break; @@ -1897,7 +1897,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, sal_uLong nOldPos, nNewPos; // write RefPoint comment - rOStm.WriteInt16( GDI_GRADIENTEX_COMMENT ); + rOStm.WriteInt16( GDI_GRADIENTEX_COMMENT ); // we'll write the ActionSize later nOldPos = rOStm.Tell(); @@ -1911,7 +1911,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, // calculate and write ActionSize of comment nNewPos = rOStm.Tell(); rOStm.Seek( nOldPos ); - rOStm.WriteInt32( ( nNewPos - nOldPos ) ); + rOStm.WriteInt32( nNewPos - nOldPos ); rOStm.Seek( nNewPos ); nCount++; @@ -1927,7 +1927,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, ImplWriteLineColor( rOStm, rColor, 1 ); ImplWriteFillColor( rOStm, rColor, 1 ); - rOStm.WriteInt16( GDI_RECT_ACTION ); + rOStm.WriteInt16( GDI_RECT_ACTION ); rOStm.WriteInt32( 28 ); ImplWriteRect( rOStm, pAct->GetRect() ); rOStm.WriteInt32( 0 ); @@ -1944,18 +1944,18 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, const vcl::Region& rRegion = pAct->GetRegion(); Rectangle aClipRect; - rOStm.WriteInt16( GDI_CLIPREGION_ACTION ); + rOStm.WriteInt16( GDI_CLIPREGION_ACTION ); rOStm.WriteInt32( 24 ); if( pAct->IsClipping() ) { aClipRect = rRegion.GetBoundRect(); - rOStm.WriteInt16( 1 ); + rOStm.WriteInt16( 1 ); } else - rOStm.WriteInt16( 0 ); + rOStm.WriteInt16( 0 ); - rOStm.WriteInt16( 0 ); + rOStm.WriteInt16( 0 ); ImplWriteRect( rOStm, aClipRect ); if( pAct->IsClipping() ) @@ -1969,7 +1969,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaISectRectClipRegionAction* pAct = static_cast<const MetaISectRectClipRegionAction*>(pAction); - rOStm.WriteInt16( GDI_ISECTCLIPREGION_ACTION ); + rOStm.WriteInt16( GDI_ISECTCLIPREGION_ACTION ); rOStm.WriteInt32( 20 ); WriteRectangle( rOStm, pAct->GetRect() ); nCount++; @@ -1980,7 +1980,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaMoveClipRegionAction* pAct = static_cast<const MetaMoveClipRegionAction*>(pAction); - rOStm.WriteInt16( GDI_MOVECLIPREGION_ACTION ); + rOStm.WriteInt16( GDI_MOVECLIPREGION_ACTION ); rOStm.WriteInt32( 12 ); rOStm.WriteInt32( pAct->GetHorzMove() ); rOStm.WriteInt32( pAct->GetVertMove() ); @@ -2054,7 +2054,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaMapModeAction* pAct = static_cast<const MetaMapModeAction*>(pAction); - rOStm.WriteInt16( GDI_MAPMODE_ACTION ); + rOStm.WriteInt16( GDI_MAPMODE_ACTION ); rOStm.WriteInt32( 30 ); ImplWriteMapMode( rOStm, pAct->GetMapMode() ); nCount++; @@ -2153,7 +2153,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, sal_uLong nOldPos, nNewPos; // write transparence comment - rOStm.WriteInt16( GDI_TRANSPARENT_COMMENT ); + rOStm.WriteInt16( GDI_TRANSPARENT_COMMENT ); // we'll write the ActionSize later nOldPos = rOStm.Tell(); @@ -2167,7 +2167,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, // calculate and write ActionSize of comment nNewPos = rOStm.Tell(); rOStm.Seek( nOldPos ); - rOStm.WriteInt32( ( nNewPos - nOldPos ) ); + rOStm.WriteInt32( nNewPos - nOldPos ); rOStm.Seek( nNewPos ); { @@ -2214,7 +2214,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, sal_uLong nOldPos, nNewPos; // write RefPoint comment - rOStm.WriteInt16( GDI_FLOATTRANSPARENT_COMMENT ); + rOStm.WriteInt16( GDI_FLOATTRANSPARENT_COMMENT ); // we'll write the ActionSize later nOldPos = rOStm.Tell(); @@ -2229,7 +2229,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, // calculate and write ActionSize of comment nNewPos = rOStm.Tell(); rOStm.Seek( nOldPos ); - rOStm.WriteInt32( ( nNewPos - nOldPos + 4 ) ); + rOStm.WriteInt32( nNewPos - nOldPos + 4 ); rOStm.Seek( ( nOldPos = nNewPos ) + 4 ); { @@ -2274,7 +2274,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, sal_uLong nOldPos, nNewPos, nAddCount; // write hatch comment - rOStm.WriteInt16( GDI_HATCH_COMMENT ); + rOStm.WriteInt16( GDI_HATCH_COMMENT ); // we'll write the ActionSize later nOldPos = rOStm.Tell(); @@ -2287,7 +2287,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, // calculate and write ActionSize of comment nNewPos = rOStm.Tell(); rOStm.Seek( nOldPos ); - rOStm.WriteInt32( ( nNewPos - nOldPos + 4 ) ); + rOStm.WriteInt32( nNewPos - nOldPos + 4 ); rOStm.Seek( ( nOldPos = nNewPos ) + 4 ); { @@ -2317,7 +2317,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, sal_uLong nOldPos, nNewPos; // write RefPoint comment - rOStm.WriteInt16( GDI_REFPOINT_COMMENT ); + rOStm.WriteInt16( GDI_REFPOINT_COMMENT ); // we'll write the ActionSize later nOldPos = rOStm.Tell(); @@ -2331,7 +2331,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, // calculate and write ActionSize of comment nNewPos = rOStm.Tell(); rOStm.Seek( nOldPos ); - rOStm.WriteInt32( ( nNewPos - nOldPos ) ); + rOStm.WriteInt32( nNewPos - nOldPos ); rOStm.Seek( nNewPos ); nCount++; @@ -2346,7 +2346,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, sal_uLong nOldPos, nNewPos; // write RefPoint comment - rOStm.WriteInt16( GDI_TEXTLINECOLOR_COMMENT ); + rOStm.WriteInt16( GDI_TEXTLINECOLOR_COMMENT ); // we'll write the ActionSize later nOldPos = rOStm.Tell(); @@ -2360,7 +2360,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, // calculate and write ActionSize of comment nNewPos = rOStm.Tell(); rOStm.Seek( nOldPos ); - rOStm.WriteInt32( ( nNewPos - nOldPos ) ); + rOStm.WriteInt32( nNewPos - nOldPos ); rOStm.Seek( nNewPos ); nCount++; @@ -2377,7 +2377,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, sal_uLong nOldPos, nNewPos; // write RefPoint comment - rOStm.WriteInt16( GDI_TEXTLINE_COMMENT ); + rOStm.WriteInt16( GDI_TEXTLINE_COMMENT ); // we'll write the ActionSize later nOldPos = rOStm.Tell(); @@ -2391,7 +2391,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, // calculate and write ActionSize of comment nNewPos = rOStm.Tell(); rOStm.Seek( nOldPos ); - rOStm.WriteInt32( ( nNewPos - nOldPos ) ); + rOStm.WriteInt32( nNewPos - nOldPos ); rOStm.Seek( nNewPos ); nCount++; @@ -2408,7 +2408,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, sal_uLong nOldPos, nNewPos; // write RefPoint comment - rOStm.WriteInt16( GDI_COMMENT_COMMENT ); + rOStm.WriteInt16( GDI_COMMENT_COMMENT ); // we'll write the ActionSize later nOldPos = rOStm.Tell(); @@ -2426,7 +2426,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, // calculate and write ActionSize of comment nNewPos = rOStm.Tell(); rOStm.Seek( nOldPos ); - rOStm.WriteInt32( ( nNewPos - nOldPos ) ); + rOStm.WriteInt32( nNewPos - nOldPos ); rOStm.Seek( nNewPos ); nCount++; diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 21b9632d0c5c..2e3779865411 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -1428,7 +1428,7 @@ bool ImplWriteDIBFileHeader(SvStream& rOStm, BitmapReadAccess& rAcc, bool bUseDI const sal_uInt32 nOffset(14 + (bUseDIBV5 ? DIBV5HEADERSIZE : DIBINFOHEADERSIZE) + nPalCount * 4UL); rOStm.WriteUInt16( 0x4D42 ); // 'MB' from BITMAPFILEHEADER - rOStm.WriteUInt32( (nOffset + (rAcc.Height() * rAcc.GetScanlineSize())) ); + rOStm.WriteUInt32( nOffset + (rAcc.Height() * rAcc.GetScanlineSize()) ); rOStm.WriteUInt16( 0 ); rOStm.WriteUInt16( 0 ); rOStm.WriteUInt32( nOffset ); diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index c9e53e25b703..43ea999b0cd3 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -725,10 +725,10 @@ SvStream& WriteImpl_Font( SvStream& rOStm, const Impl_Font& rImpl_Font ) rOStm.WriteUChar( rImpl_Font.mnKerning ); // new in version 2 - rOStm.WriteUChar( rImpl_Font.meRelief ); - rOStm.WriteUInt16( rImpl_Font.maCJKLanguageTag.getLanguageType( false) ); + rOStm.WriteUChar( rImpl_Font.meRelief ); + rOStm.WriteUInt16( rImpl_Font.maCJKLanguageTag.getLanguageType( false) ); rOStm.WriteUChar( rImpl_Font.mbVertical ); - rOStm.WriteUInt16( rImpl_Font.meEmphasisMark ); + rOStm.WriteUInt16( rImpl_Font.meEmphasisMark ); // new in version 3 rOStm.WriteUInt16( rImpl_Font.meOverline ); |