diff options
author | Michael Stahl <mst@openoffice.org> | 2010-12-15 09:14:11 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-12-15 09:14:11 +0100 |
commit | 1ba0c1878116ada5dc4ebdecdb1e0a3da9758547 (patch) | |
tree | f05a3cd3b9edf548208503349b23aab3063c8973 /sw/inc/SwUndoField.hxx | |
parent | undoapi: #i115383#: Undo should be disabled at beginning of ~SwDoc (diff) | |
download | core-1ba0c1878116ada5dc4ebdecdb1e0a3da9758547.tar.gz core-1ba0c1878116ada5dc4ebdecdb1e0a3da9758547.zip |
undoapi: #i115383#: derive sw::UndoManager from SfxUndoManager:
derive SwUndo from SfxUndoAction.
throw away most of docundo.cxx.
throw away SwUndoStart and SwUndoEnd.
replace SwUndoIter with sw::UndoRedoContext and sw::RepeatContext.
SwUndo::GetId() no longer public to prevent abuse.
add SwEditShell::HandleUndoRedoContext().
Diffstat (limited to 'sw/inc/SwUndoField.hxx')
-rw-r--r-- | sw/inc/SwUndoField.hxx | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx index 33f5cfd85e49..b42ae2b5a0b0 100644 --- a/sw/inc/SwUndoField.hxx +++ b/sw/inc/SwUndoField.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _SW_UNDO_FIELD_HXX -#define _SW_UNDO_FIELD_HXX +#ifndef SW_UNDO_FIELD_HXX +#define SW_UNDO_FIELD_HXX #include <undobj.hxx> @@ -53,16 +53,19 @@ class SwUndoFieldFromDoc : public SwUndoField SwMsgPoolItem * pHnt; BOOL bUpdate; + void DoImpl(); + public: SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & aOldField, const SwField & aNewField, SwMsgPoolItem * pHnt, BOOL bUpdate, SwUndoId nId = UNDO_FIELD ); + virtual ~SwUndoFieldFromDoc(); - virtual void Undo(SwUndoIter & rIt); - virtual void Redo(SwUndoIter & rIt); - virtual void Repeat(SwUndoIter & rIt); + virtual void UndoImpl( ::sw::UndoRedoContext & ); + virtual void RedoImpl( ::sw::UndoRedoContext & ); + virtual void RepeatImpl( ::sw::RepeatContext & ); }; class SwUndoFieldFromAPI : public SwUndoField @@ -70,6 +73,8 @@ class SwUndoFieldFromAPI : public SwUndoField com::sun::star::uno::Any aOldVal, aNewVal; USHORT nWhich; + void DoImpl(); + public: SwUndoFieldFromAPI(const SwPosition & rPos, const com::sun::star::uno::Any & rOldVal, @@ -77,9 +82,9 @@ public: USHORT nWhich); virtual ~SwUndoFieldFromAPI(); - virtual void Undo(SwUndoIter & rIt); - virtual void Redo(SwUndoIter & rIt); - virtual void Repeat(SwUndoIter & rIt); + virtual void UndoImpl( ::sw::UndoRedoContext & ); + virtual void RedoImpl( ::sw::UndoRedoContext & ); + virtual void RepeatImpl( ::sw::RepeatContext & ); }; -#endif // _SW_UNDO_FIELD_HXX +#endif // SW_UNDO_FIELD_HXX |