summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/sidebar/ChartAreaPanel.cxx6
-rw-r--r--chart2/source/controller/sidebar/ChartAxisPanel.cxx6
-rw-r--r--chart2/source/controller/sidebar/ChartLinePanel.cxx6
-rw-r--r--chart2/source/controller/sidebar/ChartSeriesPanel.cxx6
4 files changed, 24 insertions, 0 deletions
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index b2e134dcde88..1f6230709efb 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -513,6 +513,12 @@ void ChartAreaPanel::updateModel(
xBroadcaster->removeModifyListener(mxListener);
}
+ css::uno::Reference<css::view::XSelectionSupplier> oldSelectionSupplier(
+ mxModel->getCurrentController(), css::uno::UNO_QUERY);
+ if (oldSelectionSupplier.is()) {
+ oldSelectionSupplier->removeSelectionChangeListener(mxSelectionListener.get());
+ }
+
mxModel = xModel;
mbModelValid = true;
diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.cxx b/chart2/source/controller/sidebar/ChartAxisPanel.cxx
index 692c26a07ad9..a4621378cedf 100644
--- a/chart2/source/controller/sidebar/ChartAxisPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAxisPanel.cxx
@@ -327,6 +327,12 @@ void ChartAxisPanel::updateModel(
xBroadcaster->removeModifyListener(mxModifyListener);
}
+ css::uno::Reference<css::view::XSelectionSupplier> oldSelectionSupplier(
+ mxModel->getCurrentController(), css::uno::UNO_QUERY);
+ if (oldSelectionSupplier.is()) {
+ oldSelectionSupplier->removeSelectionChangeListener(mxSelectionListener.get());
+ }
+
mxModel = xModel;
mbModelValid = true;
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index 944b709cac56..449b3efa278f 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -214,6 +214,12 @@ void ChartLinePanel::updateModel(
xBroadcaster->removeModifyListener(mxListener);
}
+ css::uno::Reference<css::view::XSelectionSupplier> oldSelectionSupplier(
+ mxModel->getCurrentController(), css::uno::UNO_QUERY);
+ if (oldSelectionSupplier.is()) {
+ oldSelectionSupplier->removeSelectionChangeListener(mxSelectionListener.get());
+ }
+
mxModel = xModel;
mbModelValid = true;
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 365f42adafcb..29c5d7be18ff 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -420,6 +420,12 @@ void ChartSeriesPanel::updateModel(
xBroadcaster->removeModifyListener(mxListener);
}
+ css::uno::Reference<css::view::XSelectionSupplier> oldSelectionSupplier(
+ mxModel->getCurrentController(), css::uno::UNO_QUERY);
+ if (oldSelectionSupplier.is()) {
+ oldSelectionSupplier->removeSelectionChangeListener(mxSelectionListener.get());
+ }
+
mxModel = xModel;
mbModelValid = true;