diff options
author | Andrzej Hunt <andrzej@ahunt.org> | 2015-11-21 08:14:05 -0800 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-01-05 11:06:52 +0000 |
commit | 9d0b06e9f728d01a2d2908e1e56cb4220cd414d5 (patch) | |
tree | 072f69061281445cf3591f55592b87402dcd14d9 /sc/source/ui/view/gridwin.cxx | |
parent | d202f851717bb5a8fe5fed98f747a1fd164d3225 (diff) |
new loplugin rangedforcopy - use reference in range based for
Inspired by 6e6ae9803796b120e95f6e89575e03c5fd0ed3c2
Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01
Reviewed-on: https://gerrit.libreoffice.org/20190
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/source/ui/view/gridwin.cxx')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index ecfd538ad142..bb1ae4311d43 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5953,8 +5953,11 @@ static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pD Rectangle aBoundingBox; std::vector<OString> aRectangles; - for (auto aRectangle : rRectangles) + for (const auto& rRectangle : rRectangles) { + // We explicitly create a copy, since we need to expand + // the rectangle before coordinate conversion + Rectangle aRectangle(rRectangle); aRectangle.Right() += 1; aRectangle.Bottom() += 1; |