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: outlundo.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 ************************************************************************/
34 #include <svx/outliner.hxx>
37 #include <svx/editdata.hxx>
39 #include <editund2.hxx>
41 class OutlinerUndoBase
: public EditUndo
47 OutlinerUndoBase( USHORT nId
, Outliner
* pOutliner
);
49 Outliner
* GetOutliner() const { return mpOutliner
; }
52 class OutlinerUndoChangeParaFlags
: public OutlinerUndoBase
56 sal_uInt16 mnOldFlags
;
57 sal_uInt16 mnNewFlags
;
59 void ImplChangeFlags( sal_uInt16 nFlags
);
62 OutlinerUndoChangeParaFlags( Outliner
* pOutliner
, sal_uInt16 nPara
, sal_uInt16 nOldDepth
, sal_uInt16 nNewDepth
);
68 class OutlinerUndoChangeParaNumberingRestart
: public OutlinerUndoBase
73 struct ParaRestartData
75 sal_Int16 mnNumberingStartValue
;
76 sal_Bool mbParaIsNumberingRestart
;
79 ParaRestartData maUndoData
;
80 ParaRestartData maRedoData
;
82 void ImplApplyData( const ParaRestartData
& rData
);
84 OutlinerUndoChangeParaNumberingRestart( Outliner
* pOutliner
, sal_uInt16 nPara
,
85 sal_Int16 nOldNumberingStartValue
, sal_Int16 mnNewNumberingStartValue
,
86 sal_Bool nOldbParaIsNumberingRestart
, sal_Bool nbNewParaIsNumberingRestart
);
92 class OutlinerUndoChangeDepth
: public OutlinerUndoBase
94 using SfxUndoAction::Repeat
;
101 OutlinerUndoChangeDepth( Outliner
* pOutliner
, USHORT nPara
, sal_Int16 nOldDepth
, sal_Int16 nNewDepth
);
105 virtual void Repeat();
108 // Hilfs-Undo: Wenn es fuer eine Aktion keine OutlinerUndoAction gibst, weil
109 // die EditEngine das handelt, aber z.B. noch das Bullet neu berechnet werden muss.
111 class OutlinerUndoCheckPara
: public OutlinerUndoBase
113 using SfxUndoAction::Repeat
;
118 OutlinerUndoCheckPara( Outliner
* pOutliner
, USHORT nPara
);
122 virtual void Repeat();
127 // -------------------------------------
130 class OLUndoExpand
: public EditUndo
132 using SfxUndoAction::Repeat
;
133 void Restore( BOOL bUndo
);
135 OLUndoExpand( Outliner
* pOut
, USHORT nId
);
139 virtual void Repeat();
141 USHORT
* pParas
; // 0 == nCount enthaelt Absatznummer