summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.co.uk>2017-08-02 10:38:12 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-02 08:52:18 +0200
commit9561e0f392de3b99d8a0374486d4c0575b23180b (patch)
tree4a4212074a8695bdab2831703b268878c1b32054
parentd8e731adb8608aab17385e02f4441ed3122efa40 (diff)
tdf#109523: Do not forget to remove the chart model from...
data-provider's listener set when the chart model is getting disposed. Change-Id: Iafbe1426cdb42059cbb4e2955a257a09aa42ec8e Reviewed-on: https://gerrit.libreoffice.org/40663 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--chart2/source/model/main/ChartModel.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 8918c04cc2a4..a73aa04f49ef 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -548,6 +548,13 @@ void SAL_CALL ChartModel::dispose()
if ( m_xDiagram.is() )
ModifyListenerHelper::removeListener( m_xDiagram, this );
+ if ( m_xDataProvider.is() )
+ {
+ Reference<util::XModifyBroadcaster> xModifyBroadcaster( m_xDataProvider, uno::UNO_QUERY );
+ if ( xModifyBroadcaster.is() )
+ xModifyBroadcaster->removeModifyListener( this );
+ }
+
m_xDataProvider.clear();
m_xInternalDataProvider.clear();
m_xNumberFormatsSupplier.clear();