[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/source

Julien Nabet serval2412 at yahoo.fr
Thu Dec 7 13:36:01 UTC 2017


 sc/source/ui/view/tabview3.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c195e84385c8917fab6f2091cab24d33f1e2bc6f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Dec 5 22:01:26 2017 +0100

    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/45977
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 226eb8d91d4c..c90ea34daaae 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1810,8 +1810,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();
@@ -1867,6 +1865,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


More information about the Libreoffice-commits mailing list