summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJürgen Schmidt <jsc@apache.org>2012-06-08 07:55:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-04-11 16:38:05 +0100
commit78285ba3e03911ec6481b909b1da18cbb2b5dd58 (patch)
tree2b7cc237ea91c3188987adb8aa0c3ac73a728c06 /sw
parent8bd3be9915ff28458d010fc8f0a1a1ab66d730b0 (diff)
Resolves: #i119653# Crash after delete column(s) from chart's source table
It crashes after adjusting the table size. fix: Recorrect the logic of code in SwChartDataSequence::Dispose(), release the relationship inside. Patch By: Peng Chen Found By: yanji Review By: jsc (cherry picked from commit 3977937c2d96133c7d53c289cc9e218bb13095f4) Change-Id: I09e9c390527402e5f91031e7370910e93cf70fa7
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unochart.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 7fe2b3ee85ab..17b116aa5235 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -2460,6 +2460,29 @@ void SAL_CALL SwChartDataSequence::dispose( )
else {
OSL_FAIL( "table missing" );
}
+
+ //#i119653# The bug is crashed for an exception thrown by
+ //SwCharDataSequence::setModified() because
+ //the SwCharDataSequence object has been disposed.
+ //
+ //Actually, the former design of SwClient will disconnect itself
+ //from the notification list in its destructor.
+ //
+ //But the SwCharDataSeqence won't be destructed but disposed in code
+ //(the data member SwChartDataSequence::bDisposed will be set to
+ //TRUE), the relationship between client and modification is not
+ //released.
+ //
+ //So any notification from modify object will lead to said
+ //exception threw out. Recorrect the logic of code in
+ //SwChartDataSequence::Dispose(), release the relationship
+ //here...
+ SwModify* pLclRegisteredIn = GetRegisteredInNonConst();
+ if (pLclRegisteredIn && pLclRegisteredIn->GetDepends())
+ {
+ pLclRegisteredIn->Remove(this);
+ pTblCrsr = NULL;
+ }
}
// require listeners to release references to this object