summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-06-07 06:41:14 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-06-07 06:44:53 +0200
commitd28bb70875e9191ff20b6b5751695f583b73a4f0 (patch)
tree4d1bc452d4b626517d513abb63cb033ac001a015 /sc/source/ui
parentd445d7a60daa40b7d304fa24df9b06144b038c21 (diff)
only reset marked area when using find/replace all, fdo#53106
Change-Id: I151db5db7bcdf5295e1f67423de8926250ae8ea3
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/view/viewfun2.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 0b6f48c5f80b..a042d0df07dd 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1655,12 +1655,15 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
aUndoStr, pUndoDoc.release(), pSearchItem ) );
}
- rMark.ResetMark();
- for (size_t i = 0, n = aMatchedRanges.size(); i < n; ++i)
+ if (nCommand == SVX_SEARCHCMD_FIND_ALL || nCommand == SVX_SEARCHCMD_REPLACE_ALL)
{
- const ScRange& r = *aMatchedRanges[i];
- if (r.aStart.Tab() == nTab)
- rMark.SetMultiMarkArea(r);
+ rMark.ResetMark();
+ for (size_t i = 0, n = aMatchedRanges.size(); i < n; ++i)
+ {
+ const ScRange& r = *aMatchedRanges[i];
+ if (r.aStart.Tab() == nTab)
+ rMark.SetMultiMarkArea(r);
+ }
}
break; // break 'while (TRUE)'