Branch data Line data Source code
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 : : #ifndef _TEXTUND2_HXX
20 : : #define _TEXTUND2_HXX
21 : :
22 : : #include <textundo.hxx>
23 : :
24 : :
25 : : class TextUndoDelPara : public TextUndo
26 : : {
27 : : private:
28 : : sal_Bool mbDelObject;
29 : : sal_uLong mnPara;
30 : : TextNode* mpNode; // Zeigt auf das gueltige, nicht zerstoerte Objekt!
31 : :
32 : : public:
33 : : TYPEINFO();
34 : : TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, sal_uLong nPara );
35 : : ~TextUndoDelPara();
36 : :
37 : : virtual void Undo();
38 : : virtual void Redo();
39 : : };
40 : :
41 : :
42 : : class TextUndoConnectParas : public TextUndo
43 : : {
44 : : private:
45 : : sal_uLong mnPara;
46 : : sal_uInt16 mnSepPos;
47 : :
48 : : public:
49 : : TYPEINFO();
50 : : TextUndoConnectParas( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nSepPos );
51 : : ~TextUndoConnectParas();
52 : :
53 : : virtual void Undo();
54 : : virtual void Redo();
55 : : };
56 : :
57 : :
58 : : class TextUndoSplitPara : public TextUndo
59 : : {
60 : : private:
61 : : sal_uLong mnPara;
62 : : sal_uInt16 mnSepPos;
63 : :
64 : : public:
65 : : TYPEINFO();
66 : : TextUndoSplitPara( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nSepPos );
67 : : ~TextUndoSplitPara();
68 : :
69 : : virtual void Undo();
70 : : virtual void Redo();
71 : : };
72 : :
73 : :
74 [ # # ][ # # ]: 0 : class TextUndoInsertChars : public TextUndo
75 : : {
76 : : private:
77 : : TextPaM maTextPaM;
78 : : String maText;
79 : :
80 : : public:
81 : : TYPEINFO();
82 : : TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const String& rStr );
83 : :
84 : : virtual void Undo();
85 : : virtual void Redo();
86 : :
87 : : virtual sal_Bool Merge( SfxUndoAction *pNextAction );
88 : : };
89 : :
90 : :
91 [ # # ][ # # ]: 0 : class TextUndoRemoveChars : public TextUndo
92 : : {
93 : : private:
94 : : TextPaM maTextPaM;
95 : : String maText;
96 : :
97 : : public:
98 : : TYPEINFO();
99 : : TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const String& rStr );
100 : :
101 : : virtual void Undo();
102 : : virtual void Redo();
103 : : };
104 : :
105 : :
106 : : class TextUndoSetAttribs: public TextUndo
107 : : {
108 : : private:
109 : : TextSelection maSelection;
110 : :
111 : : public:
112 : : TYPEINFO();
113 : : TextUndoSetAttribs( TextEngine* pTextEngine, const TextSelection& rESel );
114 : : ~TextUndoSetAttribs();
115 : :
116 : : virtual void Undo();
117 : : virtual void Redo();
118 : : };
119 : :
120 : : #endif // _TEXTUND2_HXX
121 : :
122 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|