[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Wed Jan 15 09:38:15 PST 2014
sc/source/ui/view/tabview3.cxx | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
New commits:
commit b0dd584efde8b9d75fb822a4ff63e96ca36b42c1
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
(cherry picked from commit 31533d47b24680f76e769949874d41f0fe27134f)
Reviewed-on: https://gerrit.libreoffice.org/7426
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 9553184..5c6784f 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1024,9 +1024,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