1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
23 #include <editeng/outliner.hxx>
24 #include <editeng/editdata.hxx>
25 #include <editeng/editund2.hxx>
27 class OutlinerUndoBase
: public EditUndo
33 OutlinerUndoBase( sal_uInt16 nId
, Outliner
* pOutliner
);
35 Outliner
* GetOutliner() const { return mpOutliner
; }
38 class OutlinerUndoChangeParaFlags
: public OutlinerUndoBase
42 sal_uInt16 mnOldFlags
;
43 sal_uInt16 mnNewFlags
;
45 void ImplChangeFlags( sal_uInt16 nFlags
);
48 OutlinerUndoChangeParaFlags( Outliner
* pOutliner
, sal_Int32 nPara
, sal_uInt16 nOldDepth
, sal_uInt16 nNewDepth
);
54 class OutlinerUndoChangeParaNumberingRestart
: public OutlinerUndoBase
59 struct ParaRestartData
61 sal_Int16 mnNumberingStartValue
;
62 sal_Bool mbParaIsNumberingRestart
;
65 ParaRestartData maUndoData
;
66 ParaRestartData maRedoData
;
68 void ImplApplyData( const ParaRestartData
& rData
);
70 OutlinerUndoChangeParaNumberingRestart( Outliner
* pOutliner
, sal_Int32 nPara
,
71 sal_Int16 nOldNumberingStartValue
, sal_Int16 mnNewNumberingStartValue
,
72 sal_Bool nOldbParaIsNumberingRestart
, sal_Bool nbNewParaIsNumberingRestart
);
78 class OutlinerUndoChangeDepth
: public OutlinerUndoBase
80 using SfxUndoAction::Repeat
;
87 OutlinerUndoChangeDepth( Outliner
* pOutliner
, sal_Int32 nPara
, sal_Int16 nOldDepth
, sal_Int16 nNewDepth
);
91 virtual void Repeat();
94 // Help-Undo: If it does not exist an OutlinerUndoAction for a certain action
95 // because this is handled by the EditEngine, but for example the bullet has
96 // to be recalculated.
97 class OutlinerUndoCheckPara
: public OutlinerUndoBase
99 using SfxUndoAction::Repeat
;
104 OutlinerUndoCheckPara( Outliner
* pOutliner
, sal_Int32 nPara
);
108 virtual void Repeat();
113 // -------------------------------------
116 class OLUndoExpand
: public EditUndo
118 using SfxUndoAction::Repeat
;
119 void Restore( sal_Bool bUndo
);
121 OLUndoExpand( Outliner
* pOut
, sal_uInt16 nId
);
125 virtual void Repeat();
127 sal_uInt16
* pParas
; // 0 == nCount contains paragraph number
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */