LibreOffice Module editeng (master) 1
outlundo.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <editeng/outliner.hxx>
23#include <editeng/editund2.hxx>
24
26{
27private:
29
30public:
31 OutlinerUndoBase( sal_uInt16 nId, Outliner* pOutliner );
32
33 Outliner* GetOutliner() const { return mpOutliner; }
34};
35
37{
38private:
39 sal_Int32 mnPara;
42
43 void ImplChangeFlags( ParaFlag nFlags );
44
45public:
46 OutlinerUndoChangeParaFlags( Outliner* pOutliner, sal_Int32 nPara, ParaFlag nOldFlags, ParaFlag nNewFlags );
47
48 virtual void Undo() override;
49 virtual void Redo() override;
50};
51
53{
54private:
55 sal_Int32 mnPara;
56
58 {
61 };
62
65
66 void ImplApplyData( const ParaRestartData& rData );
67public:
68 OutlinerUndoChangeParaNumberingRestart( Outliner* pOutliner, sal_Int32 nPara,
69 sal_Int16 nOldNumberingStartValue, sal_Int16 mnNewNumberingStartValue,
70 bool bOldbParaIsNumberingRestart, bool bNewParaIsNumberingRestart );
71
72 virtual void Undo() override;
73 virtual void Redo() override;
74};
75
77{
78private:
79 sal_Int32 mnPara;
80 sal_Int16 mnOldDepth;
81 sal_Int16 mnNewDepth;
82
83public:
84 OutlinerUndoChangeDepth( Outliner* pOutliner, sal_Int32 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth );
85
86 virtual void Undo() override;
87 virtual void Redo() override;
88};
89
90// Help-Undo: If it does not exist an OutlinerUndoAction for a certain action
91// because this is handled by the EditEngine, but for example the bullet has
92// to be recalculated.
94{
95private:
96 sal_Int32 mnPara;
97
98public:
99 OutlinerUndoCheckPara( Outliner* pOutliner, sal_Int32 nPara );
100
101 virtual void Undo() override;
102 virtual void Redo() override;
103};
104
105class OLUndoExpand : public EditUndo
106{
107 void Restore( bool bUndo );
108public:
109 OLUndoExpand( Outliner* pOut, sal_uInt16 nId );
110 virtual ~OLUndoExpand() override;
111 virtual void Undo() override;
112 virtual void Redo() override;
113
115 sal_Int32 nCount;
116};
117
118/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 nId
Definition: editund2.hxx:49
sal_Int32 nCount
Definition: outlundo.hxx:115
void Restore(bool bUndo)
Definition: outlundo.cxx:136
virtual ~OLUndoExpand() override
Definition: outlundo.cxx:131
Outliner * pOutliner
Definition: outlundo.hxx:114
virtual void Redo() override
Definition: outlundo.cxx:159
OLUndoExpand(Outliner *pOut, sal_uInt16 nId)
Definition: outlundo.cxx:124
virtual void Undo() override
Definition: outlundo.cxx:154
Outliner * GetOutliner() const
Definition: outlundo.hxx:33
OutlinerUndoBase(sal_uInt16 nId, Outliner *pOutliner)
Definition: outlundo.cxx:26
Outliner * mpOutliner
Definition: outlundo.hxx:28
virtual void Redo() override
Definition: outlundo.cxx:100
OutlinerUndoChangeDepth(Outliner *pOutliner, sal_Int32 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth)
Definition: outlundo.cxx:90
virtual void Undo() override
Definition: outlundo.cxx:95
virtual void Redo() override
Definition: outlundo.cxx:43
virtual void Undo() override
Definition: outlundo.cxx:38
OutlinerUndoChangeParaFlags(Outliner *pOutliner, sal_Int32 nPara, ParaFlag nOldFlags, ParaFlag nNewFlags)
Definition: outlundo.cxx:33
void ImplChangeFlags(ParaFlag nFlags)
Definition: outlundo.cxx:48
virtual void Redo() override
Definition: outlundo.cxx:78
virtual void Undo() override
Definition: outlundo.cxx:73
OutlinerUndoChangeParaNumberingRestart(Outliner *pOutliner, sal_Int32 nPara, sal_Int16 nOldNumberingStartValue, sal_Int16 mnNewNumberingStartValue, bool bOldbParaIsNumberingRestart, bool bNewParaIsNumberingRestart)
Definition: outlundo.cxx:62
void ImplApplyData(const ParaRestartData &rData)
Definition: outlundo.cxx:83
virtual void Redo() override
Definition: outlundo.cxx:117
virtual void Undo() override
Definition: outlundo.cxx:110
OutlinerUndoCheckPara(Outliner *pOutliner, sal_Int32 nPara)
Definition: outlundo.cxx:105
ParaFlag
Definition: outliner.hxx:97
oslFileHandle & pOut