Commits

Anonymous committed 5448478

CWS-TOOLING: integrate CWS calc31stopper_DEV300
2009-03-04 19:46:06 +0100 dr r268863 : #i99844# do not remove broadcaster from deleted cells before broadcasting the change

Comments (0)

Files changed (1)

sc/source/core/data/column3.cxx

 				{
                     // do not rescue note if it has to be deleted according to passed flags
 					ScPostIt* pNote = bDeleteNote ? 0 : pOldCell->ReleaseNote();
-                    SvtBroadcaster* pBC = pOldCell->ReleaseBroadcaster();
+                    // #i99844# do not release broadcaster from old cell, it still has to notify deleted content
+                    SvtBroadcaster* pBC = pOldCell->GetBroadcaster();
                     if( pNote || pBC )
                         pNoteCell = new ScNoteCell( pNote, pBC );
 				}
                     aHint.GetAddress().SetRow( nOldRow );
                     aHint.SetCell( pOldCell );
 					pDocument->Broadcast( aHint );
+                    // #i99844# after broadcasting, old cell has to forget the broadcaster (owned by pNoteCell)
+                    pOldCell->ReleaseBroadcaster();
 					pOldCell->Delete();
 				}
 			}
         aHint.SetAddress( (*aIt)->aPos );
         aHint.SetCell( *aIt );
 		pDocument->Broadcast( aHint );
+        // #i99844# after broadcasting, old cell has to forget the broadcaster (owned by replacement note cell)
+        (*aIt)->ReleaseBroadcaster();
 		(*aIt)->Delete();
 	}
 }