diff options
author | Noel Grandin <noel@peralex.com> | 2015-01-16 08:07:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-16 08:08:44 +0200 |
commit | 2f69f6efa0ef3e6647e4a438755c171182a7554c (patch) | |
tree | 98dd816a10afe2aed6cf5c085794ac4198b7e906 /filter/source | |
parent | fdo#88398: Handle group listeners correctly when splitting formula group. (diff) | |
download | core-2f69f6efa0ef3e6647e4a438755c171182a7554c.tar.gz core-2f69f6efa0ef3e6647e4a438755c171182a7554c.zip |
remove unnecessary parentheses
left over from "SVStream operator>> to Write method" conversion
Change-Id: I619eb743d7890d5c70d0a94e51ce263567fa6f3b
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/flash/swfwriter2.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/eos2met/eos2met.cxx | 44 | ||||
-rw-r--r-- | filter/source/graphicfilter/epbm/epbm.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/epgm/epgm.cxx | 12 | ||||
-rw-r--r-- | filter/source/graphicfilter/epict/epict.cxx | 8 | ||||
-rw-r--r-- | filter/source/graphicfilter/eppm/eppm.cxx | 12 | ||||
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 10 | ||||
-rw-r--r-- | filter/source/graphicfilter/eras/eras.cxx | 4 | ||||
-rw-r--r-- | filter/source/graphicfilter/etiff/etiff.cxx | 12 | ||||
-rw-r--r-- | filter/source/graphicfilter/expm/expm.cxx | 6 | ||||
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 42 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 4 |
12 files changed, 82 insertions, 82 deletions
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 ); } |