summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-23 15:03:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-24 09:48:08 +0200
commit95e6c264e69e71d84e5a02ad7ab87ff944cfb17a (patch)
treec608e643aae76703ecaffd27ae3b6b0c15504014 /sc/source/ui
parent2a93d2a4af7bb72b155f91e18239cc1b5bc90a4e (diff)
reduce some unnecessary ScRangeList copying
and reduce unnecessary work in ScRangeList Change-Id: I0ee767fe28571f75f8a2ff980cea27c97c9797dc Reviewed-on: https://gerrit.libreoffice.org/54705 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 2e122db92332..3908a1a35279 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -511,14 +511,13 @@ static void lcl_collectAllPredOrSuccRanges(
{
ScDocument& rDoc = rDocShell.GetDocument();
vector<ScTokenRef> aRefTokens;
- ScRangeList aSrcRanges(rSrcRanges);
- if (aSrcRanges.empty())
+ if (rSrcRanges.empty())
return;
- ScRange const & rFrontRange = aSrcRanges.front();
+ ScRange const & rFrontRange = rSrcRanges.front();
ScDetectiveFunc aDetFunc(&rDoc, rFrontRange.aStart.Tab());
- for (size_t i = 0, n = aSrcRanges.size(); i < n; ++i)
+ for (size_t i = 0, n = rSrcRanges.size(); i < n; ++i)
{
- ScRange const & r = aSrcRanges[i];
+ ScRange const & r = rSrcRanges[i];
if (bPred)
{
aDetFunc.GetAllPreds(