summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx5
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx14
2 files changed, 8 insertions, 11 deletions
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index 7927b7aa6945..ce8a7cfb1db4 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -90,13 +90,12 @@ static void removeUnneededGroupShapes(const ShapePtr& pShape)
{
std::vector<ShapePtr>& rChildren = pShape->getChildren();
- rChildren.erase(std::remove_if(rChildren.begin(), rChildren.end(),
+ std::erase_if(rChildren,
[](const ShapePtr& aChild) {
return aChild->getServiceName()
== "com.sun.star.drawing.GroupShape"
&& aChild->getChildren().empty();
- }),
- rChildren.end());
+ });
for (const auto& pChild : rChildren)
{
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index f9fce3b1f837..6ee4b88322d0 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -1125,13 +1125,12 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const std::vector<Constraint>&
if (mnType != XML_lin)
{
// TODO Handle spacing from constraints for non-lin algorithms as well.
- rShape->getChildren().erase(
- std::remove_if(rShape->getChildren().begin(), rShape->getChildren().end(),
+ std::erase_if(
+ rShape->getChildren(),
[](const ShapePtr& aChild) {
return aChild->getServiceName() == "com.sun.star.drawing.GroupShape"
&& aChild->getChildren().empty();
- }),
- rShape->getChildren().end());
+ });
}
switch(mnType)
@@ -1541,14 +1540,13 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const std::vector<Constraint>&
else
{
// TODO Handle spacing from constraints without rules as well.
- rShape->getChildren().erase(
- std::remove_if(rShape->getChildren().begin(), rShape->getChildren().end(),
+ std::erase_if(
+ rShape->getChildren(),
[](const ShapePtr& aChild) {
return aChild->getServiceName()
== "com.sun.star.drawing.GroupShape"
&& aChild->getChildren().empty();
- }),
- rShape->getChildren().end());
+ });
fCount = rShape->getChildren().size();
}
awt::Size aChildSize = rShape->getSize();