kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone
Blob Blame History Raw
From c7727b1c1682a1373668c898a2de1b1627a09d8c Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@collabora.com>
Date: Thu, 17 Jul 2014 15:52:52 -0400
Subject: [PATCH 029/137] 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
(cherry picked from commit 3bce16799c34d0b28704c43eae77501c0f6aec1e)
Reviewed-on: https://gerrit.libreoffice.org/10371
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
---
 sc/source/filter/xcl97/XclExpChangeTrack.cxx | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 7033b3e..4589aea 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -1443,7 +1443,6 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
     {
         PushActionRecord( *pScAction );
         const ScChangeAction* pPrevAction = pScAction->GetPrev();
-        pTempChangeTrack->Undo( pScAction->GetActionNumber(), pScAction->GetActionNumber() );
         pScAction = pPrevAction;
     }
 
-- 
1.9.3