LibreOffice Module sw (master) 1
UndoSplitMove.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#ifndef INCLUDED_SW_SOURCE_CORE_INC_UNDOSPLITMOVE_HXX
21#define INCLUDED_SW_SOURCE_CORE_INC_UNDOSPLITMOVE_HXX
22
23#include <undobj.hxx>
24
25class SwUndoSplitNode final : public SwUndo
26{
27 std::unique_ptr<SwHistory> m_pHistory;
28 std::unique_ptr<SwRedlineData> m_pRedlineData;
30 sal_Int32 m_nContent;
31 bool m_bTableFlag : 1;
33 sal_uInt32 m_nParRsid;
34
35public:
36 SwUndoSplitNode( SwDoc& rDoc, const SwPosition& rPos, bool bChkTable );
37
38 virtual ~SwUndoSplitNode() override;
39
40 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
41 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
42 virtual void RepeatImpl( ::sw::RepeatContext & ) override;
43
44 void SetTableFlag() { m_bTableFlag = true; }
45};
46
47class SwUndoMove final : public SwUndo, private SwUndRng, private SwUndoSaveContent
48{
49 // nDest... - destination range of move (after move!)
50 // nIns... - source Position of move (after move!)
51 // nMv... - destination position of move (before move!); for REDO
54
55 sal_uInt16 m_nFootnoteStart; // StartPos of Footnotes in History
56
57 bool m_bJoinNext : 1,
59
60 bool m_bMoveRedlines; // use DOC_MOVEREDLINES when calling SwDoc::Move
61
62 void DelFootnote( const SwPaM& );
63
64public:
65 SwUndoMove( const SwPaM&, const SwPosition& );
66 SwUndoMove( SwDoc& rDoc, const SwNodeRange&, const SwNode& );
67
68 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
69 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
70
72 void SetDestRange( const SwNode& rStt, const SwNode& rEnd,
73 const SwNodeIndex& rInsPos );
74
75 bool IsMoveRange() const { return m_bMoveRange; }
78 sal_Int32 GetDestSttContent() const { return m_nDestStartContent; }
79
80 void SetMoveRedlines( bool b ) { m_bMoveRedlines = b; }
81};
82
83#endif // INCLUDED_SW_SOURCE_CORE_INC_UNDOSPLITMOVE_HXX
84
85/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: doc.hxx:197
Marks a node in the document model.
Definition: ndindex.hxx:31
Base class of the Writer document model elements.
Definition: node.hxx:98
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
SwNodeOffset m_nEndNode
Definition: undobj.hxx:231
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unmove.cxx:235
sal_Int32 GetDestSttContent() const
SwNodeOffset GetDestSttNode() const
sal_uInt16 m_nFootnoteStart
SwNodeOffset m_nDestEndNode
sal_Int32 m_nMoveDestContent
bool m_bMoveRedlines
void SetMoveRedlines(bool b)
SwNodeOffset m_nMoveDestNode
void SetDestRange(const SwNode &rStt, const SwNode &rEnd, const SwNodeIndex &rInsPos)
set the destination range after the move
Definition: unmove.cxx:137
SwNodeOffset m_nInsPosNode
SwNodeOffset GetEndNode() const
SwUndoMove(const SwPaM &, const SwPosition &)
Definition: unmove.cxx:29
sal_Int32 m_nInsPosContent
bool IsMoveRange() const
sal_Int32 m_nDestStartContent
sal_Int32 m_nDestEndContent
void DelFootnote(const SwPaM &)
Definition: unmove.cxx:286
SwNodeOffset m_nDestStartNode
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unmove.cxx:153
std::unique_ptr< SwHistory > m_pHistory
std::unique_ptr< SwRedlineData > m_pRedlineData
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unspnd.cxx:145
virtual ~SwUndoSplitNode() override
Definition: unspnd.cxx:68
sal_Int32 m_nContent
SwUndoSplitNode(SwDoc &rDoc, const SwPosition &rPos, bool bChkTable)
Definition: unspnd.cxx:40
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: unspnd.cxx:186
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unspnd.cxx:74
sal_uInt32 m_nParRsid
SwNodeOffset m_nNode
Marks a position in the document model.
Definition: pam.hxx:38