1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
32 #include <editeng/outliner.hxx>
33 #include <editeng/editdata.hxx>
34 #include <editeng/editund2.hxx>
36 class OutlinerUndoBase
: public EditUndo
42 OutlinerUndoBase( sal_uInt16 nId
, Outliner
* pOutliner
);
44 Outliner
* GetOutliner() const { return mpOutliner
; }
47 class OutlinerUndoChangeParaFlags
: public OutlinerUndoBase
51 sal_uInt16 mnOldFlags
;
52 sal_uInt16 mnNewFlags
;
54 void ImplChangeFlags( sal_uInt16 nFlags
);
57 OutlinerUndoChangeParaFlags( Outliner
* pOutliner
, sal_uInt16 nPara
, sal_uInt16 nOldDepth
, sal_uInt16 nNewDepth
);
63 class OutlinerUndoChangeParaNumberingRestart
: public OutlinerUndoBase
68 struct ParaRestartData
70 sal_Int16 mnNumberingStartValue
;
71 sal_Bool mbParaIsNumberingRestart
;
74 ParaRestartData maUndoData
;
75 ParaRestartData maRedoData
;
77 void ImplApplyData( const ParaRestartData
& rData
);
79 OutlinerUndoChangeParaNumberingRestart( Outliner
* pOutliner
, sal_uInt16 nPara
,
80 sal_Int16 nOldNumberingStartValue
, sal_Int16 mnNewNumberingStartValue
,
81 sal_Bool nOldbParaIsNumberingRestart
, sal_Bool nbNewParaIsNumberingRestart
);
87 class OutlinerUndoChangeDepth
: public OutlinerUndoBase
89 using SfxUndoAction::Repeat
;
96 OutlinerUndoChangeDepth( Outliner
* pOutliner
, sal_uInt16 nPara
, sal_Int16 nOldDepth
, sal_Int16 nNewDepth
);
100 virtual void Repeat();
103 // Help-Undo: If it does not exist an OutlinerUndoAction for a certain action
104 // because this is handled by the EditEngine, but for example the bullet has
105 // to be recalculated.
106 class OutlinerUndoCheckPara
: public OutlinerUndoBase
108 using SfxUndoAction::Repeat
;
113 OutlinerUndoCheckPara( Outliner
* pOutliner
, sal_uInt16 nPara
);
117 virtual void Repeat();
122 // -------------------------------------
125 class OLUndoExpand
: public EditUndo
127 using SfxUndoAction::Repeat
;
128 void Restore( sal_Bool bUndo
);
130 OLUndoExpand( Outliner
* pOut
, sal_uInt16 nId
);
134 virtual void Repeat();
136 sal_uInt16
* pParas
; // 0 == nCount contains paragraph number
143 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */