basic/source/classes/image.cxx | 6 basic/source/classes/sbxmod.cxx | 10 - basic/source/sbx/sbxarray.cxx | 2 basic/source/sbx/sbxbase.cxx | 2 basic/source/sbx/sbxobj.cxx | 6 connectivity/source/drivers/dbase/DTable.cxx | 12 - dbaccess/source/ui/misc/TokenWriter.cxx | 2 editeng/source/items/frmitems.cxx | 14 - editeng/source/items/paraitem.cxx | 36 ++-- editeng/source/items/textitem.cxx | 2 extensions/source/scanner/sane.cxx | 4 filter/source/flash/swfwriter2.cxx | 6 filter/source/graphicfilter/eos2met/eos2met.cxx | 44 ++--- filter/source/graphicfilter/epbm/epbm.cxx | 4 filter/source/graphicfilter/epgm/epgm.cxx | 12 - filter/source/graphicfilter/epict/epict.cxx | 8 - filter/source/graphicfilter/eppm/eppm.cxx | 12 - filter/source/graphicfilter/eps/eps.cxx | 10 - filter/source/graphicfilter/eras/eras.cxx | 4 filter/source/graphicfilter/etiff/etiff.cxx | 12 - filter/source/graphicfilter/expm/expm.cxx | 6 filter/source/msfilter/escherex.cxx | 42 ++--- filter/source/msfilter/msdffimp.cxx | 4 sc/source/core/tool/autoform.cxx | 15 - sc/source/ui/docshell/impex.cxx | 2 sd/source/filter/eppt/eppt.cxx | 20 +- sd/source/filter/eppt/epptso.cxx | 152 ++++++++++---------- sd/source/filter/eppt/escherex.cxx | 20 +- sd/source/filter/eppt/pptexsoundcollection.cxx | 14 - sd/source/filter/eppt/pptx-stylesheet.cxx | 8 - sot/source/sdstor/stgelem.cxx | 2 sot/source/sdstor/stgole.cxx | 8 - sot/source/sdstor/storinfo.cxx | 2 sot/source/sdstor/ucbstorage.cxx | 2 svl/source/filerec/filerec.cxx | 10 - svl/source/items/poolio.cxx | 6 svtools/source/misc/imap.cxx | 2 svtools/source/misc/imap3.cxx | 2 svtools/source/misc/transfer.cxx | 2 sw/source/core/doc/tblafmt.cxx | 13 - sw/source/core/inc/swfont.hxx | 2 sw/source/filter/ww8/wrtw8esh.cxx | 4 tools/source/ref/pstm.cxx | 14 - vcl/source/filter/wmf/emfwr.cxx | 46 +++--- vcl/source/filter/wmf/wmfwr.cxx | 6 vcl/source/gdi/animate.cxx | 2 vcl/source/gdi/cvtsvm.cxx | 182 ++++++++++++------------ vcl/source/gdi/dibtools.cxx | 2 vcl/source/gdi/font.cxx | 6 49 files changed, 401 insertions(+), 403 deletions(-)
New commits: commit 2f69f6efa0ef3e6647e4a438755c171182a7554c Author: Noel Grandin <[email protected]> Date: Fri Jan 16 08:07:06 2015 +0200 remove unnecessary parentheses left over from "SVStream operator>> to Write method" conversion Change-Id: I619eb743d7890d5c70d0a94e51ce263567fa6f3b diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index 8e52b45..ea2e733 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 91b98d7..a998124 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 420715b..4754c98 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 6e795a9..f13b4c9 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 a7d8d4b..e677d7d 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 d96b207..0994bb2 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 d46d473..a879755 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 f7902b2..66f0ba3 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 aeca389..3537700 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 67f22e5..5209e55 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 9e14d9b..cb6d5f7 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 b1fe002..dfa8bbd 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 18809d5..0d21b0a 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 818883f..b9b9bfa 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 a2a437d..c27fab0 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 aa8d045..f11528e 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 bd42899..258f072 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 da5edcc..f0896e6 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 24d21d2..589f698 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 408b48b..a4b2768 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 18b0b23..b8e7a47 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 10b92ec..70d2637 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 2b25369..107b38a 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 ac81ac5..a6c5e3f 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 4d88174..8ca7598 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 ee80633..c66192f 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 83ccbfa..0fafe1d 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 b2c3638..346fa88 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 4b732d7..0e89585 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 8278b61..b30f1f6 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 2c6cd62..4b29e10 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 254cfe5..f52dff8 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 01a0200..a12b353 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 6e9243e..52aec86 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 41453f6..e6ef653 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 7656735..0465036 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 d3174ee..61db904 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 b0a198a..31246d3 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 d963953..9e1e6f6 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 899802f..281477a 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 b01ba5e..1750d7f 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 232ebcc..d5f0ae0 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 c6d76f1..0698c18 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 d0c3588..df94922 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(); ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
