[Libreoffice-commits] core.git: sw/source
Jürgen Schmidt
jsc at apache.org
Thu Apr 11 08:38:25 PDT 2013
sw/source/core/unocore/unochart.cxx | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
New commits:
commit 78285ba3e03911ec6481b909b1da18cbb2b5dd58
Author: Jürgen Schmidt <jsc at apache.org>
Date: Fri Jun 8 07:55:21 2012 +0000
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
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 7fe2b3e..17b116a 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
More information about the Libreoffice-commits
mailing list