merge the formfield patch from ooo-build
[ooovba.git] / svtools / source / edit / textund2.hxx
blobf98bd26bb93a684028288d1bbdff48679c13ffe2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: textund2.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _TEXTUND2_HXX
31 #define _TEXTUND2_HXX
33 #include <textundo.hxx>
36 class TextUndoDelPara : public TextUndo
38 private:
39 BOOL mbDelObject;
40 ULONG mnPara;
41 TextNode* mpNode; // Zeigt auf das gueltige, nicht zerstoerte Objekt!
43 public:
44 TYPEINFO();
45 TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, ULONG nPara );
46 ~TextUndoDelPara();
48 virtual void Undo();
49 virtual void Redo();
53 class TextUndoConnectParas : public TextUndo
55 private:
56 ULONG mnPara;
57 USHORT mnSepPos;
59 public:
60 TYPEINFO();
61 TextUndoConnectParas( TextEngine* pTextEngine, ULONG nPara, USHORT nSepPos );
62 ~TextUndoConnectParas();
64 virtual void Undo();
65 virtual void Redo();
69 class TextUndoSplitPara : public TextUndo
71 private:
72 ULONG mnPara;
73 USHORT mnSepPos;
75 public:
76 TYPEINFO();
77 TextUndoSplitPara( TextEngine* pTextEngine, ULONG nPara, USHORT nSepPos );
78 ~TextUndoSplitPara();
80 virtual void Undo();
81 virtual void Redo();
85 class TextUndoInsertChars : public TextUndo
87 private:
88 TextPaM maTextPaM;
89 String maText;
91 public:
92 TYPEINFO();
93 TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const String& rStr );
95 // const TextPaM& GetTextPaM() { return aTextPaM; }
96 // String& GetStr() { return aText; }
98 virtual void Undo();
99 virtual void Redo();
101 virtual BOOL Merge( SfxUndoAction *pNextAction );
105 class TextUndoRemoveChars : public TextUndo
107 private:
108 TextPaM maTextPaM;
109 String maText;
111 public:
112 TYPEINFO();
113 TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const String& rStr );
115 // const TextPaM& GetTextPaM() { return aTextPaM; }
116 // String& GetStr() { return aText; }
118 virtual void Undo();
119 virtual void Redo();
123 class TextUndoSetAttribs: public TextUndo
125 private:
126 TextSelection maSelection;
127 // SfxItemSet aNewAttribs;
128 // TextInfoArray aPrevAttribs;
129 // BYTE nSpecial;
130 // BOOL bSetIsRemove;
131 // USHORT nRemoveWhich;
133 // void ImpSetSelection( TextView* pView );
136 public:
137 TYPEINFO();
138 TextUndoSetAttribs( TextEngine* pTextEngine, const TextSelection& rESel );
139 ~TextUndoSetAttribs();
141 // TextInfoArray& GetTextInfos() { return aPrevAttribs; }
142 // SfxItemSet& GetNewAttribs() { return aNewAttribs; }
143 // void SetSpecial( BYTE n ) { nSpecial = n; }
144 // void SetRemoveAttribs( BOOL b ) { bSetIsRemove = b; }
145 // void SetRemoveWhich( USHORT n ) { nRemoveWhich = n; }
147 virtual void Undo();
148 virtual void Redo();
151 #endif // _TEXTUND2_HXX