summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-08-11 10:46:53 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-08-11 18:12:47 +0200
commit5aeb15e95d26ce6de28eb5f5933324828d553f41 (patch)
tree02ec28c990d4c0caf2fbb8e89f192d94082be412 /oox
parentde20853e5243843ac9f4c5927ce0b4cf0e407c15 (diff)
refactor to return the position to be set by the caller instead
no change in behavior intended Change-Id: I32043bdf1d29521d8503df315fa786236e272f7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155580 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/vml/vmlshape.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 607ddf5354b4..328abeba7875 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -484,10 +484,10 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS
return xShape;
}
-void ShapeBase::convertFormatting( const Reference< XShape >& rxShape ) const
+awt::Rectangle ShapeBase::convertFormatting( const Reference< XShape >& rxShape ) const
{
if( !rxShape.is() )
- return;
+ return awt::Rectangle();
/* Calculate shape rectangle. Applications may do something special
according to some imported shape client data (e.g. Excel cell anchor). */
@@ -495,11 +495,9 @@ void ShapeBase::convertFormatting( const Reference< XShape >& rxShape ) const
// convert the shape, if the calculated rectangle is not empty
if( (aShapeRect.Width > 0) || (aShapeRect.Height > 0) )
- {
- rxShape->setPosition( awt::Point( aShapeRect.X, aShapeRect.Y ) );
- rxShape->setSize( awt::Size( aShapeRect.Width, aShapeRect.Height ) );
convertShapeProperties( rxShape );
- }
+
+ return aShapeRect;
}
void ShapeBase::setContainer(ShapeContainer* pContainer) { mpContainer = pContainer; }