summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-24 14:29:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-25 08:12:17 +0200
commit4a340e36e8d3713806719351f455711c1254a178 (patch)
tree4be5ffdd176b2f45e4f549f7eb4d88da9225c18e /oox
parent50fc62ce76bc51f18b16eae937761d0a8872df3e (diff)
loplugin:constantparam
add the results files so I can just see the diff in future Change-Id: Ia20a1aa6418be95ed620719cde340c00b7b053e1 Reviewed-on: https://gerrit.libreoffice.org/37988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shape.cxx2
-rw-r--r--oox/source/vml/vmlshape.cxx6
-rw-r--r--oox/source/vml/vmlshapecontainer.cxx18
3 files changed, 12 insertions, 14 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index ef14ed900759..8805d7613754 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1293,7 +1293,7 @@ OUString Shape::finalizeServiceName( XmlFilterBase& rFilter, const OUString& rSe
OUString aGraphicPath;
if( !mxOleObjectInfo->maShapeId.isEmpty() )
if( ::oox::vml::Drawing* pVmlDrawing = rFilter.getVmlDrawing() )
- if( const ::oox::vml::ShapeBase* pVmlShape = pVmlDrawing->getShapes().getShapeById( mxOleObjectInfo->maShapeId, true ) )
+ if( const ::oox::vml::ShapeBase* pVmlShape = pVmlDrawing->getShapes().getShapeById( mxOleObjectInfo->maShapeId ) )
aGraphicPath = pVmlShape->getGraphicPath();
// import and store the graphic
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index badcc23f0392..6a3a5f8e1bec 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -282,7 +282,7 @@ void ShapeBase::finalizeFragmentImport()
OUString aType = maShapeModel.maType;
if (aType[ 0 ] == '#')
aType = aType.copy(1);
- if( const ShapeType* pShapeType = mrDrawing.getShapes().getShapeTypeById( aType, true ) )
+ if( const ShapeType* pShapeType = mrDrawing.getShapes().getShapeTypeById( aType ) )
maTypeModel.assignUsed( pShapeType->getTypeModel() );
}
}
@@ -1232,12 +1232,12 @@ void GroupShape::finalizeFragmentImport()
const ShapeType* GroupShape::getChildTypeById( const OUString& rShapeId ) const
{
- return mxChildren->getShapeTypeById( rShapeId, true );
+ return mxChildren->getShapeTypeById( rShapeId );
}
const ShapeBase* GroupShape::getChildById( const OUString& rShapeId ) const
{
- return mxChildren->getShapeById( rShapeId, true );
+ return mxChildren->getShapeById( rShapeId );
}
Reference< XShape > GroupShape::implConvertAndInsert( const Reference< XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
diff --git a/oox/source/vml/vmlshapecontainer.cxx b/oox/source/vml/vmlshapecontainer.cxx
index 055365202d5d..d2fea16ea195 100644
--- a/oox/source/vml/vmlshapecontainer.cxx
+++ b/oox/source/vml/vmlshapecontainer.cxx
@@ -77,29 +77,27 @@ void ShapeContainer::finalizeFragmentImport()
maShapes.forEachMem( &ShapeBase::finalizeFragmentImport );
}
-const ShapeType* ShapeContainer::getShapeTypeById( const OUString& rShapeId, bool bDeep ) const
+const ShapeType* ShapeContainer::getShapeTypeById( const OUString& rShapeId ) const
{
// search in own shape template list
if( const ShapeType* pType = maTypesById.get( rShapeId ).get() )
return pType;
// search deep in child shapes
- if( bDeep )
- for( ShapeVector::const_iterator aVIt = maShapes.begin(), aVEnd = maShapes.end(); aVIt != aVEnd; ++aVIt )
- if( const ShapeType* pType = (*aVIt)->getChildTypeById( rShapeId ) )
- return pType;
+ for( ShapeVector::const_iterator aVIt = maShapes.begin(), aVEnd = maShapes.end(); aVIt != aVEnd; ++aVIt )
+ if( const ShapeType* pType = (*aVIt)->getChildTypeById( rShapeId ) )
+ return pType;
return nullptr;
}
-const ShapeBase* ShapeContainer::getShapeById( const OUString& rShapeId, bool bDeep ) const
+const ShapeBase* ShapeContainer::getShapeById( const OUString& rShapeId ) const
{
// search in own shape list
if( const ShapeBase* pShape = maShapesById.get( rShapeId ).get() )
return pShape;
// search deep in child shapes
- if( bDeep )
- for( ShapeVector::const_iterator aVIt = maShapes.begin(), aVEnd = maShapes.end(); aVIt != aVEnd; ++aVIt )
- if( const ShapeBase* pShape = (*aVIt)->getChildById( rShapeId ) )
- return pShape;
+ for( ShapeVector::const_iterator aVIt = maShapes.begin(), aVEnd = maShapes.end(); aVIt != aVEnd; ++aVIt )
+ if( const ShapeBase* pShape = (*aVIt)->getChildById( rShapeId ) )
+ return pShape;
return nullptr;
}