From 28ad1e7dcf70f390bd2fa3ff96eff847429aea08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com> Date: Thu, 21 Oct 2010 21:07:51 +0100 Subject: [PATCH] rhbz#636521 Don't record undo info during escher conversion --- sc/source/filter/excel/xiescher.cxx | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff -r 5825132aeeb9 sc/source/filter/excel/xiescher.cxx --- a/sc/source/filter/excel/xiescher.cxx Thu Apr 15 17:55:20 2010 +0200 +++ b/sc/source/filter/excel/xiescher.cxx Mon Oct 25 13:24:47 2010 +0200 @@ -3732,6 +3732,11 @@ // do nothing if the document does not contain a drawing layer if( GetDoc().GetDrawLayer() ) { + SdrModel& rSdrModel = *GetDoc().GetDrawLayer(); + //rhbz#636521, disable undo during conversion. faster, smaller and stops + //temp objects being inserted into the undo list + bool bOrigUndoStatus = rSdrModel.IsUndoEnabled(); + rSdrModel.EnableUndo(false); // process list of identifiers of objects to be skipped for( XclObjIdVec::const_iterator aVIt = maSkipObjs.begin(), aVEnd = maSkipObjs.end(); aVIt != aVEnd; ++aVIt ) if( XclImpDrawObjBase* pDrawObj = FindDrawObj( *aVIt ).get() ) @@ -3754,6 +3759,7 @@ if( *aPIt != STREAM_SEEK_TO_END ) rDffManager.ProcessDrawing( maDffStrm, *aPIt ); } + rSdrModel.EnableUndo(bOrigUndoStatus); } }