diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-26 13:35:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-26 18:02:19 +0100 |
commit | b624b13b3d5a8e573c7de8158cadc66b1982d157 (patch) | |
tree | 56948e6a5e8d7f5a7cbde6328a27f13ecd8a72bc /oox/source/drawingml | |
parent | 8136620ff432bf17815bef1f88c7531edb839d23 (diff) |
loplugin:flatten
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index bc24b0322059..f5191b54408a 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -712,17 +712,17 @@ void CompositeAlg::layoutShapeChildren(AlgAtom& rAlg, const ShapePtr& rShape, } // See if all vertical space is used or we have to center the content. - if (nVertMin >= 0 && nVertMin <= nVertMax && nVertMax <= rParent[XML_h]) + if (!(nVertMin >= 0 && nVertMin <= nVertMax && nVertMax <= rParent[XML_h])) + return; + + sal_Int32 nDiff = rParent[XML_h] - (nVertMax - nVertMin); + if (nDiff > 0) { - sal_Int32 nDiff = rParent[XML_h] - (nVertMax - nVertMin); - if (nDiff > 0) + for (auto& aCurrShape : rShape->getChildren()) { - for (auto& aCurrShape : rShape->getChildren()) - { - awt::Point aPosition = aCurrShape->getPosition(); - aPosition.Y += nDiff / 2; - aCurrShape->setPosition(aPosition); - } + awt::Point aPosition = aCurrShape->getPosition(); + aPosition.Y += nDiff / 2; + aCurrShape->setPosition(aPosition); } } } |