diff options
author | Dennis Francis <dennis.francis@collabora.co.uk> | 2017-08-02 10:38:12 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-08-02 08:52:18 +0200 |
commit | 9561e0f392de3b99d8a0374486d4c0575b23180b (patch) | |
tree | 4a4212074a8695bdab2831703b268878c1b32054 /chart2/source/model | |
parent | d8e731adb8608aab17385e02f4441ed3122efa40 (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>
Diffstat (limited to 'chart2/source/model')
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 7 |
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(); |