summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-20 09:32:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-20 12:04:41 +0200
commit07f9223daae92ac11be2382ecd0095e744f5695f (patch)
tree553f162c88e1d30dd7946daf62c0db7acb9a0469 /oox
parent6fea13e7a10272922ffdf74b65add10ecf8cec38 (diff)
loplugin:constvars in i18npool..opencl
Change-Id: I82738a18ff116fdc78f07b453c93b1b631632caf Reviewed-on: https://gerrit.libreoffice.org/77775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx2
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.cxx8
-rw-r--r--oox/source/drawingml/shape.cxx2
-rw-r--r--oox/source/vml/vmldrawing.cxx2
4 files changed, 7 insertions, 7 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);
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 960b63297902..b14cbef6ac15 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -468,7 +468,7 @@ static void lcl_createPresetShape(const uno::Reference<drawing::XShape>& xShape,
!aAdjGdList.empty() ? aAdjGdList.size() : 1 );
int nIndex = 0;
- for (auto& aEntry : aAdjGdList)
+ for (const auto& aEntry : aAdjGdList)
{
double fValue = aEntry.maFormula.toDouble();
// then: polar-handle, else: XY-handle
diff --git a/oox/source/vml/vmldrawing.cxx b/oox/source/vml/vmldrawing.cxx
index 2c5ce3887299..16e08c0e15a2 100644
--- a/oox/source/vml/vmldrawing.cxx
+++ b/oox/source/vml/vmldrawing.cxx
@@ -185,7 +185,7 @@ void Drawing::convertAndInsert() const
DBG_UNHANDLED_EXCEPTION("oox.vml");
}
}
- for ( auto& BoxItr : GroupBoxMap )
+ for ( const auto& BoxItr : GroupBoxMap )
{
const uno::Any aGroup( OUString("autoGroup_").concat(BoxItr.first) );
for ( auto RadioItr = RadioButtonMap.begin(); RadioItr != RadioButtonMap.end(); )