summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-10-06 16:59:52 +0200
committerAndras Timar <andras.timar@collabora.com>2020-10-27 23:00:06 +0100
commitbf56549ee3f7daa31ac1a4f4c2b3c6a2b9904eb8 (patch)
tree5cffe8070629f2914ad2c849bf1ecc83e5190e26 /chart2
parenta6ce1bb6c4ca60b53e97c43ef40df96643ef23a3 (diff)
Fire selection change event before sidebar is unregistered
Prevent us from crash in online using mobile phone when leaving chart edit mode with chart type modified. Change-Id: I8da70612786141a2c92b55a45822ef8ff5713e5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104605 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/ChartController.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 8fedb472ca04..cf45674304a8 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -746,6 +746,9 @@ void SAL_CALL ChartController::dispose()
{
m_bDisposed = true;
+ mpSelectionChangeHandler->selectionChanged(css::lang::EventObject());
+ mpSelectionChangeHandler->Disconnect();
+
if (getModel().is())
{
uno::Reference<ui::XSidebar> xSidebar = getSidebarFromModel(getModel());
@@ -754,8 +757,6 @@ void SAL_CALL ChartController::dispose()
sfx2::sidebar::SidebarController::unregisterSidebarForFrame(pSidebar, this);
}
}
- mpSelectionChangeHandler->selectionChanged(css::lang::EventObject());
- mpSelectionChangeHandler->Disconnect();
try
{