diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-02 10:02:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-03 09:06:56 +0200 |
commit | 60fd81d83a2dbcb64a38910de49f8e2620353702 (patch) | |
tree | bd4757f6d14f7d422621e202136d0581b0a32e2e /filter | |
parent | 5233a2c9009533e454a734ac57c764e15f92a229 (diff) |
loplugin:checkunusedparams in filter
Change-Id: Icdfe9c86b78f28fb79b697e769afe6acb1dbc6f6
Reviewed-on: https://gerrit.libreoffice.org/37139
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
21 files changed, 83 insertions, 92 deletions
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx index 37ea443db756..34d7d10bb9f9 100644 --- a/filter/source/flash/swfexporter.cxx +++ b/filter/source/flash/swfexporter.cxx @@ -263,7 +263,7 @@ bool FlashExporter::exportAll( const Reference< XComponent >& xDoc, Reference< X } -bool FlashExporter::exportSlides( const Reference< XDrawPage >& xDrawPage, Reference< XOutputStream > &xOutputStream, sal_uInt16 /* nPage */ ) +bool FlashExporter::exportSlides( const Reference< XDrawPage >& xDrawPage, Reference< XOutputStream > &xOutputStream ) { Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY ); if( !xDrawPage.is() || !xPropSet.is() ) diff --git a/filter/source/flash/swfexporter.hxx b/filter/source/flash/swfexporter.hxx index beca04072611..117077a08b83 100644 --- a/filter/source/flash/swfexporter.hxx +++ b/filter/source/flash/swfexporter.hxx @@ -129,7 +129,7 @@ public: void Flush(); bool exportAll( const css::uno::Reference< css::lang::XComponent >& xDoc, css::uno::Reference< css::io::XOutputStream > &xOutputStream, css::uno::Reference< css::task::XStatusIndicator> &xStatusIndicator ); - bool exportSlides( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, css::uno::Reference< css::io::XOutputStream > &xOutputStream, sal_uInt16 nPage); + bool exportSlides( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, css::uno::Reference< css::io::XOutputStream > &xOutputStream); sal_uInt16 exportBackgrounds( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, css::uno::Reference< css::io::XOutputStream > &xOutputStream, sal_uInt16 nPage, bool bExportObjects ); sal_uInt16 exportBackgrounds( css::uno::Reference< css::drawing::XDrawPage > const & xDrawPage, sal_uInt16 nPage, bool bExportObjects ); diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx index ad195238425e..459bc8da3bbc 100644 --- a/filter/source/flash/swffilter.cxx +++ b/filter/source/flash/swffilter.cxx @@ -414,7 +414,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a fullpath = swfdirpath + STR("/slide") + VAL(nPage+1) + STR("p.swf"); Reference<XOutputStream> xOutputStreamWrap(*(new OslOutputStreamWrapper(fullpath)), UNO_QUERY); - bool ret = aFlashExporter.exportSlides( xDrawPage, xOutputStreamWrap, sal::static_int_cast<sal_uInt16>( nPage ) ); + bool ret = aFlashExporter.exportSlides( xDrawPage, xOutputStreamWrap ); aFlashExporter.Flush(); xOutputStreamWrap.clear(); diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 027ed0eefdf5..a326ddc9003b 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -711,7 +711,7 @@ void CGMImpressOutAct::DrawPolyPolygon( tools::PolyPolygon& rPolyPolygon ) } } -void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, char* pString, sal_uInt32 /*nSize*/, FinalFlag eFlag ) +void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, char* pString, FinalFlag eFlag ) { if ( ImplCreateShape( "com.sun.star.drawing.TextShape" ) ) { @@ -851,7 +851,7 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha } } -void CGMImpressOutAct::AppendText( char* pString, sal_uInt32 /*nSize*/, FinalFlag /*eFlag*/ ) +void CGMImpressOutAct::AppendText( const char* pString ) { if ( nFinalTextCount ) { @@ -953,7 +953,7 @@ void CGMImpressOutAct::RegPolyLine( tools::Polygon& rPolygon, bool bReverse ) } } -void CGMImpressOutAct::SetGradientOffset( long nHorzOfs, long nVertOfs, sal_uInt32 /*nType*/ ) +void CGMImpressOutAct::SetGradientOffset( long nHorzOfs, long nVertOfs ) { if ( !mpGradient ) mpGradient = new awt::Gradient; @@ -976,7 +976,7 @@ void CGMImpressOutAct::SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 mpGradient->EndColor = nColorTo; } -void CGMImpressOutAct::SetGradientStyle( sal_uInt32 nStyle, double /*fRatio*/ ) +void CGMImpressOutAct::SetGradientStyle( sal_uInt32 nStyle ) { if ( !mpGradient ) mpGradient = new awt::Gradient; diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx index 05d2090051f4..3edaae373b82 100644 --- a/filter/source/graphicfilter/icgm/cgm.cxx +++ b/filter/source/graphicfilter/icgm/cgm.cxx @@ -97,7 +97,7 @@ sal_uInt32 CGM::GetBackGroundColor() return ( pElement ) ? pElement->aColorTable[ 0 ] : 0; } -sal_uInt32 CGM::ImplGetUI16( sal_uInt32 /*nAlign*/ ) +sal_uInt32 CGM::ImplGetUI16() { sal_uInt8* pSource = mpSource + mnParaSize; if (mpEndValidSource - pSource < 2) diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx index a7c5d04d9d6d..462b13928920 100644 --- a/filter/source/graphicfilter/icgm/cgm.hxx +++ b/filter/source/graphicfilter/icgm/cgm.hxx @@ -89,7 +89,7 @@ class CGM sal_uInt32 mnElementID; sal_uInt32 mnElementSize; // full parameter size for the latest action - sal_uInt32 ImplGetUI16( sal_uInt32 nAlign = 0 ); + sal_uInt32 ImplGetUI16(); static sal_uInt8 ImplGetByte( sal_uInt32 nSource, sal_uInt32 nPrecision ); sal_Int32 ImplGetI( sal_uInt32 nPrecision ); sal_uInt32 ImplGetUI( sal_uInt32 nPrecision ); diff --git a/filter/source/graphicfilter/icgm/class1.cxx b/filter/source/graphicfilter/icgm/class1.cxx index 895dd8247d0b..f90e2e7758df 100644 --- a/filter/source/graphicfilter/icgm/class1.cxx +++ b/filter/source/graphicfilter/icgm/class1.cxx @@ -58,7 +58,7 @@ void CGM::ImplDoClass1() break; case 0x05 : /*Real Precision*/ { - nUInteger = ImplGetUI16( 4 ); + nUInteger = ImplGetUI16(); nI0 = ImplGetI( pElement->nIntegerPrecision ); // exponent nI1 = ImplGetI( pElement->nIntegerPrecision ); // mantisse switch( nUInteger ) diff --git a/filter/source/graphicfilter/icgm/class2.cxx b/filter/source/graphicfilter/icgm/class2.cxx index 93b3679381b6..842acfb86a31 100644 --- a/filter/source/graphicfilter/icgm/class2.cxx +++ b/filter/source/graphicfilter/icgm/class2.cxx @@ -103,7 +103,7 @@ void CGM::ImplDoClass2() break; case 0x09 : /*Device Viewport Specification Mode*/ { - nUInteger = ImplGetUI16( 8 ); + nUInteger = ImplGetUI16(); switch( nUInteger ) { case 0 : pElement->eDeviceViewPortMode = DVPM_FRACTION; break; diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index adb80d08db59..617f88aa7307 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -183,7 +183,7 @@ void CGM::ImplDoClass4() mpOutAct->CloseRegion(); ImplGetPoint ( aFloatPoint, true ); - sal_uInt32 nType = ImplGetUI16( 4 ); + sal_uInt32 nType = ImplGetUI16(); sal_uInt32 nSize = ImplGetUI( 1 ); if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize) @@ -194,7 +194,7 @@ void CGM::ImplDoClass4() awt::Size aSize; awt::Point aPoint( (long)aFloatPoint.X, (long)aFloatPoint.Y ); mpOutAct->DrawText( aPoint, aSize, - reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, (FinalFlag)nType ); + reinterpret_cast<char*>(mpSource) + mnParaSize, (FinalFlag)nType ); mnParaSize = mnElementSize; } break; @@ -221,7 +221,7 @@ void CGM::ImplDoClass4() ImplMapDouble( dy ); ImplGetPoint ( aFloatPoint, true ); - sal_uInt32 nType = ImplGetUI16(4); + sal_uInt32 nType = ImplGetUI16(); sal_uInt32 nSize = ImplGetUI(1); if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize) @@ -232,14 +232,14 @@ void CGM::ImplDoClass4() awt::Point aPoint( (long)aFloatPoint.X, (long)aFloatPoint.Y ); awt::Size aSize((long)dx, (long)dy); mpOutAct->DrawText( aPoint, aSize , - reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, (FinalFlag)nType ); + reinterpret_cast<char*>(mpSource) + mnParaSize, (FinalFlag)nType ); mnParaSize = mnElementSize; } break; case 0x06 : /*Append Text*/ { - sal_uInt32 nType = ImplGetUI16( 4 ); + (void)ImplGetUI16(); // nType sal_uInt32 nSize = ImplGetUI( 1 ); if (static_cast<sal_uIntPtr>(mpEndValidSource - (mpSource + mnParaSize)) < nSize) @@ -247,7 +247,7 @@ void CGM::ImplDoClass4() mpSource[ mnParaSize + nSize ] = 0; - mpOutAct->AppendText( reinterpret_cast<char*>(mpSource) + mnParaSize, nSize, (FinalFlag)nType ); + mpOutAct->AppendText( reinterpret_cast<char*>(mpSource) + mnParaSize ); mnParaSize = mnElementSize; } break; diff --git a/filter/source/graphicfilter/icgm/class5.cxx b/filter/source/graphicfilter/icgm/class5.cxx index 1ff3cd7f05db..c3677648770d 100644 --- a/filter/source/graphicfilter/icgm/class5.cxx +++ b/filter/source/graphicfilter/icgm/class5.cxx @@ -197,7 +197,7 @@ void CGM::ImplDoClass5() case 0x12 : /*Text Alignment*/ { pElement->eTextAlignmentH = (TextAlignmentH)ImplGetUI16(); - pElement->eTextAlignmentV = (TextAlignmentV)ImplGetUI16( 8 ); + pElement->eTextAlignmentV = (TextAlignmentV)ImplGetUI16(); pElement->nTextAlignmentHCont = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); pElement->nTextAlignmentVCont = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); } @@ -436,8 +436,8 @@ void CGM::ImplDoClass5() { long nHorzOffset = ImplGetI( pElement->nIndexPrecision ); long nVertOffset = ImplGetI( pElement->nIndexPrecision ); - sal_uInt32 nType = ImplGetUI16(); - mpOutAct->SetGradientOffset( nHorzOffset, nVertOffset, nType ); + (void)ImplGetUI16(); // nType + mpOutAct->SetGradientOffset( nHorzOffset, nVertOffset ); mnAct4PostReset |= ACT4_GRADIENT_ACTION; } break; @@ -486,7 +486,7 @@ void CGM::ImplDoClass5() mnParaSize = nPara; } if ( nNumberOfStages > 1 ) - mpOutAct->SetGradientStyle( 0xff, 1 ); + mpOutAct->SetGradientStyle( 0xff ); mpOutAct->SetGradientDescriptor( nColorFrom, nColorTo ); mnAct4PostReset |= ACT4_GRADIENT_ACTION; @@ -494,9 +494,9 @@ void CGM::ImplDoClass5() break; case 0x7e : /*set Gradient Style*/ { - sal_uInt32 nStyle = ImplGetUI16( 8 ); - double fRatio = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); - mpOutAct->SetGradientStyle( nStyle, fRatio ); + sal_uInt32 nStyle = ImplGetUI16(); + (void)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); // fRatio + mpOutAct->SetGradientStyle( nStyle ); mnAct4PostReset |= ACT4_GRADIENT_ACTION; } break; diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx index 3a8d7e8b91fa..badf8362b115 100644 --- a/filter/source/graphicfilter/icgm/outact.hxx +++ b/filter/source/graphicfilter/icgm/outact.hxx @@ -85,8 +85,8 @@ public: void DrawPolyLine( tools::Polygon& ); void DrawPolybezier( tools::Polygon& ); void DrawPolyPolygon( tools::PolyPolygon& ); - void DrawText( css::awt::Point& TextRectPos, css::awt::Size& TextRectSize, char* String, sal_uInt32 StringSize, FinalFlag ); - void AppendText( char* String, sal_uInt32 StringSize, FinalFlag ); + void DrawText( css::awt::Point& TextRectPos, css::awt::Size& TextRectSize, char* String, FinalFlag ); + void AppendText( const char* String ); void FirstOutPut() { mpCGM->mbFirstOutPut = false; } ; void BeginFigure(); @@ -94,10 +94,10 @@ public: void NewRegion(); void EndFigure(); void RegPolyLine( tools::Polygon&, bool bReverse = false ); - void SetGradientOffset( long nHorzOfs, long nVertOfs, sal_uInt32 nType ); + void SetGradientOffset( long nHorzOfs, long nVertOfs ); void SetGradientAngle( long nAngle ); void SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 nColorTo ); - void SetGradientStyle( sal_uInt32 nStyle, double fRatio ); + void SetGradientStyle( sal_uInt32 nStyle ); }; diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx index 3ceab9525257..b3ad3f6b8890 100644 --- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx +++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx @@ -144,7 +144,7 @@ DXFLineInfo DXF2GDIMetaFile::GetEntityDXFLineInfo(const DXFBasicEntity & rE) } -bool DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE, sal_uLong /*nWidth*/) +bool DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE) { long nColor; Color aColor; @@ -184,7 +184,7 @@ bool DXF2GDIMetaFile::SetAreaAttribute(const DXFBasicEntity & rE) } -bool DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle, sal_uInt16 nHeight, double /*fWidthScale*/) +bool DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle, sal_uInt16 nHeight) { long nColor; Color aColor; @@ -422,7 +422,7 @@ void DXF2GDIMetaFile::DrawTextEntity(const DXFTextEntity & rE, const DXFTransfor fA=aT.CalcRotAngle(); nAng=(short)(fA*10.0+0.5); aT.TransDir(DXFVector(1,0,0),aV); - if ( SetFontAttribute( rE,nAng, nHeight, aV. Abs() ) ) + if ( SetFontAttribute( rE,nAng, nHeight ) ) { OUString const aUString(pDXF->ToOUString(rE.m_sText)); aT.Transform( DXFVector( 0, 0, 0 ), aPt ); @@ -480,7 +480,7 @@ void DXF2GDIMetaFile::DrawAttribEntity(const DXFAttribEntity & rE, const DXFTran fA=aT.CalcRotAngle(); nAng=(short)(fA*10.0+0.5); aT.TransDir(DXFVector(1,0,0),aV); - if (SetFontAttribute(rE,nAng,nHeight,aV.Abs())) + if (SetFontAttribute(rE,nAng,nHeight)) { OUString const aUString(pDXF->ToOUString(rE.m_sText)); aT.Transform( DXFVector( 0, 0, 0 ), aPt ); @@ -519,7 +519,7 @@ void DXF2GDIMetaFile::DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXF fW/=2.0; if ((rE.nFlags&1)!=0) fW/=(double)nPolySize; else fW/=(double)(nPolySize-1); - if (SetLineAttribute(rE,rTransform.TransLineWidth(fW))) { + if (SetLineAttribute(rE)) { if ((rE.nFlags&1)!=0) pVirDev->DrawPolygon(aPoly); else pVirDev->DrawPolyLine(aPoly); if (rE.fThickness!=0) { @@ -549,8 +549,7 @@ void DXF2GDIMetaFile::DrawLWPolyLineEntity(const DXFLWPolyLineEntity & rE, const { rTransform.Transform( rE.pP[ (sal_uInt16)i ], aPoly[ (sal_uInt16)i ] ); } - double fW = rE.fConstantWidth; - if ( SetLineAttribute( rE, rTransform.TransLineWidth( fW ) ) ) + if ( SetLineAttribute( rE ) ) { if ( ( rE.nFlags & 1 ) != 0 ) pVirDev->DrawPolygon( aPoly ); diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx b/filter/source/graphicfilter/idxf/dxf2mtf.hxx index c6274d23e9d0..8492289bf067 100644 --- a/filter/source/graphicfilter/idxf/dxf2mtf.hxx +++ b/filter/source/graphicfilter/idxf/dxf2mtf.hxx @@ -62,12 +62,12 @@ private: DXFLineInfo GetEntityDXFLineInfo(const DXFBasicEntity & rE); - bool SetLineAttribute(const DXFBasicEntity & rE, sal_uLong nWidth=0); + bool SetLineAttribute(const DXFBasicEntity & rE); bool SetAreaAttribute(const DXFBasicEntity & rE); bool SetFontAttribute(const DXFBasicEntity & rE, short nAngle, - sal_uInt16 nHeight, double fWidthScale); + sal_uInt16 nHeight); void DrawLineEntity(const DXFLineEntity & rE, const DXFTransform & rTransform); diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx index 4c83afdfcba9..2bf89b1ddb23 100644 --- a/filter/source/graphicfilter/idxf/dxfreprd.cxx +++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx @@ -164,7 +164,7 @@ rtl_TextEncoding DXFRepresentation::getTextEncoding() const osl_getTextEncodingFromLocale(nullptr); // Use default encoding if none specified } -bool DXFRepresentation::Read( SvStream & rIStream, sal_uInt16 /*nMinPercent*/, sal_uInt16 /*nMaxPercent*/) +bool DXFRepresentation::Read( SvStream & rIStream ) { bool bRes; diff --git a/filter/source/graphicfilter/idxf/dxfreprd.hxx b/filter/source/graphicfilter/idxf/dxfreprd.hxx index 2f8fc7af90e3..a24026b45370 100644 --- a/filter/source/graphicfilter/idxf/dxfreprd.hxx +++ b/filter/source/graphicfilter/idxf/dxfreprd.hxx @@ -104,7 +104,7 @@ public: double getGlobalLineTypeScale() const { return mfGlobalLineTypeScale; } void setGlobalLineTypeScale(double fGlobalLineTypeScale) { mfGlobalLineTypeScale = fGlobalLineTypeScale; } - bool Read( SvStream & rIStream, sal_uInt16 nMinPercent, sal_uInt16 nMaxPercent); + bool Read( SvStream & rIStream ); // Reads complete DXF file. private: diff --git a/filter/source/graphicfilter/idxf/idxf.cxx b/filter/source/graphicfilter/idxf/idxf.cxx index 59d454b328af..be458003df8d 100644 --- a/filter/source/graphicfilter/idxf/idxf.cxx +++ b/filter/source/graphicfilter/idxf/idxf.cxx @@ -36,7 +36,7 @@ idxGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* ) DXF2GDIMetaFile aConverter; GDIMetaFile aMTF; - if ( !aDXF.Read( rStream, 0, 60 ) ) + if ( !aDXF.Read( rStream ) ) return false; if ( !aConverter.Convert( aDXF, aMTF, 60, 100 ) ) return false; diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 565486f4df0e..5f5b54dba8b3 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -380,7 +380,7 @@ private: void PushAttr(sal_uInt16 nPushOrder); void PopAttr(); - void ChangeBrush( const Color& rPatColor, const Color& rBGColor, bool bFill ); + void ChangeBrush( const Color& rPatColor, bool bFill ); void SetPen( const Color& rColor, sal_uInt16 nStrLinWidth = 0, PenStyle ePenStyle = PEN_SOLID ); void SetRasterOp(RasterOp eROP); @@ -415,7 +415,7 @@ private: void ReadFilletSharp(bool bGivenPos, sal_uInt16 nOrderLen); void ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen); void ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen); - void ReadDsc(sal_uInt16 nDscID, sal_uInt16 nDscLen); + void ReadDsc(sal_uInt16 nDscID); void ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen); void ReadFont(sal_uInt16 nFieldSize); void ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize); @@ -715,7 +715,7 @@ void OS2METReader::PopAttr() delete p; } -void OS2METReader::ChangeBrush(const Color& rPatColor, const Color& /*rBGColor*/, bool bFill ) +void OS2METReader::ChangeBrush(const Color& rPatColor, bool bFill ) { Color aColor; @@ -955,12 +955,12 @@ void OS2METReader::ReadBox(bool bGivenPos) if ( nFlags & 0x40 ) { - ChangeBrush(aAttr.aPatCol,aAttr.aPatBgCol,aAttr.bFill); + ChangeBrush(aAttr.aPatCol, aAttr.bFill); SetRasterOp(aAttr.ePatMix); } else { - ChangeBrush( Color( COL_TRANSPARENT ), Color( COL_TRANSPARENT ), false ); + ChangeBrush( Color( COL_TRANSPARENT ), false ); SetRasterOp(aAttr.eLinMix); } @@ -1150,7 +1150,7 @@ void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize) aCalcBndRect.Union(aRect); if (pAreaStack!=nullptr) { - ChangeBrush(aAttr.aPatCol,aAttr.aPatBgCol,aAttr.bFill); + ChangeBrush(aAttr.aPatCol, aAttr.bFill); SetRasterOp(aAttr.ePatMix); if ((pAreaStack->nFlags&0x40)!=0) SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); @@ -1160,7 +1160,7 @@ void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize) else { SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); - ChangeBrush(Color( COL_TRANSPARENT ),Color( COL_TRANSPARENT ),false); + ChangeBrush(Color( COL_TRANSPARENT ), false); SetRasterOp(aAttr.eLinMix); } pVirDev->DrawEllipse(aRect); @@ -1252,7 +1252,7 @@ void OS2METReader::ReadPolygons() aPolyPoly.Insert(aPoly); } - ChangeBrush(aAttr.aPatCol,aAttr.aPatBgCol,aAttr.bFill); + ChangeBrush(aAttr.aPatCol, aAttr.bFill); SetRasterOp(aAttr.ePatMix); if ((nFlags&0x01)!=0) SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); @@ -1375,11 +1375,11 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen) SetRasterOp(aAttr.eMrkMix); if (aAttr.nMrkSymbol>=5 && aAttr.nMrkSymbol<=9) { - ChangeBrush(aAttr.aMrkCol,aAttr.aMrkCol,true); + ChangeBrush(aAttr.aMrkCol, true); } else { - ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),false); + ChangeBrush(Color(COL_TRANSPARENT), false); } if (bCoord32) nNumPoints=nOrderLen/8; else nNumPoints=nOrderLen/4; if (!bGivenPos) nNumPoints++; @@ -1550,7 +1550,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen) else SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); - ChangeBrush(p->aCol,p->aBgCol,p->bFill); + ChangeBrush(p->aCol, p->bFill); SetRasterOp(p->eMix); DrawPolyPolygon( p->aPPoly ); } @@ -1610,7 +1610,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen) if( p->bStroke ) { SetPen( aAttr.aPatCol, aAttr.nStrLinWidth ); - ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),false); + ChangeBrush(Color(COL_TRANSPARENT), false); SetRasterOp( aAttr.ePatMix ); if ( IsLineInfo() ) { @@ -1623,7 +1623,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen) else { SetPen( COL_TRANSPARENT, 0, PEN_NULL ); - ChangeBrush( aAttr.aPatCol, aAttr.aPatBgCol, aAttr.bFill ); + ChangeBrush( aAttr.aPatCol, aAttr.bFill ); SetRasterOp( aAttr.ePatMix ); pVirDev->DrawPolyPolygon( p->aPPoly ); } @@ -1658,7 +1658,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen) { SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); SetRasterOp(aAttr.eLinMix); - ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),false); + ChangeBrush(Color(COL_TRANSPARENT), false); nC=p->aPPoly.Count(); for (i=0; i<nC; i++) { @@ -2158,7 +2158,7 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen) } } -void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/) +void OS2METReader::ReadDsc(sal_uInt16 nDscID) { switch (nDscID) { case 0x00f7: { // 'Specify GVM Subset' @@ -2618,7 +2618,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize) pOS2MET->ReadUChar( nbyte ); nDscID =((sal_uInt16)nbyte) & 0x00ff; pOS2MET->ReadUChar( nbyte ); nDscLen=((sal_uInt16)nbyte) & 0x00ff; nPos=pOS2MET->Tell(); - ReadDsc(nDscID, nDscLen); + ReadDsc(nDscID); pOS2MET->Seek(nPos+nDscLen); } break; diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx index cdca91fcea83..a30d5eb98cc1 100644 --- a/filter/source/graphicfilter/itiff/ccidecom.cxx +++ b/filter/source/graphicfilter/itiff/ccidecom.cxx @@ -646,7 +646,7 @@ DecompressStatus CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_u sal_uInt32 nCurPos = pIStream->Tell(); sal_uInt16 nOldInputBitsBufSize = nInputBitsBufSize; sal_uInt32 nOldInputBitsBuf = nInputBitsBuf; - if ( !ReadEOL( 32 ) ) + if ( !ReadEOL() ) { nInputBitsBufSize = nOldInputBitsBufSize; nInputBitsBuf = nOldInputBitsBuf; @@ -657,7 +657,7 @@ DecompressStatus CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_u } else { - if ( !ReadEOL( nTargetBits ) ) + if ( !ReadEOL() ) { return DecompressStatus(bStatus, true); } @@ -762,7 +762,7 @@ void CCIDecompressor::MakeLookUp(const CCIHuffmanTableEntry * pHufTab, } -bool CCIDecompressor::ReadEOL( sal_uInt32 /*nMaxFillBits*/ ) +bool CCIDecompressor::ReadEOL() { sal_uInt16 nCode; sal_uInt8 nByte; diff --git a/filter/source/graphicfilter/itiff/ccidecom.hxx b/filter/source/graphicfilter/itiff/ccidecom.hxx index 02c7a16acf8a..73a16b7b904b 100644 --- a/filter/source/graphicfilter/itiff/ccidecom.hxx +++ b/filter/source/graphicfilter/itiff/ccidecom.hxx @@ -74,7 +74,7 @@ private: sal_uInt16 nHuffmanTableSize, sal_uInt16 nMaxCodeBits); - bool ReadEOL( sal_uInt32 nMaxFillBits ); + bool ReadEOL(); bool Read2DTag(); diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 7b8f679ffa7d..ee786573f1a0 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1292,8 +1292,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( const css::uno::Reference pVisArea.reset(new css::awt::Rectangle); aAny >>= (*pVisArea); } - tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); - sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect, pVisArea.get() ); + sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, pVisArea.get() ); if ( nBlibId ) { AddOpt( ESCHER_Prop_pib, nBlibId, true ); @@ -1327,8 +1326,7 @@ bool EscherPropertyContainer::ImplCreateEmbeddedBmp( const OString& rUniqueId ) { EscherGraphicProvider aProvider; SvMemoryStream aMemStrm; - tools::Rectangle aRect; - if ( aProvider.GetBlibID( aMemStrm, rUniqueId, aRect ) ) + if ( aProvider.GetBlibID( aMemStrm, rUniqueId ) ) { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property @@ -1696,8 +1694,7 @@ bool EscherPropertyContainer::CreateGraphicProperties( // write out embedded graphic if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect ) { - tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); - const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get())); + const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, nullptr, pGraphicAttr.get())); if(nBlibId) { @@ -1718,9 +1715,8 @@ bool EscherPropertyContainer::CreateGraphicProperties( { EscherGraphicProvider aProvider; SvMemoryStream aMemStrm; - tools::Rectangle aRect; - if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get(), bOOxmlExport ) ) + if ( aProvider.GetBlibID( aMemStrm, aUniqueId, nullptr, pGraphicAttr.get(), bOOxmlExport ) ) { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property @@ -3811,9 +3807,7 @@ bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const css::uno { if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect ) { - tools::Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() ); - - sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId, aRect ); + sal_uInt32 nBlibId = pGraphicProvider->GetBlibID( *pPicOutStrm, aUniqueId ); if ( nBlibId ) { AddOpt( ESCHER_Prop_pib, nBlibId, true ); @@ -4190,7 +4184,7 @@ bool EscherGraphicProvider::GetPrefSize( const sal_uInt32 nBlibId, Size& rPrefSi } sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OString& rId, - const tools::Rectangle& /* rBoundRect */, const css::awt::Rectangle* pVisArea, + const css::awt::Rectangle* pVisArea, const GraphicAttr* pGraphicAttr, const bool bOOxmlExport ) { sal_uInt32 nBlibId = 0; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 5143f1a403f6..d51b2a811b78 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2239,7 +2239,6 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* rOutliner.SetStyleSheet( 0, pSheet ); } rOutliner.SetVertical( pTextObj->GetVertical() ); - const PPTParagraphObj* pPreviousParagraph = nullptr; for ( PPTParagraphObj* pPara = pTextObj->First(); pPara; pPara = pTextObj->Next() ) { sal_uInt32 nTextSize = pPara->GetTextSize(); @@ -2326,14 +2325,13 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* } boost::optional< sal_Int16 > oStartNumbering; SfxItemSet aParagraphAttribs( rOutliner.GetEmptyItemSet() ); - pPara->ApplyTo( aParagraphAttribs, oStartNumbering, (SdrPowerPointImport&)*this, nDestinationInstance, pPreviousParagraph ); + pPara->ApplyTo( aParagraphAttribs, oStartNumbering, (SdrPowerPointImport&)*this, nDestinationInstance ); sal_uInt32 nIsBullet2 = 0; //, nInstance = nDestinationInstance != 0xffffffff ? nDestinationInstance : pTextObj->GetInstance(); pPara->GetAttrib( PPT_ParaAttr_BulletOn, nIsBullet2, nDestinationInstance ); if ( !nIsBullet2 ) aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, false ) ); - pPreviousParagraph = pPara; if ( !aSelection.nStartPos ) // in PPT empty paragraphs never gets a bullet { aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, false ) ); @@ -2496,7 +2494,7 @@ void SdrPowerPointImport::SetPageNum( sal_uInt16 nPageNum, PptPageKind eKind ) Size SdrPowerPointImport::GetPageSize() const { - Size aRet( IsNoteOrHandout( nAktPageNum, eAktPageKind ) ? aDocAtom.GetNotesPageSize() : aDocAtom.GetSlidesPageSize() ); + Size aRet( IsNoteOrHandout( nAktPageNum ) ? aDocAtom.GetNotesPageSize() : aDocAtom.GetSlidesPageSize() ); Scale( aRet ); // PPT works with units of 576 dpi in any case. To avoid inaccuracies // I do round the last decimal digit away. @@ -2967,7 +2965,7 @@ const PptSlideLayoutAtom* SdrPowerPointImport::GetSlideLayoutAtom() const return nullptr; } -bool SdrPowerPointImport::IsNoteOrHandout( sal_uInt16 nPageNum, PptPageKind /*ePageKind*/) const +bool SdrPowerPointImport::IsNoteOrHandout( sal_uInt16 nPageNum ) const { bool bNote = eAktPageKind == PPT_NOTEPAGE; if ( eAktPageKind == PPT_MASTERPAGE ) @@ -3654,7 +3652,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx ImplGetExtNumberFormat( rManager, rNumberFormat, nLevel, nInstance, TSS_Type::Unknown, oStartNumbering, rCharLevel.mnFontHeight, nullptr ); if ( ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP ) && ( nBulletHeight > 0x7fff ) ) nBulletHeight = rCharLevel.mnFontHeight ? ((-((sal_Int16)nBulletHeight)) * 100 ) / rCharLevel.mnFontHeight : 100; - ImplGetNumberFormat( rManager, rNumberFormat, nLevel ); + ImplGetNumberFormat( rManager, rNumberFormat ); switch ( rNumberFormat.GetNumberingType() ) { case SVX_NUM_CHARS_UPPER_LETTER : @@ -3708,7 +3706,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx if ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP ) pParaObj->UpdateBulletRelSize( nBulletHeight ); if ( nHardCount ) - ImplGetNumberFormat( rManager, rNumberFormat, pParaObj->mxParaSet->mnDepth ); + ImplGetNumberFormat( rManager, rNumberFormat ); if ( nHardCount ) { @@ -3745,7 +3743,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx return nHardCount != 0; } -void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, sal_uInt32 /*nLevel*/) +void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat ) { vcl::Font aFont; PptFontEntityAtom* pAtom = rManager.GetFontEnityAtom( nBulletFont ); @@ -3821,7 +3819,7 @@ PPTCharSheet::PPTCharSheet( const PPTCharSheet& rAttr ) *this = rAttr; } -void PPTCharSheet::Read( SvStream& rIn, bool /*bMasterStyle*/, sal_uInt32 nLevel, bool /*bFirst*/) +void PPTCharSheet::Read( SvStream& rIn, sal_uInt32 nLevel) { // Zeichenattribute sal_uInt32 nCMask; @@ -3922,8 +3920,8 @@ void PPTParaSheet::Read( SdrPowerPointImport& #ifdef DBG_UTIL rManager #endif - , SvStream& rIn, bool /*bMasterStyle*/, - sal_uInt32 nLevel, bool bFirst ) + , SvStream& rIn + , sal_uInt32 nLevel, bool bFirst ) { // Absatzattribute sal_uInt16 nVal16, i, nMask16; @@ -4115,7 +4113,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd mpParaSheet[ TSS_Type::TextInShape ]->maParaLevel[ nLev ] = mpParaSheet[ TSS_Type::TextInShape ]->maParaLevel[ nLev - 1 ]; mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev ] = mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev - 1 ]; } - mpParaSheet[ TSS_Type::TextInShape ]->Read( rManager, rIn, true, nLev, bFirst ); + mpParaSheet[ TSS_Type::TextInShape ]->Read( rManager, rIn, nLev, bFirst ); if ( !nLev ) { // set paragraph defaults for instance 4 (TSS_Type::TextInShape) @@ -4131,7 +4129,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd rParaLevel.mnAsianLineBreak |= 4; } } - mpCharSheet[ TSS_Type::TextInShape ]->Read( rIn, true, nLev, bFirst ); + mpCharSheet[ TSS_Type::TextInShape ]->Read( rIn, nLev ); mpParaSheet[ TSS_Type::TextInShape ]->UpdateBulletRelSize( nLev, mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev ].mnFontHeight ); bFirst = false; nLev++; @@ -4229,8 +4227,8 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd sal_uInt16 nDontKnow; rIn.ReadUInt16( nDontKnow ); } - mpParaSheet[ nInstance ]->Read( rManager, rIn, true, nLev, bFirst ); - mpCharSheet[ nInstance ]->Read( rIn, true, nLev, bFirst ); + mpParaSheet[ nInstance ]->Read( rManager, rIn, nLev, bFirst ); + mpCharSheet[ nInstance ]->Read( rIn, nLev ); mpParaSheet[ nInstance ]->UpdateBulletRelSize( nLev, mpCharSheet[ nInstance ]->maCharLevel[ nLev ].mnFontHeight ); bFirst = false; nLev++; @@ -4312,7 +4310,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd mpParaSheet[ TSS_Type::TextInShape ]->maParaLevel[ nLev ] = mpParaSheet[ TSS_Type::TextInShape ]->maParaLevel[ nLev - 1 ]; mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev ] = mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev - 1 ]; } - mpParaSheet[ TSS_Type::TextInShape ]->Read( rManager, rIn, true, nLev, bFirst ); + mpParaSheet[ TSS_Type::TextInShape ]->Read( rManager, rIn, nLev, bFirst ); if ( !nLev ) { // set paragraph defaults for instance 4 (TSS_Type::TextInShape) @@ -4328,7 +4326,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd rParaLevel.mnAsianLineBreak |= 4; } } - mpCharSheet[ TSS_Type::TextInShape ]->Read( rIn, true, nLev, bFirst ); + mpCharSheet[ TSS_Type::TextInShape ]->Read( rIn, nLev ); mpParaSheet[ TSS_Type::TextInShape ]->UpdateBulletRelSize( nLev, mpCharSheet[ TSS_Type::TextInShape ]->maCharLevel[ nLev ].mnFontHeight ); bFirst = false; nLev++; @@ -4620,7 +4618,7 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, DffRecord } } -bool PPTTextRulerInterpreter::GetDefaultTab( sal_uInt32 /*nLevel*/, sal_uInt16& nValue ) const +bool PPTTextRulerInterpreter::GetDefaultTab( sal_uInt16& nValue ) const { if ( ! ( mxImplRuler->nFlags & 1 ) ) return false; @@ -5069,7 +5067,7 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, const DffRecordHeader aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs; if ( ( !( aSet.mnAttrSet & 1 << PPT_ParaAttr_BulletOfs ) ) && rRuler.GetBulletOfs( aParaPropSet.mxParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) ) aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs; - if ( rRuler.GetDefaultTab( aParaPropSet.mxParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) ) + if ( rRuler.GetDefaultTab( aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) ) aSet.mnAttrSet |= 1 << PPT_ParaAttr_DefaultTab; if ( ( nCharCount > nStringLen ) || ( nStringLen < nCharAnzRead + nCharCount ) ) @@ -6174,7 +6172,7 @@ bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& rRetValue, TSS_Ty return bIsHardAttribute; } -void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport& rManager, TSS_Type nDestinationInstance, const PPTParagraphObj* /*pPrev*/) +void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& rStartNumbering, SdrPowerPointImport& rManager, TSS_Type nDestinationInstance ) { sal_Int16 nVal2; sal_uInt32 nVal, nUpperDist, nLowerDist; |