summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/diagram
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml/diagram')
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx2
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index fb1fc916c349..678299ea3abd 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -214,7 +214,7 @@ static void sortChildrenByZOrder(const ShapePtr& pShape)
[](const ShapePtr& a, const ShapePtr& b) { return a->getZOrder() < b->getZOrder(); });
// Apply also for children.
- for (auto& rChild : rChildren)
+ for (const auto& rChild : rChildren)
sortChildrenByZOrder(rChild);
}
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 12dcae71663c..14af84da6ac4 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -412,18 +412,18 @@ sal_Int32 AlgAtom::getVerticalShapesCount(const ShapePtr& rShape)
sal_Int32 nCount = 0;
if (nDir == XML_fromT || nDir == XML_fromB)
{
- for (ShapePtr& pChild : rShape->getChildren())
+ for (const ShapePtr& pChild : rShape->getChildren())
nCount += pChild->getVerticalShapesCount();
}
else if ((nDir == XML_fromL || nDir == XML_fromR) && nSecDir == XML_fromT)
{
- for (ShapePtr& pChild : rShape->getChildren())
+ for (const ShapePtr& pChild : rShape->getChildren())
nCount += pChild->getVerticalShapesCount();
nCount = (nCount + 1) / 2;
}
else
{
- for (ShapePtr& pChild : rShape->getChildren())
+ for (const ShapePtr& pChild : rShape->getChildren())
nCount = std::max(nCount, pChild->getVerticalShapesCount());
}
@@ -828,7 +828,7 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
// See if children requested more than 100% space in total: scale
// down in that case.
awt::Size aTotalSize;
- for (auto & aCurrShape : rShape->getChildren())
+ for (const auto & aCurrShape : rShape->getChildren())
{
oox::OptValue<sal_Int32> oWidth = findProperty(aProperties, aCurrShape->getInternalName(), XML_w);
oox::OptValue<sal_Int32> oHeight = findProperty(aProperties, aCurrShape->getInternalName(), XML_h);