summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-03-11 16:07:34 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-03-11 17:34:22 +0000
commitcdd4a9fa539bcfc11dda35adda4b290ceab9e0b0 (patch)
tree8fdc4be9bf097ca0c3ee95c1f2a465e4e451b6b1 /oox
parent28e61b634353110445e334ccaa415d7fb6629d62 (diff)
Passing shaperect to addShape function is useless
Shaperect is ignored by createAndInsert() so it has no effect at all. Also when this parameter is set the size and position is set using the same shaperect, so don't need to pass it also as a parameter. Change-Id: I35a7953f3eda1bdd19af6f3e77c55b5c7e1f7161 Reviewed-on: https://gerrit.libreoffice.org/35073 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/chartdrawingfragment.cxx2
-rw-r--r--oox/source/drawingml/shape.cxx8
-rw-r--r--oox/source/ppt/pptshape.cxx2
-rw-r--r--oox/source/ppt/slidepersist.cxx2
4 files changed, 6 insertions, 8 deletions
diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx
index 00bc99f7bd8e..d5140c116071 100644
--- a/oox/source/drawingml/chart/chartdrawingfragment.cxx
+++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx
@@ -222,7 +222,7 @@ void ChartDrawingFragment::onEndElement()
mxShape->setSize(awt::Size(aShapeRectEmu32.Width, aShapeRectEmu32.Height));
basegfx::B2DHomMatrix aMatrix;
- mxShape->addShape( getFilter(), getFilter().getCurrentTheme(), mxDrawPage, aMatrix, mxShape->getFillProperties(), &aShapeRectEmu32 );
+ mxShape->addShape( getFilter(), getFilter().getCurrentTheme(), mxDrawPage, aMatrix, mxShape->getFillProperties() );
}
}
mxShape.reset();
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index e60d487b3525..198986d88da2 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -243,7 +243,6 @@ void Shape::addShape(
const Reference< XShapes >& rxShapes,
const basegfx::B2DHomMatrix& aTransformation,
FillProperties& rShapeOrParentShapeFillProps,
- const awt::Rectangle* pShapeRect,
ShapeIdMap* pShapeMap )
{
SAL_INFO("oox.drawingml", "Shape::addShape: id='" << msId << "'");
@@ -254,7 +253,7 @@ void Shape::addShape(
if( !sServiceName.isEmpty() )
{
basegfx::B2DHomMatrix aMatrix( aTransformation );
- Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, false, false, aMatrix, rShapeOrParentShapeFillProps ) );
+ Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, false, false, aMatrix, rShapeOrParentShapeFillProps ) );
if( pShapeMap && !msId.isEmpty() )
{
@@ -264,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, pShapeRect ? *pShapeRect : awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap, aMatrix );
+ addChildren( rFilterBase, *this, pTheme, xShapes, awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap, aMatrix );
if( meFrameType == FRAMETYPE_DIAGRAM )
{
@@ -393,7 +392,7 @@ void Shape::addChildren(
std::vector< ShapePtr >::iterator aIter( rMaster.maChildren.begin() );
while( aIter != rMaster.maChildren.end() ) {
(*aIter)->setMasterTextListStyle( mpMasterTextListStyle );
- (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, getFillProperties(), nullptr, pShapeMap );
+ (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, getFillProperties(), pShapeMap );
}
}
@@ -402,7 +401,6 @@ Reference< XShape > const & Shape::createAndInsert(
const OUString& rServiceName,
const Theme* pTheme,
const css::uno::Reference< css::drawing::XShapes >& rxShapes,
- const awt::Rectangle* /* pShapeRect */,
bool bClearText,
bool bDoNotInsertEmptyTextBody,
basegfx::B2DHomMatrix& aParentTransformation,
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 80a056e1a899..bfcf8a21d832 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -331,7 +331,7 @@ void PPTShape::addShape(
} else
setMasterTextListStyle( aMasterTextListStyle );
- Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, nullptr, bClearText, mpPlaceholder.get() != nullptr, aTransformation, getFillProperties() ) );
+ Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, bClearText, mpPlaceholder.get() != nullptr, aTransformation, getFillProperties() ) );
if (!rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && ((sal_Int32)mnSubType == XML_title))
{
try
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 038c2e374767..b8fd28e8e538 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -147,7 +147,7 @@ void SlidePersist::createXShapes( XmlFilterBase& rFilterBase )
if ( pPPTShape )
pPPTShape->addShape( rFilterBase, *this, getTheme().get(), xShapes, aTransformation, &getShapeMap() );
else
- (*aChildIter)->addShape( rFilterBase, getTheme().get(), xShapes, aTransformation, maShapesPtr->getFillProperties(), nullptr, &getShapeMap() );
+ (*aChildIter)->addShape( rFilterBase, getTheme().get(), xShapes, aTransformation, maShapesPtr->getFillProperties(), &getShapeMap() );
}
}