summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabvwsh4.cxx
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2017-04-19 22:37:13 +0200
committerMarco Cecchetti <mrcekets@gmail.com>2017-10-02 18:42:57 +0200
commit6388a50c1e3ef2e25132f63547bb91d08a0f416c (patch)
treee9eccab1f95b42eed7feb7bbb3e50ec912290678 /sc/source/ui/view/tabvwsh4.cxx
parentb9e89a201064b0c0aef5769766bce8d995fed46d (diff)
lok: sc: overlays and edit view misplaced by other view actions
The edit view, the cell cursor and the cell selection overlays become misplaced when another user inserts, deletes or resizes a row. The same is true for columns. The solution takes care of the current tab each view is displaying and of undo/redo actions. Change-Id: I24c94f774f3b18028c9356a904e1b14b07c5c61a Reviewed-on: https://gerrit.libreoffice.org/40016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Diffstat (limited to 'sc/source/ui/view/tabvwsh4.cxx')
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 244aec9bfc06..5f15c438b891 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1746,6 +1746,14 @@ ScTabViewShell::~ScTabViewShell()
SfxLokHelper::notifyOtherViews(this, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", "EMPTY");
SfxLokHelper::notifyOtherViews(this, LOK_CALLBACK_CELL_VIEW_CURSOR, "rectangle", "EMPTY");
+ // all to NULL, in case the TabView-dtor tries to access them
+ //! (should not really! ??!?!)
+ if (mpInputHandler)
+ mpInputHandler->SetDocumentDisposing(true);
+ // We end edit mode, before destroying the input handler and the edit engine
+ // and before end listening (in order to call ScTabViewShell::KillEditView())
+ mpInputHandler->EnterHandler();
+
ScDocShell* pDocSh = GetViewData().GetDocShell();
EndListening(*pDocSh);
EndListening(*GetViewFrame());
@@ -1756,11 +1764,6 @@ ScTabViewShell::~ScTabViewShell()
RemoveSubShell(); // all
SetWindow(nullptr);
- // all to NULL, in case the TabView-dtor tries to access them
- //! (should not really! ??!?!)
- if (mpInputHandler)
- mpInputHandler->SetDocumentDisposing(true);
-
DELETEZ(pFontworkBarShell);
DELETEZ(pExtrusionBarShell);
DELETEZ(pCellShell);