summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/chartlis.cxx
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2002-01-22 07:26:43 +0000
committerNiklas Nebel <nn@openoffice.org>2002-01-22 07:26:43 +0000
commita3d300c52a39209a795c33bd5fabe9088df34267 (patch)
tree17d2a94e4653fc66d9df0c9d0082175a1c3354c9 /sc/source/core/tool/chartlis.cxx
parentaf99b7da7e45276a3c6763f93b94c988baec29ae (diff)
#96783# ChartListenerCollection dtor: delete elements before Timer dtor is called
Diffstat (limited to 'sc/source/core/tool/chartlis.cxx')
-rw-r--r--sc/source/core/tool/chartlis.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index bfcf255fd529..712f8f997b90 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: chartlis.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: nn $ $Date: 2001-07-20 10:03:57 $
+ * last change: $Author: nn $ $Date: 2002-01-22 08:26:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -307,6 +307,16 @@ ScChartListenerCollection::ScChartListenerCollection(
aTimer.SetTimeoutHdl( LINK( this, ScChartListenerCollection, TimerHdl ) );
}
+ScChartListenerCollection::~ScChartListenerCollection()
+{
+ // #96783# remove ChartListener objects before aTimer dtor is called, because
+ // ScChartListener::EndListeningTo may cause ScChartListenerCollection::StartTimer
+ // to be called if an empty ScNoteCell is deleted
+
+ if (GetCount())
+ FreeAll();
+}
+
DataObject* ScChartListenerCollection::Clone() const
{
return new ScChartListenerCollection( *this );