LibreOffice Module vcl (master)  1
textund2.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 #ifndef INCLUDED_VCL_SOURCE_EDIT_TEXTUND2_HXX
20 #define INCLUDED_VCL_SOURCE_EDIT_TEXTUND2_HXX
21 
22 #include "textundo.hxx"
23 #include <vcl/textdata.hxx>
24 
25 class TextUndoDelPara : public TextUndo
26 {
27 private:
29  sal_uInt32 const mnPara;
30  TextNode* mpNode; // points at the valid not-destroyed object
31 
32 public:
33  TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, sal_uInt32 nPara );
34  virtual ~TextUndoDelPara() override;
35 
36  virtual void Undo() override;
37  virtual void Redo() override;
38 
39  virtual OUString GetComment () const override;
40 };
41 
43 {
44 private:
45  sal_uInt32 const mnPara;
46  sal_Int32 const mnSepPos;
47 
48 public:
49  TextUndoConnectParas( TextEngine* pTextEngine, sal_uInt32 nPara, sal_Int32 nSepPos );
50  virtual ~TextUndoConnectParas() override;
51 
52  virtual void Undo() override;
53  virtual void Redo() override;
54 
55  virtual OUString GetComment () const override;
56 };
57 
59 {
60 private:
61  sal_uInt32 const mnPara;
62  sal_Int32 const mnSepPos;
63 
64 public:
65  TextUndoSplitPara( TextEngine* pTextEngine, sal_uInt32 nPara, sal_Int32 nSepPos );
66  virtual ~TextUndoSplitPara() override;
67 
68  virtual void Undo() override;
69  virtual void Redo() override;
70 
71  virtual OUString GetComment () const override;
72 };
73 
75 {
76 private:
78  OUString maText;
79 
80 public:
81  TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr );
82 
83  virtual void Undo() override;
84  virtual void Redo() override;
85 
86  virtual bool Merge( SfxUndoAction *pNextAction ) override;
87 
88  virtual OUString GetComment () const override;
89 };
90 
92 {
93 private:
95  OUString const maText;
96 
97 public:
98  TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr );
99 
100  virtual void Undo() override;
101  virtual void Redo() override;
102 
103  virtual OUString GetComment () const override;
104 };
105 
106 #endif // INCLUDED_VCL_SOURCE_EDIT_TEXTUND2_HXX
107 
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~TextUndoSplitPara() override
Definition: textundo.cxx:230
virtual void Redo() override
Definition: textundo.cxx:212
virtual OUString GetComment() const override
Definition: textundo.cxx:292
virtual void Redo() override
Definition: textundo.cxx:240
virtual ~TextUndoDelPara() override
Definition: textundo.cxx:146
virtual void Undo() override
Definition: textundo.cxx:234
sal_Int32 const mnSepPos
Definition: textund2.hxx:62
sal_Int32 const mnSepPos
Definition: textund2.hxx:46
virtual ~TextUndoConnectParas() override
Definition: textundo.cxx:202
virtual void Undo() override
Definition: textundo.cxx:152
sal_uInt32 const mnPara
Definition: textund2.hxx:29
sal_uInt32 const mnPara
Definition: textund2.hxx:45
sal_uInt32 const mnPara
Definition: textund2.hxx:61
TextUndoSplitPara(TextEngine *pTextEngine, sal_uInt32 nPara, sal_Int32 nSepPos)
Definition: textundo.cxx:223
TextPaM const maTextPaM
Definition: textund2.hxx:94
virtual OUString GetComment() const override
Definition: textundo.cxx:190
virtual void Undo() override
Definition: textundo.cxx:257
virtual OUString GetComment() const override
Definition: textundo.cxx:218
virtual void Undo() override
Definition: textundo.cxx:206
TextNode * mpNode
Definition: textund2.hxx:30
virtual OUString GetComment() const override
Definition: textundo.cxx:322
TextUndoRemoveChars(TextEngine *pTextEngine, const TextPaM &rTextPaM, const OUString &rStr)
Definition: textundo.cxx:300
OUString const maText
Definition: textund2.hxx:95
virtual void Redo() override
Definition: textundo.cxx:314
TextUndoDelPara(TextEngine *pTextEngine, TextNode *pNode, sal_uInt32 nPara)
Definition: textundo.cxx:138
virtual OUString GetComment() const override
Definition: textundo.cxx:246
virtual void Redo() override
Definition: textundo.cxx:164
virtual void Undo() override
Definition: textundo.cxx:306
TextUndoInsertChars(TextEngine *pTextEngine, const TextPaM &rTextPaM, const OUString &rStr)
Definition: textundo.cxx:251
virtual bool Merge(SfxUndoAction *pNextAction) override
Definition: textundo.cxx:274
virtual void Redo() override
Definition: textundo.cxx:265
TextUndoConnectParas(TextEngine *pTextEngine, sal_uInt32 nPara, sal_Int32 nSepPos)
Definition: textundo.cxx:195