LibreOffice Module sw (master) 1
UndoTable.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_UNDOTABLE_HXX
21#define INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX
22
23#include <o3tl/deleter.hxx>
24#include <tools/long.hxx>
25#include <tools/solar.h>
26#include <ndarr.hxx>
27#include <undobj.hxx>
28#include <set>
29#include <itabenum.hxx>
30#include <tblenum.hxx>
31#include <memory>
32#include <vector>
33
34class SfxItemSet;
35
36struct SwSaveRowSpan;
37class SaveTable;
38class SwDDEFieldType;
39class SwUndoDelete;
40class SwSelBoxes;
41class SwTable;
42class SwTableBox;
43class SwStartNode;
44class SwTableNode;
47class SwContentNode;
48class SwCursorShell;
49
50namespace sw {
51
52void NotifyTableCollapsedParagraph(const SwContentNode* pNode, SwCursorShell *const pShell);
53
54}
55
57class SwUndoInsTable final : public SwUndo
58{
59 OUString m_sTableName;
61 std::unique_ptr<SwDDEFieldType> m_pDDEFieldType;
62 std::optional<std::vector<sal_uInt16>> m_oColumnWidth;
63 std::unique_ptr<SwRedlineData> m_pRedlineData;
64 std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
66 sal_uInt16 m_nRows, m_nColumns;
67 sal_uInt16 const m_nAdjust;
68
69public:
70 SwUndoInsTable( const SwPosition&, sal_uInt16 nCols, sal_uInt16 nRows,
71 sal_uInt16 eAdjust, const SwInsertTableOptions& rInsTableOpts,
72 const SwTableAutoFormat* pTAFormat, const std::vector<sal_uInt16> *pColArr,
73 const OUString & rName);
74
75 virtual ~SwUndoInsTable() override;
76
77 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
78 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
79 virtual void RepeatImpl( ::sw::RepeatContext & ) override;
80
81 virtual SwRewriter GetRewriter() const override;
82};
83
84class SwUndoTextToTable final : public SwUndo, public SwUndRng
85{
86 OUString m_sTableName;
88 std::vector<SwNodeOffset> mvDelBoxes;
89 std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
92 sal_uInt16 m_nAdjust;
93 bool m_bSplitEnd : 1;
94
95public:
97 sal_uInt16,
98 const SwTableAutoFormat* pAFormat );
99
100 virtual ~SwUndoTextToTable() override;
101
102 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
103 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
104 virtual void RepeatImpl( ::sw::RepeatContext & ) override;
105
106 SwHistory& GetHistory(); // will be created if necessary
107 void AddFillBox( const SwTableBox& rBox );
108};
109
110class SwUndoTableToText final : public SwUndo
111{
112 OUString m_sTableName;
113 std::unique_ptr<SwDDEFieldType> m_pDDEFieldType;
114 std::unique_ptr<SaveTable> m_pTableSave;
116 std::unique_ptr<SwHistory> m_pHistory;
121
122public:
123 SwUndoTableToText( const SwTable& rTable, sal_Unicode cCh );
124
125 virtual ~SwUndoTableToText() override;
126
127 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
128 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
129 virtual void RepeatImpl( ::sw::RepeatContext & ) override;
130
131 void SetRange( const SwNodeRange& );
132 void AddBoxPos( SwDoc& rDoc, SwNodeOffset nNdIdx, SwNodeOffset nEndIdx,
133 sal_Int32 nContentIdx = SAL_MAX_INT32);
134};
135
136class SwUndoAttrTable final : public SwUndo
137{
139 std::unique_ptr<SaveTable> m_pSaveTable;
141
142public:
143 SwUndoAttrTable( const SwTableNode& rTableNd, bool bClearTabCols = false );
144
145 virtual ~SwUndoAttrTable() override;
146
147 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
148 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
149};
150
152
153class SwUndoTableAutoFormat final : public SwUndo
154{
157 std::unique_ptr<SaveTable> m_pSaveTable;
158 std::vector< std::shared_ptr<SwUndoTableNumFormat> > m_Undos;
161
162 void UndoRedo(bool const bUndo, ::sw::UndoRedoContext & rContext);
163
164public:
165 SwUndoTableAutoFormat( const SwTableNode& rTableNd, const SwTableAutoFormat& );
166
167 virtual ~SwUndoTableAutoFormat() override;
168
169 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
170 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
171
172 void SaveBoxContent( const SwTableBox& rBox );
173};
174
175using SwUndoSaveSections = std::vector<std::unique_ptr<SwUndoSaveSection, o3tl::default_delete<SwUndoSaveSection>>>;
176
177class SwUndoTableNdsChg final : public SwUndo
178{
179 std::unique_ptr<SaveTable> m_pSaveTable;
180 std::set<SwNodeOffset> m_Boxes;
181 struct BoxMove
182 {
184 bool hasMoved;
185 BoxMove(SwNodeOffset idx, bool moved=false) : index(idx), hasMoved(moved) {};
186 bool operator<(const BoxMove& other) const { return index < other.index; };
187 };
188 std::optional< std::set<BoxMove> > m_xNewSttNds;
189 std::unique_ptr<SwUndoSaveSections> m_pDelSects;
190 tools::Long m_nMin, m_nMax; // for redo of delete column
192 sal_uInt16 m_nCount;
194 bool m_bSameHeight; // only used for SplitRow
195
198
199public:
201 const SwSelBoxes& rBoxes,
202 const SwTableNode& rTableNd,
203 tools::Long nMn, tools::Long nMx,
204 sal_uInt16 nCnt, bool bFlg, bool bSameHeight );
205
206 virtual ~SwUndoTableNdsChg() override;
207
208 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
209 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
210
211 void SaveNewBoxes( const SwTableNode& rTableNd, const SwTableSortBoxes& rOld );
212 void SaveNewBoxes( const SwTableNode& rTableNd, const SwTableSortBoxes& rOld,
213 const SwSelBoxes& rBoxes, const std::vector<SwNodeOffset> &rNodeCnts );
214 void SaveSection( SwStartNode* pSttNd );
215 void ReNewBoxes( const SwSelBoxes& rBoxes );
216
217};
218
219class SwUndoMove;
220
221class SwUndoTableMerge final : public SwUndo, private SwUndRng
222{
224 std::unique_ptr<SaveTable> m_pSaveTable;
225 std::set<SwNodeOffset> m_Boxes;
226 std::vector<SwNodeOffset> m_aNewStartNodes;
227 std::vector<std::unique_ptr<SwUndoMove>> m_vMoves;
228 std::unique_ptr<SwHistory> m_pHistory;
229
230public:
231 SwUndoTableMerge( const SwPaM& rTableSel );
232
233 virtual ~SwUndoTableMerge() override;
234
235 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
236 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
237
238 void MoveBoxContent( SwDoc& rDoc, SwNodeRange& rRg, SwNode& rPos );
239
240 void SetSelBoxes( const SwSelBoxes& rBoxes );
241
242 void AddNewBox( SwNodeOffset nSttNdIdx )
243 { m_aNewStartNodes.push_back( nSttNdIdx ); }
244
245 void SaveCollection( const SwTableBox& rBox );
246};
247
248class SwUndoTableNumFormat final : public SwUndo
249{
250 std::unique_ptr<SfxItemSet> m_pBoxSet;
251 std::unique_ptr<SwHistory> m_pHistory;
253
258
259 bool m_bNewFormat : 1;
261 bool m_bNewValue : 1;
262
263public:
264 SwUndoTableNumFormat( const SwTableBox& rBox, const SfxItemSet* pNewSet = nullptr );
265
266 virtual ~SwUndoTableNumFormat() override;
267
268 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
269 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
270
271 void SetNumFormat( sal_uLong nNewNumFormatIdx, const double& rNewNumber )
272 { m_nFormatIdx = nNewNumFormatIdx; m_fNum = rNewNumber; }
273 void SetBox( const SwTableBox& rBox );
274};
275
277
278class SwUndoTableCpyTable final : public SwUndo
279{
280 std::vector<std::unique_ptr<UndoTableCpyTable_Entry>> m_vArr;
281 std::unique_ptr<SwUndoTableNdsChg> m_pInsRowUndo;
282
283 //b6341295: When redlining is active, PrepareRedline has to create the
284 //redlining attributes for the new and the old table cell content
285 static std::unique_ptr<SwUndo> PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
286 SwPosition& rPos, bool& rJoin, bool bRedo );
287
288public:
289 SwUndoTableCpyTable(const SwDoc& rDoc);
290
291 virtual ~SwUndoTableCpyTable() override;
292
293 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
294 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
295
296 void AddBoxBefore( const SwTableBox& rBox, bool bDelContent );
297 void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx,
298 bool bDelContent );
299
300 bool IsEmpty() const;
301 bool InsertRow( SwTable& rTable, const SwSelBoxes& rBoxes, sal_uInt16 nCnt );
302 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
303};
304
305class SwUndoCpyTable final : public SwUndo
306{
307 std::unique_ptr<SwUndoDelete> m_pDelete;
309
310public:
311 SwUndoCpyTable(const SwDoc& rDoc);
312
313 virtual ~SwUndoCpyTable() override;
314
315 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
316 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
317
318 void SetTableSttIdx( SwNodeOffset nIdx ) { m_nTableNode = nIdx; }
319};
320
321class SwUndoSplitTable final : public SwUndo
322{
324 std::unique_ptr<SwSaveRowSpan> mpSaveRowSpan; // stores row span values at the splitting row
325 std::unique_ptr<SaveTable> m_pSavedTable;
326 std::unique_ptr<SwHistory> m_pHistory;
328 sal_uInt16 m_nFormulaEnd;
330
331public:
332 SwUndoSplitTable( const SwTableNode& rTableNd, std::unique_ptr<SwSaveRowSpan> pRowSp,
333 SplitTable_HeadlineOption nMode, bool bCalcNewSize );
334
335 virtual ~SwUndoSplitTable() override;
336
337 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
338 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
339 virtual void RepeatImpl( ::sw::RepeatContext & ) override;
340
342 SwHistory* GetHistory() { return m_pHistory.get(); }
343 void SaveFormula( SwHistory& rHistory );
344};
345
346class SwUndoMergeTable final : public SwUndo
347{
348 OUString m_aName;
350 std::unique_ptr<SaveTable> m_pSaveTable, m_pSaveHdl;
351 std::unique_ptr<SwHistory> m_pHistory;
353
354public:
355 SwUndoMergeTable( const SwTableNode& rTableNd, const SwTableNode& rDelTableNd,
356 bool bWithPrev );
357
358 virtual ~SwUndoMergeTable() override;
359
360 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
361 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
362 virtual void RepeatImpl( ::sw::RepeatContext & ) override;
363
364 void SaveFormula( SwHistory& rHistory );
365};
366
367class SwUndoTableHeadline final : public SwUndo
368{
370 sal_uInt16 m_nOldHeadline;
371 sal_uInt16 m_nNewHeadline;
372
373public:
374 SwUndoTableHeadline( const SwTable&, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl );
375
376 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
377 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
378 virtual void RepeatImpl( ::sw::RepeatContext & ) override;
379};
380
381void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx );
382
383class SwUndoTableStyleMake final : public SwUndo
384{
385 OUString m_sName;
386 std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
387public:
388 SwUndoTableStyleMake(OUString aName, const SwDoc& rDoc);
389
390 virtual ~SwUndoTableStyleMake() override;
391
392 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
393 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
394
395 virtual SwRewriter GetRewriter() const override;
396};
397
398class SwUndoTableStyleDelete final : public SwUndo
399{
400 std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
401 std::vector<SwTable*> m_rAffectedTables;
402public:
403 SwUndoTableStyleDelete(std::unique_ptr<SwTableAutoFormat> pAutoFormat, std::vector<SwTable*>&& rAffectedTables, const SwDoc& rDoc);
404
405 virtual ~SwUndoTableStyleDelete() override;
406
407 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
408 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
409
410 virtual SwRewriter GetRewriter() const override;
411};
412
413class SwUndoTableStyleUpdate final : public SwUndo
414{
415 std::unique_ptr<SwTableAutoFormat> m_pOldFormat, m_pNewFormat;
416public:
417 SwUndoTableStyleUpdate(const SwTableAutoFormat& rNewFormat, const SwTableAutoFormat& rOldFormat, const SwDoc& rDoc);
418
419 virtual ~SwUndoTableStyleUpdate() override;
420
421 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
422 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
423
424 virtual SwRewriter GetRewriter() const override;
425};
426
427#endif // INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX
428
429/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< std::unique_ptr< SwUndoSaveSection, o3tl::default_delete< SwUndoSaveSection > > > SwUndoSaveSections
Definition: UndoTable.hxx:175
void InsertSort(std::vector< sal_uInt16 > &rArr, sal_uInt16 nIdx)
Definition: untbl.cxx:3044
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
Starts a section of nodes in the document model.
Definition: node.hxx:348
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:443
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:113
SwNodeOffset m_nStartNode
Definition: UndoTable.hxx:138
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1392
SwUndoAttrTable(const SwTableNode &rTableNd, bool bClearTabCols=false)
Definition: untbl.cxx:1361
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:139
virtual ~SwUndoAttrTable() override
Definition: untbl.cxx:1369
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1373
SwNodeOffset m_nTableNode
Definition: UndoTable.hxx:308
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2768
virtual ~SwUndoCpyTable() override
Definition: untbl.cxx:2764
void SetTableSttIdx(SwNodeOffset nIdx)
Definition: UndoTable.hxx:318
SwUndoCpyTable(const SwDoc &rDoc)
Definition: untbl.cxx:2759
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2792
std::unique_ptr< SwUndoDelete > m_pDelete
Definition: UndoTable.hxx:307
Implements undo/redo for Table -> Insert Table.
Definition: UndoTable.hxx:58
std::optional< std::vector< sal_uInt16 > > m_oColumnWidth
Definition: UndoTable.hxx:62
virtual ~SwUndoInsTable() override
Definition: untbl.cxx:261
sal_uInt16 m_nColumns
Definition: UndoTable.hxx:66
sal_uInt16 m_nRows
Definition: UndoTable.hxx:66
SwNodeOffset m_nStartNode
Definition: UndoTable.hxx:65
OUString m_sTableName
Definition: UndoTable.hxx:59
SwUndoInsTable(const SwPosition &, sal_uInt16 nCols, sal_uInt16 nRows, sal_uInt16 eAdjust, const SwInsertTableOptions &rInsTableOpts, const SwTableAutoFormat *pTAFormat, const std::vector< sal_uInt16 > *pColArr, const OUString &rName)
Definition: untbl.cxx:234
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:367
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:64
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:311
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:269
std::unique_ptr< SwRedlineData > m_pRedlineData
Definition: UndoTable.hxx:63
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:359
sal_uInt16 const m_nAdjust
Definition: UndoTable.hxx:67
std::unique_ptr< SwDDEFieldType > m_pDDEFieldType
Definition: UndoTable.hxx:61
SwInsertTableOptions m_aInsTableOptions
Definition: UndoTable.hxx:60
SwNodeOffset m_nTableNode
Definition: UndoTable.hxx:349
std::unique_ptr< SaveTable > m_pSaveHdl
Definition: UndoTable.hxx:350
SwUndoMergeTable(const SwTableNode &rTableNd, const SwTableNode &rDelTableNd, bool bWithPrev)
Definition: untbl.cxx:2926
void SaveFormula(SwHistory &rHistory)
Definition: untbl.cxx:3037
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:3028
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2952
virtual ~SwUndoMergeTable() override
Definition: untbl.cxx:2945
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:350
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:351
OUString m_aName
Definition: UndoTable.hxx:348
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3012
std::unique_ptr< SwSaveRowSpan > mpSaveRowSpan
Definition: UndoTable.hxx:324
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:326
SplitTable_HeadlineOption const m_nMode
Definition: UndoTable.hxx:327
SwHistory * GetHistory()
Definition: UndoTable.hxx:342
void SetTableNodeOffset(SwNodeOffset nIdx)
Definition: UndoTable.hxx:341
void SaveFormula(SwHistory &rHistory)
Definition: untbl.cxx:2917
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2824
SwNodeOffset m_nOffset
Definition: UndoTable.hxx:323
virtual ~SwUndoSplitTable() override
Definition: untbl.cxx:2817
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:2908
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2896
std::unique_ptr< SaveTable > m_pSavedTable
Definition: UndoTable.hxx:325
SwNodeOffset m_nTableNode
Definition: UndoTable.hxx:323
sal_uInt16 m_nFormulaEnd
Definition: UndoTable.hxx:328
SwUndoSplitTable(const SwTableNode &rTableNd, std::unique_ptr< SwSaveRowSpan > pRowSp, SplitTable_HeadlineOption nMode, bool bCalcNewSize)
Definition: untbl.cxx:2798
SwNodeOffset m_nStartNode
Definition: UndoTable.hxx:156
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1460
virtual ~SwUndoTableAutoFormat() override
Definition: untbl.cxx:1417
void UndoRedo(bool const bUndo, ::sw::UndoRedoContext &rContext)
Definition: untbl.cxx:1427
SwUndoTableAutoFormat(const SwTableNode &rTableNd, const SwTableAutoFormat &)
Definition: untbl.cxx:1398
void SaveBoxContent(const SwTableBox &rBox)
Definition: untbl.cxx:1421
sal_uInt16 m_nRepeatHeading
Definition: UndoTable.hxx:160
std::vector< std::shared_ptr< SwUndoTableNumFormat > > m_Undos
Definition: UndoTable.hxx:158
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1465
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:157
std::vector< std::unique_ptr< UndoTableCpyTable_Entry > > m_vArr
Definition: UndoTable.hxx:280
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2495
void AddBoxAfter(const SwTableBox &rBox, const SwNodeIndex &rIdx, bool bDelContent)
Definition: untbl.cxx:2614
static std::unique_ptr< SwUndo > PrepareRedline(SwDoc *pDoc, const SwTableBox &rBox, SwPosition &rPos, bool &rJoin, bool bRedo)
Definition: untbl.cxx:2643
virtual ~SwUndoTableCpyTable() override
Definition: untbl.cxx:2352
SwUndoTableCpyTable(const SwDoc &rDoc)
Definition: untbl.cxx:2347
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2358
std::unique_ptr< SwUndoTableNdsChg > m_pInsRowUndo
Definition: UndoTable.hxx:281
bool IsEmpty() const
Definition: untbl.cxx:2754
bool InsertRow(SwTable &rTable, const SwSelBoxes &rBoxes, sal_uInt16 nCnt)
Definition: untbl.cxx:2717
void dumpAsXml(xmlTextWriterPtr pWriter) const override
Definition: untbl.cxx:2737
void AddBoxBefore(const SwTableBox &rBox, bool bDelContent)
Definition: untbl.cxx:2583
SwUndoTableHeadline(const SwTable &, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl)
Definition: untbl.cxx:839
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:861
SwNodeOffset m_nTableNode
Definition: UndoTable.hxx:369
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:871
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:852
sal_uInt16 m_nOldHeadline
Definition: UndoTable.hxx:370
sal_uInt16 m_nNewHeadline
Definition: UndoTable.hxx:371
virtual ~SwUndoTableMerge() override
Definition: untbl.cxx:1845
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:224
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1991
std::set< SwNodeOffset > m_Boxes
Definition: UndoTable.hxx:225
void SetSelBoxes(const SwSelBoxes &rBoxes)
Definition: untbl.cxx:2013
std::vector< SwNodeOffset > m_aNewStartNodes
Definition: UndoTable.hxx:226
SwNodeOffset m_nTableNode
Definition: UndoTable.hxx:223
void MoveBoxContent(SwDoc &rDoc, SwNodeRange &rRg, SwNode &rPos)
Definition: untbl.cxx:1998
void AddNewBox(SwNodeOffset nSttNdIdx)
Definition: UndoTable.hxx:242
SwUndoTableMerge(const SwPaM &rTableSel)
Definition: untbl.cxx:1836
std::vector< std::unique_ptr< SwUndoMove > > m_vMoves
Definition: UndoTable.hxx:227
void SaveCollection(const SwTableBox &rBox)
Definition: untbl.cxx:2030
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1852
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:228
SwUndoTableNdsChg & operator=(SwUndoTableNdsChg const &)=delete
std::optional< std::set< BoxMove > > m_xNewSttNds
Definition: UndoTable.hxx:188
void ReNewBoxes(const SwSelBoxes &rBoxes)
Definition: untbl.cxx:1489
virtual ~SwUndoTableNdsChg() override
Definition: untbl.cxx:1501
std::unique_ptr< SwUndoSaveSections > m_pDelSects
Definition: UndoTable.hxx:189
std::set< SwNodeOffset > m_Boxes
Definition: UndoTable.hxx:180
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1788
void SaveSection(SwStartNode *pSttNd)
Definition: untbl.cxx:1636
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1650
tools::Long m_nMax
Definition: UndoTable.hxx:190
SwNodeOffset m_nSttNode
Definition: UndoTable.hxx:191
SwUndoTableNdsChg(SwUndoTableNdsChg const &)=delete
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:179
void SaveNewBoxes(const SwTableNode &rTableNd, const SwTableSortBoxes &rOld)
Definition: untbl.cxx:1505
tools::Long m_nMin
Definition: UndoTable.hxx:190
sal_uInt16 m_nCount
Definition: UndoTable.hxx:192
void SetNumFormat(sal_uLong nNewNumFormatIdx, const double &rNewNumber)
Definition: UndoTable.hxx:271
sal_uLong m_nNewFormatIdx
Definition: UndoTable.hxx:254
void SetBox(const SwTableBox &rBox)
Definition: untbl.cxx:2300
SwNodeOffset m_nNodePos
Definition: UndoTable.hxx:257
SwUndoTableNumFormat(const SwTableBox &rBox, const SfxItemSet *pNewSet=nullptr)
Definition: untbl.cxx:2045
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:251
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2212
virtual ~SwUndoTableNumFormat() override
Definition: untbl.cxx:2112
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2118
std::unique_ptr< SfxItemSet > m_pBoxSet
Definition: UndoTable.hxx:250
SwNodeOffset m_nNode
Definition: UndoTable.hxx:256
sal_uLong m_nFormatIdx
Definition: UndoTable.hxx:254
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3126
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:400
virtual ~SwUndoTableStyleDelete() override
Definition: untbl.cxx:3123
std::vector< SwTable * > m_rAffectedTables
Definition: UndoTable.hxx:401
SwUndoTableStyleDelete(std::unique_ptr< SwTableAutoFormat > pAutoFormat, std::vector< SwTable * > &&rAffectedTables, const SwDoc &rDoc)
Definition: untbl.cxx:3117
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3134
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3140
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3110
SwUndoTableStyleMake(OUString aName, const SwDoc &rDoc)
Definition: untbl.cxx:3084
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3097
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3092
virtual ~SwUndoTableStyleMake() override
Definition: untbl.cxx:3089
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:386
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3161
SwUndoTableStyleUpdate(const SwTableAutoFormat &rNewFormat, const SwTableAutoFormat &rOldFormat, const SwDoc &rDoc)
Definition: untbl.cxx:3147
std::unique_ptr< SwTableAutoFormat > m_pNewFormat
Definition: UndoTable.hxx:415
std::unique_ptr< SwTableAutoFormat > m_pOldFormat
Definition: UndoTable.hxx:415
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3156
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3166
virtual ~SwUndoTableStyleUpdate() override
Definition: untbl.cxx:3153
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:116
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:683
sal_Unicode m_cSeparator
Definition: UndoTable.hxx:118
std::unique_ptr< SwDDEFieldType > m_pDDEFieldType
Definition: UndoTable.hxx:113
void AddBoxPos(SwDoc &rDoc, SwNodeOffset nNdIdx, SwNodeOffset nEndIdx, sal_Int32 nContentIdx=SAL_MAX_INT32)
Definition: untbl.cxx:705
SwNodeOffset m_nEndNode
Definition: UndoTable.hxx:117
virtual ~SwUndoTableToText() override
Definition: untbl.cxx:457
OUString m_sTableName
Definition: UndoTable.hxx:112
SwNodeOffset m_nStartNode
Definition: UndoTable.hxx:117
std::unique_ptr< SaveTable > m_pTableSave
Definition: UndoTable.hxx:114
SwTableToTextSaves m_vBoxSaves
Definition: UndoTable.hxx:115
SwUndoTableToText(const SwTable &rTable, sal_Unicode cCh)
Definition: untbl.cxx:419
void SetRange(const SwNodeRange &)
Definition: untbl.cxx:699
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:465
sal_uInt16 m_nHeadlineRepeat
Definition: UndoTable.hxx:119
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:650
void AddFillBox(const SwTableBox &rBox)
Definition: untbl.cxx:827
SwHistory * m_pHistory
Definition: UndoTable.hxx:90
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:732
sal_Unicode m_cSeparator
Definition: UndoTable.hxx:91
sal_uInt16 m_nAdjust
Definition: UndoTable.hxx:92
std::vector< SwNodeOffset > mvDelBoxes
Definition: UndoTable.hxx:88
SwUndoTextToTable(const SwPaM &, const SwInsertTableOptions &, sal_Unicode, sal_uInt16, const SwTableAutoFormat *pAFormat)
Definition: untbl.cxx:710
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:89
OUString m_sTableName
Definition: UndoTable.hxx:86
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:816
SwInsertTableOptions m_aInsertTableOpts
Definition: UndoTable.hxx:87
virtual ~SwUndoTextToTable() override
Definition: untbl.cxx:727
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:805
SwHistory & GetHistory()
Definition: untbl.cxx:832
struct _xmlTextWriter * xmlTextWriterPtr
const sal_uInt16 idx[]
Dialog to specify the properties of date form field.
void NotifyTableCollapsedParagraph(const SwContentNode *const pNode, SwCursorShell *const pShell)
An empty paragraph inside a table with a nested table preceding it should be hidden,...
Definition: callnk.cxx:73
long Long
std::vector< std::unique_ptr< SwTableToTextSave > > SwTableToTextSaves
Definition: ndarr.hxx:87
sal_uIntPtr sal_uLong
Marks a position in the document model.
Definition: pam.hxx:38
This structure is needed by Undo to restore row span attributes when a table has been split into two ...
Definition: tblrwcl.hxx:111
SwNodeOffset index
Index of this box.
Definition: UndoTable.hxx:183
bool hasMoved
Has this box been moved already.
Definition: UndoTable.hxx:184
BoxMove(SwNodeOffset idx, bool moved=false)
Definition: UndoTable.hxx:185
bool operator<(const BoxMove &other) const
Definition: UndoTable.hxx:186
Definition: untbl.cxx:87
SwUndoId
Definition: swundo.hxx:30
SplitTable_HeadlineOption
Definition: tblenum.hxx:55
sal_uInt16 sal_Unicode