[Libreoffice-commits] core.git: sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Tue Jan 14 08:52:41 PST 2014
sc/source/ui/view/tabview3.cxx | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
New commits:
commit 31533d47b24680f76e769949874d41f0fe27134f
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Tue Jan 14 11:50:53 2014 -0500
fdo#73606: Avoid calling MarkDataChanged() when nothing is selected.
MarkDataChanged() is quite expensive & in theory unnecessary when no
selection is present.
Change-Id: I6967b914735462403a77568010532b37a1d8f333
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 5e591ef..bee68c7 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() );
More information about the Libreoffice-commits
mailing list