summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabview3.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-01-14 11:50:53 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-01-14 11:53:38 -0500
commit31533d47b24680f76e769949874d41f0fe27134f (patch)
tree091f0ca1722b8f890c251aa873bd4c8640885d8e /sc/source/ui/view/tabview3.cxx
parentf268b04b56ba840265b80e0dd41188a28791165b (diff)
fdo#73606: Avoid calling MarkDataChanged() when nothing is selected.
MarkDataChanged() is quite expensive & in theory unnecessary when no selection is present. Change-Id: I6967b914735462403a77568010532b37a1d8f333
Diffstat (limited to 'sc/source/ui/view/tabview3.cxx')
-rw-r--r--sc/source/ui/view/tabview3.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 5e591ef23cef..bee68c7afe1b 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1028,9 +1028,15 @@ void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
if (!bShift)
{
// Remove all marked data on cursor movement unless the Shift is locked.
- ScMarkData aData(aViewData.GetMarkData());
- aData.ResetMark();
- SetMarkData(aData);
+ ScMarkData& rMark = aViewData.GetMarkData();
+ bool bMarked = rMark.IsMarked() || rMark.IsMultiMarked();
+ if (bMarked)
+ {
+ rMark.ResetMark();
+ DoneBlockMode();
+ InitOwnBlockMode();
+ MarkDataChanged();
+ }
}
bool bSame = ( nCurX == aViewData.GetCurX() && nCurY == aViewData.GetCurY() );