diff options
author | Laurent Godard <lgodard.libre@laposte.net> | 2014-11-04 12:42:15 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-11-04 13:21:07 +0000 |
commit | fd1b1a153516934699cd7d87437b13511c9f9d14 (patch) | |
tree | a947a5ca8692465ad7b87310877336efd49edf04 /sc | |
parent | 99df39b5206be1d03416142c97e77ebfd823b9d5 (diff) |
calc ScTable::ReplaceAll : avoid calling GetLastDataPos uselessly
Change-Id: Ibb6fb9ea3e524a889de96f560e308a4aa54fa2af
Reviewed-on: https://gerrit.libreoffice.org/12248
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/table6.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx index e4e721879249..cf02241ec117 100644 --- a/sc/source/core/data/table6.cxx +++ b/sc/source/core/data/table6.cxx @@ -496,10 +496,14 @@ bool ScTable::ReplaceAll( SCCOL nCol = 0; SCROW nRow = -1; + SCCOL nLastCol; + SCROW nLastRow; + GetLastDataPos(nLastCol, nLastRow); + bool bEverFound = false; while (true) { - bool bFound = Search(rSearchItem, nCol, nRow, rMark, rUndoStr, pUndoDoc); + bool bFound = Search(rSearchItem, nCol, nRow, nLastCol, nLastRow, rMark, rUndoStr, pUndoDoc); if (bFound) { |