Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / vcl / source / edit / textund2.hxx
blob299ae7161e11775a94bdea52895fdba8aa983346
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_VCL_SOURCE_EDIT_TEXTUND2_HXX
20 #define INCLUDED_VCL_SOURCE_EDIT_TEXTUND2_HXX
22 #include "textundo.hxx"
23 #include <vcl/textdata.hxx>
25 class TextUndoDelPara : public TextUndo
27 private:
28 bool mbDelObject;
29 sal_uInt32 const mnPara;
30 TextNode* mpNode; // points at the valid not-destroyed object
32 public:
33 TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, sal_uInt32 nPara );
34 virtual ~TextUndoDelPara() override;
36 virtual void Undo() override;
37 virtual void Redo() override;
39 virtual OUString GetComment () const override;
42 class TextUndoConnectParas : public TextUndo
44 private:
45 sal_uInt32 const mnPara;
46 sal_Int32 const mnSepPos;
48 public:
49 TextUndoConnectParas( TextEngine* pTextEngine, sal_uInt32 nPara, sal_Int32 nSepPos );
50 virtual ~TextUndoConnectParas() override;
52 virtual void Undo() override;
53 virtual void Redo() override;
55 virtual OUString GetComment () const override;
58 class TextUndoSplitPara : public TextUndo
60 private:
61 sal_uInt32 const mnPara;
62 sal_Int32 const mnSepPos;
64 public:
65 TextUndoSplitPara( TextEngine* pTextEngine, sal_uInt32 nPara, sal_Int32 nSepPos );
66 virtual ~TextUndoSplitPara() override;
68 virtual void Undo() override;
69 virtual void Redo() override;
71 virtual OUString GetComment () const override;
74 class TextUndoInsertChars : public TextUndo
76 private:
77 TextPaM maTextPaM;
78 OUString maText;
80 public:
81 TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr );
83 virtual void Undo() override;
84 virtual void Redo() override;
86 virtual bool Merge( SfxUndoAction *pNextAction ) override;
88 virtual OUString GetComment () const override;
91 class TextUndoRemoveChars : public TextUndo
93 private:
94 TextPaM const maTextPaM;
95 OUString const maText;
97 public:
98 TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr );
100 virtual void Undo() override;
101 virtual void Redo() override;
103 virtual OUString GetComment () const override;
106 #endif // INCLUDED_VCL_SOURCE_EDIT_TEXTUND2_HXX
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */