only reset marked area when using find/replace all, fdo#53106

Change-Id: I151db5db7bcdf5295e1f67423de8926250ae8ea3
This commit is contained in:
Markus Mohrhard
2013-06-07 06:41:14 +02:00
parent d22b63e1a9
commit 62d85cfc67

View File

@@ -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)'