INTEGRATION: CWS impresspresobjs (1.1.2); FILE ADDED
2005/12/13 19:12:53 cl 1.1.2.2: #i58649# added isInUndo() 2005/11/24 11:59:29 cl 1.1.2.1: #123595# added application specific undo actions
This commit is contained in:
parent
91b854d9a4
commit
c46f1385a1
1 changed files with 73 additions and 0 deletions
73
sd/inc/undo/undomanager.hxx
Normal file
73
sd/inc/undo/undomanager.hxx
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*************************************************************************
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* $RCSfile: undomanager.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: rt $ $Date: 2006-01-10 14:24:11 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
*
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2005 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#ifndef _SD_UNDOMANAGER_HXX
|
||||
#define _SD_UNDOMANAGER_HXX
|
||||
|
||||
#ifndef _SD_SCOPELOCK_HXX
|
||||
#include "misc/scopelock.hxx"
|
||||
#endif
|
||||
|
||||
#ifndef _UNDO_HXX
|
||||
#include <svtools/undo.hxx>
|
||||
#endif
|
||||
|
||||
namespace sd
|
||||
{
|
||||
|
||||
class UndoManager : public SfxUndoManager
|
||||
{
|
||||
public:
|
||||
UndoManager( USHORT nMaxUndoActionCount = 20 );
|
||||
|
||||
virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, USHORT nId=0);
|
||||
virtual void LeaveListAction();
|
||||
|
||||
virtual void AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg=FALSE );
|
||||
|
||||
bool isInListAction() const { return mnListLevel != 0; }
|
||||
bool isInUndo() const { return maIsInUndoLock.isLocked(); }
|
||||
|
||||
virtual BOOL Undo( USHORT nCount=1 );
|
||||
virtual BOOL Redo( USHORT nCount=1 );
|
||||
|
||||
private:
|
||||
int mnListLevel;
|
||||
ScopeLock maIsInUndoLock;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // _SD_UNDOMANAGER_HXX
|
Loading…
Reference in a new issue