diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-29 08:58:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-29 15:12:26 +0100 |
commit | 41eeaace84b45c803fff3ebd5ab981f0ad09393b (patch) | |
tree | 0a0290bcc852507efa8241bd0853ebdd84ec9cbf /sc/source/ui/Accessibility | |
parent | a2f7678171618d958e3c387718cd389bea63eaeb (diff) |
loplugin:oncevar
Change-Id: Iba892694acb378887a1d15ab59104c55f591f0bd
Reviewed-on: https://gerrit.libreoffice.org/62498
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/Accessibility')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleDocument.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index fc59f7a4acc8..6996c234858b 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -419,8 +419,7 @@ void ScChildrenShapes::Notify(SfxBroadcaster&, const SfxHint& rHint) uno::Reference<drawing::XShape> xShape (pObj->getUnoShape(), uno::UNO_QUERY); if (xShape.is()) { - ScShapeDataLess aLess; - std::sort(maZOrderedShapes.begin(), maZOrderedShapes.end(), aLess); // sort, because the z index or layer could be changed + std::sort(maZOrderedShapes.begin(), maZOrderedShapes.end(), ScShapeDataLess()); // sort, because the z index or layer could be changed CheckWhetherAnchorChanged(xShape); } } @@ -958,8 +957,7 @@ bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X { pFocusedObj = GetSdrObjectFromXShape(aShapesList[0]->xShape); } - ScShapeDataLess aLess; - std::sort(aShapesList.begin(), aShapesList.end(), aLess); + std::sort(aShapesList.begin(), aShapesList.end(), ScShapeDataLess()); SortedShapes vecSelectedShapeAdd; SortedShapes vecSelectedShapeRemove; bool bHasSelect=false; @@ -1312,8 +1310,7 @@ bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xShape, bool bResult(false); ScAccessibleShapeData aShape; aShape.xShape = xShape; - ScShapeDataLess aLess; - rItr = std::lower_bound(maZOrderedShapes.begin(), maZOrderedShapes.end(), &aShape, aLess); + rItr = std::lower_bound(maZOrderedShapes.begin(), maZOrderedShapes.end(), &aShape, ScShapeDataLess()); if ((rItr != maZOrderedShapes.end()) && (*rItr != nullptr) && ((*rItr)->xShape.get() == xShape.get())) bResult = true; // if the shape is found |