diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-02 19:10:17 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-02 19:10:17 -0500 |
commit | 3e6eb38766e0a678edce22c9133f3d2d385e8ae6 (patch) | |
tree | 763579352604493e405bb18fc30017e66dac79f9 /sc/source | |
parent | 9a6e2a0af347b0243e8a718a2b39e8f69480b43f (diff) |
Fixed the "jump to precedents" and "jump to dependents" functions.
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index ca2fa5171ea1..cc0d3e9955bc 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -548,14 +548,15 @@ static void lcl_collectAllPredOrSuccRanges( ScDocument* pDoc = rDocShell.GetDocument(); vector<ScTokenRef> aRefTokens; ScRangeList aSrcRanges(rSrcRanges); - if ( aSrcRanges.empty() ) + if (aSrcRanges.empty()) return; ScRange* p = aSrcRanges.front(); ScDetectiveFunc aDetFunc(pDoc, p->aStart.Tab()); ScRangeList aDestRanges; - for ( size_t i = 1, ListSize = aSrcRanges.size(); i < ListSize; ++i ) + size_t i = 0; + for (size_t n = aSrcRanges.size(); i < n; ++i) { - p = aSrcRanges[ i ]; + p = aSrcRanges[i]; if (bPred) { aDetFunc.GetAllPreds( |