summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc/drawsh2.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-01-10 12:16:17 +0000
committerOliver Bolte <obo@openoffice.org>2008-01-10 12:16:17 +0000
commit936c6b06f221fd9560d47374c959e64cb48ac2e7 (patch)
tree2f9d698975fc25e2e1ef54e5cec2925259add5ed /sc/source/ui/drawfunc/drawsh2.cxx
parent26e00c618fb74a6ae5bfdd74a68f7f2fd7049ccb (diff)
INTEGRATION: CWS xmlfilter02 (1.23.82); FILE MERGED
2007/07/24 21:34:52 dr 1.23.82.3: RESYNC: (1.23-1.24); FILE MERGED 2007/05/08 16:53:35 dr 1.23.82.2: #i10000# warning 2007/04/17 11:00:00 tbe 1.23.82.1: #i76026# API: Undo history must be disabled while loading file
Diffstat (limited to 'sc/source/ui/drawfunc/drawsh2.cxx')
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index be73c92a27b0..283927082e83 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: drawsh2.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: rt $ $Date: 2007-07-06 12:42:40 $
+ * last change: $Author: obo $ $Date: 2008-01-10 13:16:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -65,6 +65,7 @@
#include "viewdata.hxx"
#include "sc.hrc"
#include "tabvwsh.hxx"
+#include "document.hxx"
#include "drwlayer.hxx"
#include "userdat.hxx"
@@ -86,7 +87,12 @@ ScDrawShell::ScDrawShell( ScViewData* pData ) :
pViewData( pData )
{
SetPool( &pViewData->GetScDrawView()->GetModel()->GetItemPool() );
- SetUndoManager( pViewData->GetSfxDocShell()->GetUndoManager() );
+ SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ SetUndoManager( pMgr );
+ if ( !pViewData->GetDocument()->IsUndoEnabled() )
+ {
+ pMgr->SetMaxUndoActionCount( 0 );
+ }
SetHelpId( HID_SCSHELL_DRAWSH );
SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Drawing")));
}