summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-07-11 06:09:32 +0000
committerRüdiger Timm <rt@openoffice.org>2008-07-11 06:09:32 +0000
commit04c7ba92de14bef02fa971f849529191cabbe205 (patch)
tree173a84af3a39cda7bfa7fff0b4c6d88b76c14d4b /sc/source/ui/docshell/docsh5.cxx
parentc556b3bf4596843b39812420173cf13f2dc02b3d (diff)
INTEGRATION: CWS calccrashes (1.20.96); FILE MERGED
2008/07/07 10:16:06 nn 1.20.96.1: #i91372# use SdrUndoAction in ScUndoMakeScenario
Diffstat (limited to 'sc/source/ui/docshell/docsh5.cxx')
-rw-r--r--sc/source/ui/docshell/docsh5.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index fc27649c9100..809d87df1c81 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: docsh5.cxx,v $
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
* This file is part of OpenOffice.org.
*
@@ -751,14 +751,15 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
ScDocShellModificator aModificator( *this );
+ if (bRecord)
+ aDocument.BeginDrawUndo(); // drawing layer must do its own undo actions
+
if (aDocument.CopyTab( nTab, nNewTab, pCopyMark ))
{
if (bRecord)
{
- ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( &aDocument, nTab,nTab );
GetUndoManager()->AddUndoAction(
- new ScUndoMakeScenario( this, nTab, nNewTab, pUndoDoc,
+ new ScUndoMakeScenario( this, nTab, nNewTab,
rName, rComment, rColor, nFlags, rMark ));
}