summaryrefslogtreecommitdiff
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-28 13:36:23 +0100
commit2be854e8441b870a2e9bed2d583d4f7aeb73d5d9 (patch)
tree213e869cd19ba93c21574dee2784d3da9f98611b
parentd67222fcc614127ced2c66c2aa718d41478f6141 (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/+/104035 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-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 3d88f3aadd1a..fb1ed3efabc1 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -754,6 +754,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());
@@ -762,8 +765,6 @@ void SAL_CALL ChartController::dispose()
sfx2::sidebar::SidebarController::unregisterSidebarForFrame(pSidebar, this);
}
}
- mpSelectionChangeHandler->selectionChanged(css::lang::EventObject());
- mpSelectionChangeHandler->Disconnect();
try
{