1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SwUndoField.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SW_UNDO_FIELD_HXX
31 #define _SW_UNDO_FIELD_HXX
39 class SwUndoField
: public SwUndo
46 SwPosition
GetPosition();
49 SwUndoField(const SwPosition
& rPos
, SwUndoId nId
= UNDO_FIELD
);
50 virtual ~SwUndoField();
53 class SwUndoFieldFromDoc
: public SwUndoField
55 SwField
* pOldField
, * pNewField
;
60 SwUndoFieldFromDoc(const SwPosition
& rPos
, const SwField
& aOldField
,
61 const SwField
& aNewField
,
62 SwMsgPoolItem
* pHnt
, BOOL bUpdate
,
63 SwUndoId nId
= UNDO_FIELD
);
64 virtual ~SwUndoFieldFromDoc();
66 virtual void Undo(SwUndoIter
& rIt
);
67 virtual void Redo(SwUndoIter
& rIt
);
68 virtual void Repeat(SwUndoIter
& rIt
);
71 class SwUndoFieldFromAPI
: public SwUndoField
73 com::sun::star::uno::Any aOldVal
, aNewVal
;
77 SwUndoFieldFromAPI(const SwPosition
& rPos
,
78 const com::sun::star::uno::Any
& rOldVal
,
79 const com::sun::star::uno::Any
& rNewVal
,
81 virtual ~SwUndoFieldFromAPI();
83 virtual void Undo(SwUndoIter
& rIt
);
84 virtual void Redo(SwUndoIter
& rIt
);
85 virtual void Repeat(SwUndoIter
& rIt
);
88 #endif // _SW_UNDO_FIELD_HXX