You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by js...@apache.org on 2012/06/08 10:55:22 UTC

svn commit: r1347951 - /incubator/ooo/trunk/main/sw/source/core/unocore/unochart.cxx

Author: jsc
Date: Fri Jun  8 08:55:21 2012
New Revision: 1347951

URL: http://svn.apache.org/viewvc?rev=1347951&view=rev
Log:
119653: Crash after delete column(s) from chart's source table, and then adjusted 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


Modified:
    incubator/ooo/trunk/main/sw/source/core/unocore/unochart.cxx

Modified: incubator/ooo/trunk/main/sw/source/core/unocore/unochart.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/unocore/unochart.cxx?rev=1347951&r1=1347950&r2=1347951&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/core/unocore/unochart.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/core/unocore/unochart.cxx Fri Jun  8 08:55:21 2012
@@ -2590,6 +2590,20 @@ void SAL_CALL SwChartDataSequence::dispo
             else {
                 DBG_ERROR( "table missing" );
             }
+		
+		//Comment: The bug is crashed for an exception threw out in SwCharDataSequence::setModified(), just because
+		//the SwCharDataSequence object has been disposed. Actually, the former design of SwClient will disband 
+		//itself from the notification list in its destruction. But the SwCharDataSeqence wont be destructed but disposed
+		//in code (the data member SwChartDataSequence::bDisposed will be set to TRUE), the relationship between client
+		//and modification are not released. So any notification from modify object will lead said exception threw out.
+		//Recorrect the logic of code in SwChartDataSequence::Dispose(), release the relationship inside...
+		SwModify* pRegisteredIn = GetRegisteredInNonConst();
+		if (pRegisteredIn && pRegisteredIn->GetDepends())
+		{
+			pRegisteredIn->Remove(this);
+			pTblCrsr = NULL;
+		}
+		
         }
 
         // require listeners to release references to this object