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 <ndarr.hxx>
26 #include <undobj.hxx>
27 #include <set>
28 #include <itabenum.hxx>
29 #include <tblenum.hxx>
30 #include <memory>
31 #include <vector>
32 
33 class SfxItemSet;
34 
35 struct SwSaveRowSpan;
36 class SaveTable;
37 class SwDDEFieldType;
38 class SwUndoDelete;
39 class SwSelBoxes;
40 class SwTable;
41 class SwTableBox;
42 class SwStartNode;
43 class SwTableNode;
44 class SwTableAutoFormat;
45 class SwTableSortBoxes;
46 
47 class SwUndoInsTable : public SwUndo
48 {
49  OUString m_sTableName;
51  std::unique_ptr<SwDDEFieldType> m_pDDEFieldType;
52  std::unique_ptr<std::vector<sal_uInt16>> m_pColumnWidth;
53  std::unique_ptr<SwRedlineData> m_pRedlineData;
54  std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
56  sal_uInt16 m_nRows, m_nColumns;
57  sal_uInt16 const m_nAdjust;
58 
59 public:
60  SwUndoInsTable( const SwPosition&, sal_uInt16 nCols, sal_uInt16 nRows,
61  sal_uInt16 eAdjust, const SwInsertTableOptions& rInsTableOpts,
62  const SwTableAutoFormat* pTAFormat, const std::vector<sal_uInt16> *pColArr,
63  const OUString & rName);
64 
65  virtual ~SwUndoInsTable() override;
66 
67  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
68  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
69  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
70 
71  virtual SwRewriter GetRewriter() const override;
72 };
73 
74 class SwUndoTextToTable : public SwUndo, public SwUndRng
75 {
76  OUString m_sTableName;
78  std::vector<sal_uLong> mvDelBoxes;
79  std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
82  sal_uInt16 m_nAdjust;
83  bool m_bSplitEnd : 1;
84 
85 public:
87  sal_uInt16,
88  const SwTableAutoFormat* pAFormat );
89 
90  virtual ~SwUndoTextToTable() override;
91 
92  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
93  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
94  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
95 
96  SwHistory& GetHistory(); // will be created if necessary
97  void AddFillBox( const SwTableBox& rBox );
98 };
99 
100 class SwUndoTableToText : public SwUndo
101 {
102  OUString m_sTableName;
103  std::unique_ptr<SwDDEFieldType> m_pDDEFieldType;
104  std::unique_ptr<SaveTable> m_pTableSave;
106  std::unique_ptr<SwHistory> m_pHistory;
109  sal_uInt16 m_nHeadlineRepeat;
111 
112 public:
113  SwUndoTableToText( const SwTable& rTable, sal_Unicode cCh );
114 
115  virtual ~SwUndoTableToText() override;
116 
117  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
118  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
119  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
120 
121  void SetRange( const SwNodeRange& );
122  void AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx,
123  sal_Int32 nContentIdx = SAL_MAX_INT32);
124 };
125 
126 class SwUndoAttrTable : public SwUndo
127 {
129  std::unique_ptr<SaveTable> m_pSaveTable;
131 
132 public:
133  SwUndoAttrTable( const SwTableNode& rTableNd, bool bClearTabCols = false );
134 
135  virtual ~SwUndoAttrTable() override;
136 
137  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
138  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
139 };
140 
142 
144 {
147  std::unique_ptr<SaveTable> m_pSaveTable;
148  std::vector< std::shared_ptr<SwUndoTableNumFormat> > m_Undos;
150  sal_uInt16 m_nRepeatHeading;
151 
152  void UndoRedo(bool const bUndo, ::sw::UndoRedoContext & rContext);
153 
154 public:
155  SwUndoTableAutoFormat( const SwTableNode& rTableNd, const SwTableAutoFormat& );
156 
157  virtual ~SwUndoTableAutoFormat() override;
158 
159  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
160  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
161 
162  void SaveBoxContent( const SwTableBox& rBox );
163 };
164 
165 using SwUndoSaveSections = std::vector<std::unique_ptr<SwUndoSaveSection, o3tl::default_delete<SwUndoSaveSection>>>;
166 
167 class SwUndoTableNdsChg : public SwUndo
168 {
169  std::unique_ptr<SaveTable> m_pSaveTable;
170  std::set<sal_uLong> m_Boxes;
171  struct BoxMove
172  {
174  bool hasMoved;
175  BoxMove(sal_uLong idx, bool moved=false) : index(idx), hasMoved(moved) {};
176  bool operator<(const BoxMove& other) const { return index < other.index; };
177  };
178  std::optional< std::set<BoxMove> > m_xNewSttNds;
179  std::unique_ptr<SwUndoSaveSections> m_pDelSects;
180  tools::Long m_nMin, m_nMax; // for redo of delete column
182  sal_uInt16 m_nCount;
183  bool m_bFlag;
184  bool m_bSameHeight; // only used for SplitRow
185 
186  SwUndoTableNdsChg(SwUndoTableNdsChg const&) = delete;
188 
189 public:
190  SwUndoTableNdsChg( SwUndoId UndoId,
191  const SwSelBoxes& rBoxes,
192  const SwTableNode& rTableNd,
193  tools::Long nMn, tools::Long nMx,
194  sal_uInt16 nCnt, bool bFlg, bool bSameHeight );
195 
196  virtual ~SwUndoTableNdsChg() override;
197 
198  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
199  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
200 
201  void SaveNewBoxes( const SwTableNode& rTableNd, const SwTableSortBoxes& rOld );
202  void SaveNewBoxes( const SwTableNode& rTableNd, const SwTableSortBoxes& rOld,
203  const SwSelBoxes& rBoxes, const std::vector<sal_uLong> &rNodeCnts );
204  void SaveSection( SwStartNode* pSttNd );
205  void ReNewBoxes( const SwSelBoxes& rBoxes );
206 
207 };
208 
209 class SwUndoMove;
210 
211 class SwUndoTableMerge : public SwUndo, private SwUndRng
212 {
214  std::unique_ptr<SaveTable> m_pSaveTable;
215  std::set<sal_uLong> m_Boxes;
216  std::vector<sal_uLong> m_aNewStartNodes;
217  std::vector<std::unique_ptr<SwUndoMove>> m_vMoves;
218  std::unique_ptr<SwHistory> m_pHistory;
219 
220 public:
221  SwUndoTableMerge( const SwPaM& rTableSel );
222 
223  virtual ~SwUndoTableMerge() override;
224 
225  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
226  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
227 
228  void MoveBoxContent( SwDoc& rDoc, SwNodeRange& rRg, SwNodeIndex& rPos );
229 
230  void SetSelBoxes( const SwSelBoxes& rBoxes );
231 
232  void AddNewBox( sal_uLong nSttNdIdx )
233  { m_aNewStartNodes.push_back( nSttNdIdx ); }
234 
235  void SaveCollection( const SwTableBox& rBox );
236 };
237 
239 {
240  std::unique_ptr<SfxItemSet> m_pBoxSet;
241  std::unique_ptr<SwHistory> m_pHistory;
243 
245  double m_fNum, m_fNewNum;
248 
249  bool m_bNewFormat : 1;
250  bool m_bNewFormula : 1;
251  bool m_bNewValue : 1;
252 
253 public:
254  SwUndoTableNumFormat( const SwTableBox& rBox, const SfxItemSet* pNewSet = nullptr );
255 
256  virtual ~SwUndoTableNumFormat() override;
257 
258  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
259  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
260 
261  void SetNumFormat( sal_uLong nNewNumFormatIdx, const double& rNewNumber )
262  { m_nFormatIdx = nNewNumFormatIdx; m_fNum = rNewNumber; }
263  void SetBox( const SwTableBox& rBox );
264 };
265 
267 
269 {
270  std::vector<std::unique_ptr<UndoTableCpyTable_Entry>> m_vArr;
271  std::unique_ptr<SwUndoTableNdsChg> m_pInsRowUndo;
272 
273  //b6341295: When redlining is active, PrepareRedline has to create the
274  //redlining attributes for the new and the old table cell content
275  static std::unique_ptr<SwUndo> PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
276  SwPosition& rPos, bool& rJoin, bool bRedo );
277 
278 public:
279  SwUndoTableCpyTable(const SwDoc& rDoc);
280 
281  virtual ~SwUndoTableCpyTable() override;
282 
283  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
284  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
285 
286  void AddBoxBefore( const SwTableBox& rBox, bool bDelContent );
287  void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx,
288  bool bDelContent );
289 
290  bool IsEmpty() const;
291  bool InsertRow( SwTable& rTable, const SwSelBoxes& rBoxes, sal_uInt16 nCnt );
292  void dumpAsXml(xmlTextWriterPtr pWriter) const override;
293 };
294 
295 class SwUndoCpyTable : public SwUndo
296 {
297  std::unique_ptr<SwUndoDelete> m_pDelete;
299 
300 public:
301  SwUndoCpyTable(const SwDoc& rDoc);
302 
303  virtual ~SwUndoCpyTable() override;
304 
305  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
306  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
307 
308  void SetTableSttIdx( sal_uLong nIdx ) { m_nTableNode = nIdx; }
309 };
310 
311 class SwUndoSplitTable : public SwUndo
312 {
314  std::unique_ptr<SwSaveRowSpan> mpSaveRowSpan; // stores row span values at the splitting row
315  std::unique_ptr<SaveTable> m_pSavedTable;
316  std::unique_ptr<SwHistory> m_pHistory;
318  sal_uInt16 m_nFormulaEnd;
320 
321 public:
322  SwUndoSplitTable( const SwTableNode& rTableNd, std::unique_ptr<SwSaveRowSpan> pRowSp,
323  SplitTable_HeadlineOption nMode, bool bCalcNewSize );
324 
325  virtual ~SwUndoSplitTable() override;
326 
327  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
328  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
329  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
330 
331  void SetTableNodeOffset( sal_uLong nIdx ) { m_nOffset = nIdx - m_nTableNode; }
332  SwHistory* GetHistory() { return m_pHistory.get(); }
333  void SaveFormula( SwHistory& rHistory );
334 };
335 
336 class SwUndoMergeTable : public SwUndo
337 {
338  OUString m_aName;
340  std::unique_ptr<SaveTable> m_pSaveTable, m_pSaveHdl;
341  std::unique_ptr<SwHistory> m_pHistory;
342  sal_uInt16 m_nMode;
344 
345 public:
346  SwUndoMergeTable( const SwTableNode& rTableNd, const SwTableNode& rDelTableNd,
347  bool bWithPrev, sal_uInt16 nMode );
348 
349  virtual ~SwUndoMergeTable() override;
350 
351  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
352  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
353  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
354 
355  void SaveFormula( SwHistory& rHistory );
356 };
357 
359 {
361  sal_uInt16 m_nOldHeadline;
362  sal_uInt16 m_nNewHeadline;
363 
364 public:
365  SwUndoTableHeadline( const SwTable&, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl );
366 
367  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
368  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
369  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
370 };
371 
372 void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx );
373 
375 {
376  OUString m_sName;
377  std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
378 public:
379  SwUndoTableStyleMake(const OUString& rName, const SwDoc& rDoc);
380 
381  virtual ~SwUndoTableStyleMake() override;
382 
383  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
384  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
385 
386  virtual SwRewriter GetRewriter() const override;
387 };
388 
390 {
391  std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
392  std::vector<SwTable*> m_rAffectedTables;
393 public:
394  SwUndoTableStyleDelete(std::unique_ptr<SwTableAutoFormat> pAutoFormat, const std::vector<SwTable*>& rAffectedTables, const SwDoc& rDoc);
395 
396  virtual ~SwUndoTableStyleDelete() override;
397 
398  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
399  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
400 
401  virtual SwRewriter GetRewriter() const override;
402 };
403 
405 {
406  std::unique_ptr<SwTableAutoFormat> m_pOldFormat, m_pNewFormat;
407 public:
408  SwUndoTableStyleUpdate(const SwTableAutoFormat& rNewFormat, const SwTableAutoFormat& rOldFormat, const SwDoc& rDoc);
409 
410  virtual ~SwUndoTableStyleUpdate() override;
411 
412  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
413  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
414 
415  virtual SwRewriter GetRewriter() const override;
416 };
417 
418 #endif // INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX
419 
420 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3141
sal_uInt16 m_nRepeatHeading
Definition: UndoTable.hxx:150
Starts a section of nodes in the document model.
Definition: node.hxx:312
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:3059
std::unique_ptr< SaveTable > m_pSaveHdl
Definition: UndoTable.hxx:340
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:310
virtual ~SwUndoAttrTable() override
Definition: untbl.cxx:1351
SwUndoTextToTable(const SwPaM &, const SwInsertTableOptions &, sal_Unicode, sal_uInt16, const SwTableAutoFormat *pAFormat)
Definition: untbl.cxx:707
std::unique_ptr< SwDDEFieldType > m_pDDEFieldType
Definition: UndoTable.hxx:51
std::vector< std::unique_ptr< SwUndoMove > > m_vMoves
Definition: UndoTable.hxx:217
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1838
Marks a position in the document model.
Definition: pam.hxx:35
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2788
virtual ~SwUndoTableMerge() override
Definition: untbl.cxx:1831
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:340
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2510
SwUndoTableCpyTable(const SwDoc &rDoc)
Definition: untbl.cxx:2342
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1355
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:680
SwInsertTableOptions m_aInsTableOptions
Definition: UndoTable.hxx:50
SwUndoId
Definition: swundo.hxx:29
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1772
std::unique_ptr< SwTableAutoFormat > m_pNewFormat
Definition: UndoTable.hxx:406
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:818
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2845
sal_uLong m_nFormatIdx
Definition: UndoTable.hxx:244
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:241
sal_uIntPtr sal_uLong
void ReNewBoxes(const SwSelBoxes &rBoxes)
Definition: untbl.cxx:1471
long Long
std::vector< SwTable * > m_rAffectedTables
Definition: UndoTable.hxx:392
std::vector< sal_uLong > mvDelBoxes
Definition: UndoTable.hxx:78
SwUndoTableToText(const SwTable &rTable, sal_Unicode cCh)
Definition: untbl.cxx:412
SwUndoSplitTable(const SwTableNode &rTableNd, std::unique_ptr< SwSaveRowSpan > pRowSp, SplitTable_HeadlineOption nMode, bool bCalcNewSize)
Definition: untbl.cxx:2819
std::unique_ptr< SwDDEFieldType > m_pDDEFieldType
Definition: UndoTable.hxx:103
bool IsEmpty() const
Definition: untbl.cxx:2774
Definition: doc.hxx:187
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3042
SwUndoTableHeadline(const SwTable &, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl)
Definition: untbl.cxx:841
std::unique_ptr< SwUndoDelete > m_pDelete
Definition: UndoTable.hxx:297
static std::unique_ptr< SwUndo > PrepareRedline(SwDoc *pDoc, const SwTableBox &rBox, SwPosition &rPos, bool &rJoin, bool bRedo)
Definition: untbl.cxx:2662
sal_uLong m_nOffset
Definition: UndoTable.hxx:313
SwInsertTableOptions m_aInsertTableOpts
Definition: UndoTable.hxx:77
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:316
sal_uInt16 m_nNewHeadline
Definition: UndoTable.hxx:362
virtual ~SwUndoTableStyleUpdate() override
Definition: untbl.cxx:3184
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:854
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3165
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:377
std::unique_ptr< SwTableAutoFormat > m_pOldFormat
Definition: UndoTable.hxx:406
void SaveNewBoxes(const SwTableNode &rTableNd, const SwTableSortBoxes &rOld)
Definition: untbl.cxx:1487
std::unique_ptr< SwSaveRowSpan > mpSaveRowSpan
Definition: UndoTable.hxx:314
sal_uInt16 m_nOldHeadline
Definition: UndoTable.hxx:361
SwUndoTableNumFormat(const SwTableBox &rBox, const SfxItemSet *pNewSet=nullptr)
Definition: untbl.cxx:2034
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2977
sal_uInt16 sal_Unicode
std::vector< std::shared_ptr< SwUndoTableNumFormat > > m_Undos
Definition: UndoTable.hxx:148
virtual ~SwUndoTableNdsChg() override
Definition: untbl.cxx:1483
sal_uLong m_nEndNode
Definition: UndoTable.hxx:107
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:391
void AddBoxPos(SwDoc &rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx, sal_Int32 nContentIdx=SAL_MAX_INT32)
Definition: untbl.cxx:702
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:268
This structure is needed by Undo to restore row span attributes when a table has been split into two ...
Definition: tblrwcl.hxx:111
SwUndoMergeTable(const SwTableNode &rTableNd, const SwTableNode &rDelTableNd, bool bWithPrev, sal_uInt16 nMode)
Definition: untbl.cxx:2951
sal_Unicode m_cSeparator
Definition: UndoTable.hxx:81
virtual ~SwUndoSplitTable() override
Definition: untbl.cxx:2838
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:169
sal_uLong m_nNewFormatIdx
Definition: UndoTable.hxx:244
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:214
sal_Unicode m_cSeparator
Definition: UndoTable.hxx:108
void SetTableNodeOffset(sal_uLong nIdx)
Definition: UndoTable.hxx:331
sal_uInt16 m_nAdjust
Definition: UndoTable.hxx:82
SplitTable_HeadlineOption const m_nMode
Definition: UndoTable.hxx:317
OUString m_sTableName
Definition: UndoTable.hxx:102
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
struct _xmlTextWriter * xmlTextWriterPtr
virtual ~SwUndoCpyTable() override
Definition: untbl.cxx:2784
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3192
virtual ~SwUndoTableAutoFormat() override
Definition: untbl.cxx:1399
SwUndoTableStyleMake(const OUString &rName, const SwDoc &rDoc)
Definition: untbl.cxx:3115
BoxMove(sal_uLong idx, bool moved=false)
Definition: UndoTable.hxx:175
tools::Long m_nMax
Definition: UndoTable.hxx:180
bool InsertRow(SwTable &rTable, const SwSelBoxes &rBoxes, sal_uInt16 nCnt)
Definition: untbl.cxx:2737
sal_uLong m_nStartNode
Definition: UndoTable.hxx:107
std::set< sal_uLong > m_Boxes
Definition: UndoTable.hxx:215
void dumpAsXml(xmlTextWriterPtr pWriter) const override
Definition: untbl.cxx:2757
std::optional< std::set< BoxMove > > m_xNewSttNds
Definition: UndoTable.hxx:178
virtual ~SwUndoTableToText() override
Definition: untbl.cxx:452
SwUndoTableAutoFormat(const SwTableNode &rTableNd, const SwTableAutoFormat &)
Definition: untbl.cxx:1380
std::vector< std::unique_ptr< SwTableToTextSave >> SwTableToTextSaves
Definition: ndarr.hxx:85
sal_uLong m_nTableNode
Definition: UndoTable.hxx:313
SwUndoTableStyleDelete(std::unique_ptr< SwTableAutoFormat > pAutoFormat, const std::vector< SwTable * > &rAffectedTables, const SwDoc &rDoc)
Definition: untbl.cxx:3148
virtual ~SwUndoTableCpyTable() override
Definition: untbl.cxx:2347
void MoveBoxContent(SwDoc &rDoc, SwNodeRange &rRg, SwNodeIndex &rPos)
Definition: untbl.cxx:1987
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:106
void SaveFormula(SwHistory &rHistory)
Definition: untbl.cxx:3068
void SetTableSttIdx(sal_uLong nIdx)
Definition: UndoTable.hxx:308
void SetSelBoxes(const SwSelBoxes &rBoxes)
Definition: untbl.cxx:2002
SplitTable_HeadlineOption
Definition: tblenum.hxx:53
SwUndoTableStyleUpdate(const SwTableAutoFormat &rNewFormat, const SwTableAutoFormat &rOldFormat, const SwDoc &rDoc)
Definition: untbl.cxx:3178
std::unique_ptr< SfxItemSet > m_pBoxSet
Definition: UndoTable.hxx:240
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1374
sal_uLong m_nStartNode
Definition: UndoTable.hxx:128
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3197
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:54
sal_uLong m_nSttNode
Definition: UndoTable.hxx:181
std::vector< sal_uLong > m_aNewStartNodes
Definition: UndoTable.hxx:216
sal_uLong m_nTableNode
Definition: UndoTable.hxx:360
OUString m_aName
Definition: UndoTable.hxx:338
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:863
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:360
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:147
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:341
virtual ~SwUndoTableNumFormat() override
Definition: untbl.cxx:2102
Marks a node in the document model.
Definition: ndindex.hxx:31
sal_uInt16 m_nColumns
Definition: UndoTable.hxx:56
std::unique_ptr< SwUndoTableNdsChg > m_pInsRowUndo
Definition: UndoTable.hxx:271
sal_uInt16 m_nMode
Definition: UndoTable.hxx:342
sal_uLong index
Index of this box.
Definition: UndoTable.hxx:173
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:218
sal_uLong m_nTableNode
Definition: UndoTable.hxx:213
void UndoRedo(bool const bUndo,::sw::UndoRedoContext &rContext)
Definition: untbl.cxx:1409
SwUndoCpyTable(const SwDoc &rDoc)
Definition: untbl.cxx:2779
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2813
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:111
void AddBoxBefore(const SwTableBox &rBox, bool bDelContent)
Definition: untbl.cxx:2600
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:2933
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:79
std::unique_ptr< SaveTable > m_pTableSave
Definition: UndoTable.hxx:104
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1980
std::unique_ptr< SaveTable > m_pSavedTable
Definition: UndoTable.hxx:315
virtual ~SwUndoTableStyleDelete() override
Definition: untbl.cxx:3154
SwHistory * GetHistory()
Definition: UndoTable.hxx:332
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:807
void SaveSection(SwStartNode *pSttNd)
Definition: untbl.cxx:1618
std::vector< std::unique_ptr< SwUndoSaveSection, o3tl::default_delete< SwUndoSaveSection >>> SwUndoSaveSections
Definition: UndoTable.hxx:165
sal_uInt16 const m_nAdjust
Definition: UndoTable.hxx:57
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3123
tools::Long m_nMin
Definition: UndoTable.hxx:180
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2108
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:460
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:129
std::vector< std::unique_ptr< UndoTableCpyTable_Entry > > m_vArr
Definition: UndoTable.hxx:270
sal_uLong m_nTableNode
Definition: UndoTable.hxx:298
sal_uInt16 m_nCount
Definition: UndoTable.hxx:182
sal_uInt16 m_nRows
Definition: UndoTable.hxx:56
SwUndoTableMerge(const SwPaM &rTableSel)
Definition: untbl.cxx:1822
bool hasMoved
Has this box been moved already.
Definition: UndoTable.hxx:174
sal_uLong m_nTableNode
Definition: UndoTable.hxx:339
SwUndoTableNdsChg(SwUndoTableNdsChg const &)=delete
sal_uInt16 m_nFormulaEnd
Definition: UndoTable.hxx:318
void SaveCollection(const SwTableBox &rBox)
Definition: untbl.cxx:2019
SwHistory & GetHistory()
Definition: untbl.cxx:834
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1447
bool operator<(const BoxMove &other) const
Definition: UndoTable.hxx:176
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:392
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:645
virtual ~SwUndoTableStyleMake() override
Definition: untbl.cxx:3120
void InsertSort(std::vector< sal_uInt16 > &rArr, sal_uInt16 nIdx)
Definition: untbl.cxx:3075
std::unique_ptr< SwRedlineData > m_pRedlineData
Definition: UndoTable.hxx:53
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2921
virtual ~SwUndoInsTable() override
Definition: untbl.cxx:260
virtual ~SwUndoMergeTable() override
Definition: untbl.cxx:2970
void SetNumFormat(sal_uLong nNewNumFormatIdx, const double &rNewNumber)
Definition: UndoTable.hxx:261
SwHistory * m_pHistory
Definition: UndoTable.hxx:80
OUString m_sTableName
Definition: UndoTable.hxx:49
SwUndoTableNdsChg & operator=(SwUndoTableNdsChg const &)=delete
std::set< sal_uLong > m_Boxes
Definition: UndoTable.hxx:170
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:233
void AddNewBox(sal_uLong nSttNdIdx)
Definition: UndoTable.hxx:232
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1632
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:873
OUString m_sTableName
Definition: UndoTable.hxx:76
std::unique_ptr< SwUndoSaveSections > m_pDelSects
Definition: UndoTable.hxx:179
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:729
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3128
Definition: untbl.cxx:84
virtual ~SwUndoTextToTable() override
Definition: untbl.cxx:724
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3171
void SetBox(const SwTableBox &rBox)
Definition: untbl.cxx:2295
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2353
void SetRange(const SwNodeRange &)
Definition: untbl.cxx:696
void AddFillBox(const SwTableBox &rBox)
Definition: untbl.cxx:829
void SaveFormula(SwHistory &rHistory)
Definition: untbl.cxx:2942
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:353
sal_uLong m_nStartNode
Definition: UndoTable.hxx:55
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2203
sal_uInt16 m_nHeadlineRepeat
Definition: UndoTable.hxx:109
std::unique_ptr< std::vector< sal_uInt16 > > m_pColumnWidth
Definition: UndoTable.hxx:52
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3187
SwTableToTextSaves m_vBoxSaves
Definition: UndoTable.hxx:105
void AddBoxAfter(const SwTableBox &rBox, const SwNodeIndex &rIdx, bool bDelContent)
Definition: untbl.cxx:2633
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3157
SwUndoAttrTable(const SwTableNode &rTableNd, bool bClearTabCols=false)
Definition: untbl.cxx:1343
void SaveBoxContent(const SwTableBox &rBox)
Definition: untbl.cxx:1403
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1442