summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-12-05 22:01:26 +0100
committerJulien Nabet <serval2412@yahoo.fr>2017-12-06 19:30:39 +0100
commitc9f712bdfbad1ad16f0721d889167eb232917eab (patch)
tree68442a41cf7d344719b1622e3593e3fcbd1ae8e6
parent291ea673180a37912697646850959b3f6553cc7a (diff)
tdf#114228: fix crash when deleting sheet in specific case
1. Create a brand new ods file 2. Select L12 (so cursor is obviously on sheet1 L12) 3. Create a brand new sheet (and cursor is on sheet2 A1) 4. Delete sheet2 It crashes with gtk3, see https://bugs.documentfoundation.org/attachment.cgi?id=138199 As indicated in https://bugs.documentfoundation.org/show_bug.cgi?id=114228#c5 the tab number is wrong Reporting cursor management later in ScTabView::SetTabNo prevents from the crash Change-Id: Iea307267d2cdcf1c01f7e72f45b6a68aeef26fa1 Reviewed-on: https://gerrit.libreoffice.org/45911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--sc/source/ui/view/tabview3.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index b66b3b6fd5e1..69bc8035b421 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1819,8 +1819,6 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
// UpdateShow before SetCursor, so that UpdateAutoFillMark finds the correct
// window (is called from SetCursor)
UpdateShow();
- aViewData.ResetOldCursor();
- SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), true );
SfxBindings& rBindings = aViewData.GetBindings();
ScMarkData& rMark = aViewData.GetMarkData();
@@ -1876,6 +1874,9 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
UpdateVisibleRange();
aViewData.GetViewShell()->WindowChanged(); // if the active window has changed
+ aViewData.ResetOldCursor();
+ SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), true );
+
if ( !bUnoRefDialog )
aViewData.GetViewShell()->DisconnectAllClients(); // important for floating frames
else