summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-06-07 06:41:14 +0200
committerKohei Yoshida <kohei.yoshida@suse.de>2013-06-07 12:07:28 +0000
commit728d6cea85e68a563822b6017707a98085a7058c (patch)
treee2b79384237af73540bb81ba557961b3447dcae2 /sc/source/ui
parent6fadc3a2d8d95088bc07f9064bf262f8c7d30577 (diff)
only reset marked area when using find/replace all, fdo#53106
Change-Id: I151db5db7bcdf5295e1f67423de8926250ae8ea3 Reviewed-on: https://gerrit.libreoffice.org/4185 Reviewed-by: Kohei Yoshida <kohei.yoshida@suse.de> Tested-by: Kohei Yoshida <kohei.yoshida@suse.de>
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 590e1340e9b1..2a02c94d0c0c 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1647,12 +1647,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)'