Bump for 3.6-28
[LibreOffice.git] / editeng / source / outliner / outlundo.hxx
blob5b49b0f64bde5bea17ad785b117917b20cd53a7b
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 ************************************************************************/
29 #ifndef _OUTLUNDO_HXX
30 #define _OUTLUNDO_HXX
32 #include <editeng/outliner.hxx>
33 #include <editeng/editdata.hxx>
34 #include <editeng/editund2.hxx>
36 class OutlinerUndoBase : public EditUndo
38 private:
39 Outliner* mpOutliner;
41 public:
42 OutlinerUndoBase( sal_uInt16 nId, Outliner* pOutliner );
44 Outliner* GetOutliner() const { return mpOutliner; }
47 class OutlinerUndoChangeParaFlags : public OutlinerUndoBase
49 private:
50 sal_uInt16 mnPara;
51 sal_uInt16 mnOldFlags;
52 sal_uInt16 mnNewFlags;
54 void ImplChangeFlags( sal_uInt16 nFlags );
56 public:
57 OutlinerUndoChangeParaFlags( Outliner* pOutliner, sal_uInt16 nPara, sal_uInt16 nOldDepth, sal_uInt16 nNewDepth );
59 virtual void Undo();
60 virtual void Redo();
63 class OutlinerUndoChangeParaNumberingRestart : public OutlinerUndoBase
65 private:
66 sal_uInt16 mnPara;
68 struct ParaRestartData
70 sal_Int16 mnNumberingStartValue;
71 sal_Bool mbParaIsNumberingRestart;
74 ParaRestartData maUndoData;
75 ParaRestartData maRedoData;
77 void ImplApplyData( const ParaRestartData& rData );
78 public:
79 OutlinerUndoChangeParaNumberingRestart( Outliner* pOutliner, sal_uInt16 nPara,
80 sal_Int16 nOldNumberingStartValue, sal_Int16 mnNewNumberingStartValue,
81 sal_Bool nOldbParaIsNumberingRestart, sal_Bool nbNewParaIsNumberingRestart );
83 virtual void Undo();
84 virtual void Redo();
87 class OutlinerUndoChangeDepth : public OutlinerUndoBase
89 using SfxUndoAction::Repeat;
90 private:
91 sal_uInt16 mnPara;
92 sal_Int16 mnOldDepth;
93 sal_Int16 mnNewDepth;
95 public:
96 OutlinerUndoChangeDepth( Outliner* pOutliner, sal_uInt16 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth );
98 virtual void Undo();
99 virtual void Redo();
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;
109 private:
110 sal_uInt16 mnPara;
112 public:
113 OutlinerUndoCheckPara( Outliner* pOutliner, sal_uInt16 nPara );
115 virtual void Undo();
116 virtual void Redo();
117 virtual void Repeat();
122 // -------------------------------------
125 class OLUndoExpand : public EditUndo
127 using SfxUndoAction::Repeat;
128 void Restore( sal_Bool bUndo );
129 public:
130 OLUndoExpand( Outliner* pOut, sal_uInt16 nId );
131 ~OLUndoExpand();
132 virtual void Undo();
133 virtual void Redo();
134 virtual void Repeat();
136 sal_uInt16* pParas; // 0 == nCount contains paragraph number
137 Outliner* pOutliner;
138 sal_uInt16 nCount;
141 #endif
143 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */