summaryrefslogtreecommitdiff
path: root/svtools/inc
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-04 16:21:29 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-04 16:21:29 +0000
commitda569797eb7e089da90c917448b7990fac64b8d7 (patch)
treee617655e6df5eeddc75f2c4a6e8915ea174af556 /svtools/inc
parentf9278148dc944e947fa8ed2b786098bcdba39004 (diff)
CWS-TOOLING: integrate CWS clnoundo
2009-05-18 09:40:22 +0200 wg r271998 : i102011 2009-04-28 12:20:24 +0200 cl r271318 : CWS-TOOLING: rebase CWS clnoundo to trunk@270723 (milestone: DEV300:m46) 2009-04-02 11:37:14 +0200 cl r270388 : #i100371# check valid positions all the time to avoid crashes during model lock 2009-03-30 13:02:27 +0200 cl r270219 : #i100371# do not create undo actions in drawing layer during load 2009-03-30 12:59:41 +0200 cl r270218 : #i100371# do not create undo actions in drawing layer during load 2009-03-30 12:55:06 +0200 cl r270217 : #i100371# do not create undo actions in drawing layer during load 2009-03-30 12:53:27 +0200 cl r270216 : #i100371# do not create undo actions in drawing layer during load 2009-03-30 12:49:28 +0200 cl r270215 : #i100371# added EnableUndo() and IsUndoEnabled()
Diffstat (limited to 'svtools/inc')
-rw-r--r--svtools/inc/svtools/undo.hxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/svtools/inc/svtools/undo.hxx b/svtools/inc/svtools/undo.hxx
index 986a72093af2..38cbfb227f1b 100644
--- a/svtools/inc/svtools/undo.hxx
+++ b/svtools/inc/svtools/undo.hxx
@@ -143,6 +143,7 @@ class SVT_DLLPUBLIC SfxUndoManager
SfxUndoArray *pActUndoArray;
SfxUndoArray *pFatherUndoArray;
+ bool mbUndoEnabled;
public:
SfxUndoManager( USHORT nMaxUndoActionCount = 20 );
virtual ~SfxUndoManager();
@@ -182,6 +183,16 @@ public:
/** clears the redo stack and removes the top undo action */
void RemoveLastUndoAction();
+
+ // enables (true) or disables (false) recording of undo actions
+ // If undo actions are added while undo is disabled, they are deleted.
+ // Disabling undo does not clear the current undo buffer!
+ void EnableUndo( bool bEnable );
+
+ // returns true if undo is currently enabled
+ // This returns false if undo was disabled using EnableUndo( false ) and
+ // also during the runtime of the Undo() and Redo() methods.
+ bool IsUndoEnabled() const { return mbUndoEnabled; }
};
//=========================================================================