Kaydet (Commit) 3bce1679 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#81470: Fix a crasher during xlsx export with revisions.

Calling Undo() here removes revision entries which also removes formula
cell instances stored in the entries.  The problem is that the
XclExpChTrCellContent instances store pointers to these formula instances
for later use, and removing the entries at this location causes deleted
formula instances to get accessed which in turn causes segfault.

Since all revision entries get deleted when the temp change track instance
gets deleted at the end of the revision export, not deleting the entries
here will not cause memory leaks.

Change-Id: I85f8064945a841b684e4fc4a97c3f9bb6a2de353
üst ebd8d283
...@@ -1402,7 +1402,6 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) : ...@@ -1402,7 +1402,6 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
{ {
PushActionRecord( *pScAction ); PushActionRecord( *pScAction );
const ScChangeAction* pPrevAction = pScAction->GetPrev(); const ScChangeAction* pPrevAction = pScAction->GetPrev();
pTempChangeTrack->Undo( pScAction->GetActionNumber(), pScAction->GetActionNumber() );
pScAction = pPrevAction; pScAction = pPrevAction;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment