From 4cc0b82103e0b1d28a3ada59974aac0e7da18083 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 2 May 2017 11:37:07 +0200 Subject: loplugin:checkunusedparams in oox Change-Id: I95bce82654bd0da7ed76ebd22b107b870ed15a1f Reviewed-on: https://gerrit.libreoffice.org/37144 Tested-by: Jenkins Reviewed-by: Noel Grandin --- oox/source/drawingml/customshapegeometry.cxx | 2 +- oox/source/drawingml/customshapeproperties.cxx | 2 +- oox/source/drawingml/diagram/constraintlistcontext.cxx | 1 - oox/source/drawingml/diagram/constraintlistcontext.hxx | 2 +- oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 7 +------ oox/source/drawingml/diagram/diagramlayoutatoms.hxx | 1 - oox/source/drawingml/diagram/layoutnodecontext.cxx | 2 +- oox/source/drawingml/misccontexts.cxx | 8 ++++---- oox/source/drawingml/shape.cxx | 14 ++++---------- oox/source/drawingml/shapepropertiescontext.cxx | 2 +- oox/source/drawingml/shapepropertymap.cxx | 4 ++-- 11 files changed, 16 insertions(+), 29 deletions(-) (limited to 'oox/source/drawingml') diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index 471bca3f0327..d15337dd7cbd 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -1160,7 +1160,7 @@ ContextHandlerRef Path2DListContext::onCreateContext( sal_Int32 aElementToken, c } // CT_CustomGeometry2D -CustomShapeGeometryContext::CustomShapeGeometryContext( ContextHandler2Helper& rParent, const AttributeList& /* rAttribs */, CustomShapeProperties& rCustomShapeProperties ) +CustomShapeGeometryContext::CustomShapeGeometryContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties ) : ContextHandler2( rParent ) , mrCustomShapeProperties( rCustomShapeProperties ) { diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 0474ae68396f..a043dabb359a 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -111,7 +111,7 @@ static OUString GetConnectorShapeType( sal_Int32 nType ) return sType; } -void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFilterBase */, +void CustomShapeProperties::pushToPropSet( const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape, const awt::Size &aSize ) { if ( mnShapePresetType >= 0 ) diff --git a/oox/source/drawingml/diagram/constraintlistcontext.cxx b/oox/source/drawingml/diagram/constraintlistcontext.cxx index 71f17f65d65a..87a52f14446f 100644 --- a/oox/source/drawingml/diagram/constraintlistcontext.cxx +++ b/oox/source/drawingml/diagram/constraintlistcontext.cxx @@ -31,7 +31,6 @@ namespace oox { namespace drawingml { // CT_ConstraintLists ConstraintListContext::ConstraintListContext( ContextHandler2Helper& rParent, - const AttributeList&, const LayoutAtomPtr &pNode ) : ContextHandler2( rParent ) , mpNode( pNode ) diff --git a/oox/source/drawingml/diagram/constraintlistcontext.hxx b/oox/source/drawingml/diagram/constraintlistcontext.hxx index 730cd2d88a30..b1a9116aba33 100644 --- a/oox/source/drawingml/diagram/constraintlistcontext.hxx +++ b/oox/source/drawingml/diagram/constraintlistcontext.hxx @@ -29,7 +29,7 @@ namespace oox { namespace drawingml { class ConstraintListContext : public ::oox::core::ContextHandler2 { public: - ConstraintListContext( ContextHandler2Helper& rParent, const AttributeList& rAttributes, const LayoutAtomPtr &pNode ); + ConstraintListContext( ContextHandler2Helper& rParent, const LayoutAtomPtr &pNode ); virtual ~ConstraintListContext() override; virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const AttributeList& rAttribs ) override; diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 63ad0667f6f3..87fa59aef23c 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -145,7 +145,6 @@ void AlgAtom::accept( LayoutAtomVisitor& rVisitor ) } void AlgAtom::layoutShape( const ShapePtr& rShape, - const Diagram& /*rDgm*/, const OUString& rName ) const { switch(mnType) @@ -513,7 +512,6 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const Diagram& rDgm, sal_uI class ShapeLayoutingVisitor : public LayoutAtomVisitor { ShapePtr mpParentShape; - const Diagram& mrDgm; OUString maName; virtual void visit(ConstraintAtom& rAtom) override; @@ -525,10 +523,8 @@ class ShapeLayoutingVisitor : public LayoutAtomVisitor public: ShapeLayoutingVisitor(const ShapePtr& rParentShape, - const Diagram& rDgm, const OUString& rName) : mpParentShape(rParentShape), - mrDgm(rDgm), maName(rName) {} @@ -658,7 +654,6 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom) // layout shapes - now all child shapes are created ShapeLayoutingVisitor aLayoutingVisitor(pCurrParent, - mrDgm, rAtom.getName()); aLayoutingVisitor.defaultVisit(rAtom); } @@ -678,7 +673,7 @@ void ShapeLayoutingVisitor::visit(ConstraintAtom& /*rAtom*/) void ShapeLayoutingVisitor::visit(AlgAtom& rAtom) { - rAtom.layoutShape(mpParentShape,mrDgm,maName); + rAtom.layoutShape(mpParentShape, maName); } void ShapeLayoutingVisitor::visit(ForEachAtom& /*rAtom*/) diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx index de8d80b5be51..68cff05e85c8 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx @@ -158,7 +158,6 @@ public: void addParam( sal_Int32 nType, sal_Int32 nVal ) { maMap[nType]=nVal; } void layoutShape( const ShapePtr& rShape, - const Diagram& rDgm, const OUString& rName ) const; private: sal_Int32 mnType; diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx index 3bf6d78e7624..d96a49b0529e 100644 --- a/oox/source/drawingml/diagram/layoutnodecontext.cxx +++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx @@ -297,7 +297,7 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement, } case DGM_TOKEN( constrLst ): // CT_Constraints - return new ConstraintListContext( *this, rAttribs, mpNode ); + return new ConstraintListContext( *this, mpNode ); case DGM_TOKEN( presOf ): { // CT_PresentationOf diff --git a/oox/source/drawingml/misccontexts.cxx b/oox/source/drawingml/misccontexts.cxx index 012c3f34370f..f5dc16d19b05 100644 --- a/oox/source/drawingml/misccontexts.cxx +++ b/oox/source/drawingml/misccontexts.cxx @@ -37,7 +37,7 @@ namespace oox { namespace drawingml { SolidFillContext::SolidFillContext( ContextHandler2Helper& rParent, - const AttributeList&, FillProperties& rFillProps ) : + FillProperties& rFillProps ) : ColorContext( rParent, rFillProps.maFillColor ) { } @@ -181,7 +181,7 @@ ContextHandlerRef BlipContext::onCreateContext( return new ColorChangeContext( *this, rAttribs, mrBlipProps ); case A_TOKEN( duotone ): - return new DuotoneContext( *this, rAttribs, mrBlipProps ); + return new DuotoneContext( *this, mrBlipProps ); case A_TOKEN( extLst ): return new BlipExtensionContext( *this, mrBlipProps ); @@ -198,7 +198,7 @@ ContextHandlerRef BlipContext::onCreateContext( } DuotoneContext::DuotoneContext( ContextHandler2Helper& rParent, - const AttributeList& /*rAttribs*/, BlipFillProperties& rBlipProps ) : + BlipFillProperties& rBlipProps ) : ContextHandler2( rParent ), mrBlipProps( rBlipProps ), mnColorIndex( 0 ) @@ -279,7 +279,7 @@ ContextHandlerRef FillPropertiesContext::createFillContext( switch( nElement ) { case A_TOKEN( noFill ): { rFillProps.moFillType = getBaseToken( nElement ); return nullptr; }; - case A_TOKEN( solidFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new SolidFillContext( rParent, rAttribs, rFillProps ); }; + case A_TOKEN( solidFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new SolidFillContext( rParent, rFillProps ); }; case A_TOKEN( gradFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new GradientFillContext( rParent, rAttribs, rFillProps.maGradientProps ); }; case A_TOKEN( pattFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new PatternFillContext( rParent, rAttribs, rFillProps.maPatternProps ); }; case A_TOKEN( blipFill ): { rFillProps.moFillType = getBaseToken( nElement ); return new BlipFillContext( rParent, rAttribs, rFillProps.maBlipProps ); }; diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 198986d88da2..ef14ed900759 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -263,7 +263,7 @@ void Shape::addShape( // if this is a group shape, we have to add also each child shape Reference< XShapes > xShapes( xShape, UNO_QUERY ); if ( xShapes.is() ) - addChildren( rFilterBase, *this, pTheme, xShapes, awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap, aMatrix ); + addChildren( rFilterBase, *this, pTheme, xShapes, pShapeMap, aMatrix ); if( meFrameType == FRAMETYPE_DIAGRAM ) { @@ -319,14 +319,9 @@ void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText ) void Shape::addChildren( ::oox::core::XmlFilterBase& rFilterBase, const Theme* pTheme, const Reference< XShapes >& rxShapes, - basegfx::B2DHomMatrix& aTransformation, - const awt::Rectangle* pShapeRect ) + basegfx::B2DHomMatrix& aTransformation ) { - addChildren(rFilterBase, *this, pTheme, rxShapes, - pShapeRect ? - *pShapeRect : - awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), - nullptr, aTransformation); + addChildren(rFilterBase, *this, pTheme, rxShapes, nullptr, aTransformation); } struct ActionLockGuard @@ -354,7 +349,6 @@ void Shape::addChildren( Shape& rMaster, const Theme* pTheme, const Reference< XShapes >& rxShapes, - const awt::Rectangle&, ShapeIdMap* pShapeMap, const basegfx::B2DHomMatrix& aTransformation ) { @@ -1090,7 +1084,7 @@ Reference< XShape > const & Shape::createAndInsert( // for these ==cscode== and ==csdata== markers, so don't "clean up" these SAL_INFOs SAL_INFO("oox.cscode", "==cscode== shape name: '" << msName << "'"); SAL_INFO("oox.csdata", "==csdata== shape name: '" << msName << "'"); - mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape, maSize ); + mpCustomShapePropertiesPtr->pushToPropSet( xSet, mxShape, maSize ); } else if( getTextBody() ) getTextBody()->getTextProperties().pushVertSimulation(); diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx index 82f5207d91e4..80b9201fbaff 100644 --- a/oox/source/drawingml/shapepropertiescontext.cxx +++ b/oox/source/drawingml/shapepropertiescontext.cxx @@ -61,7 +61,7 @@ ContextHandlerRef ShapePropertiesContext::onCreateContext( sal_Int32 aElementTok // GeometryGroup case A_TOKEN( custGeom ): // custom geometry "CT_CustomGeometry2D" - return new CustomShapeGeometryContext( *this, rAttribs, *(mrShape.getCustomShapeProperties()) ); + return new CustomShapeGeometryContext( *this, *mrShape.getCustomShapeProperties() ); case A_TOKEN( prstGeom ): // preset geometry "CT_PresetGeometry2D" { diff --git a/oox/source/drawingml/shapepropertymap.cxx b/oox/source/drawingml/shapepropertymap.cxx index aca31842bae9..2b87d77f3428 100644 --- a/oox/source/drawingml/shapepropertymap.cxx +++ b/oox/source/drawingml/shapepropertymap.cxx @@ -104,7 +104,7 @@ bool ShapePropertyMap::setAnyProperty( ShapeProperty ePropId, const Any& rValue return setFillBitmapUrl( nPropId, rValue ); case ShapeProperty::FillBitmapNameFromUrl: - return setFillBitmapNameFromUrl( nPropId, rValue ); + return setFillBitmapNameFromUrl( rValue ); default:; // suppress compiler warnings } @@ -193,7 +193,7 @@ bool ShapePropertyMap::setFillBitmapUrl( sal_Int32 nPropId, const Any& rValue ) return false; } -bool ShapePropertyMap::setFillBitmapNameFromUrl( sal_Int32 /*nPropId*/, const Any& rValue ) +bool ShapePropertyMap::setFillBitmapNameFromUrl( const Any& rValue ) { if( rValue.has< OUString >() ) { -- cgit