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 <ndarr.hxx>
25 #include <undobj.hxx>
26 #include <set>
27 #include <itabenum.hxx>
28 #include <tblenum.hxx>
29 #include <memory>
30 #include <vector>
31 
32 class SfxItemSet;
33 
34 struct SwSaveRowSpan;
35 class SaveTable;
36 class SwDDEFieldType;
37 class SwUndoDelete;
38 class SwSelBoxes;
39 class SwTable;
40 class SwTableBox;
41 class SwStartNode;
42 class SwTableNode;
43 class SwTableAutoFormat;
44 class SwTableSortBoxes;
45 
46 class SwUndoInsTable : public SwUndo
47 {
48  OUString m_sTableName;
50  std::unique_ptr<SwDDEFieldType> m_pDDEFieldType;
51  std::unique_ptr<std::vector<sal_uInt16>> m_pColumnWidth;
52  std::unique_ptr<SwRedlineData> m_pRedlineData;
53  std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
55  sal_uInt16 m_nRows, m_nColumns;
56  sal_uInt16 const m_nAdjust;
57 
58 public:
59  SwUndoInsTable( const SwPosition&, sal_uInt16 nCols, sal_uInt16 nRows,
60  sal_uInt16 eAdjust, const SwInsertTableOptions& rInsTableOpts,
61  const SwTableAutoFormat* pTAFormat, const std::vector<sal_uInt16> *pColArr,
62  const OUString & rName);
63 
64  virtual ~SwUndoInsTable() override;
65 
66  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
67  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
68  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
69 
70  virtual SwRewriter GetRewriter() const override;
71 };
72 
73 class SwUndoTextToTable : public SwUndo, public SwUndRng
74 {
75  OUString m_sTableName;
77  std::vector<sal_uLong> mvDelBoxes;
78  std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
81  sal_uInt16 m_nAdjust;
82  bool m_bSplitEnd : 1;
83 
84 public:
86  sal_uInt16,
87  const SwTableAutoFormat* pAFormat );
88 
89  virtual ~SwUndoTextToTable() override;
90 
91  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
92  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
93  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
94 
95  SwHistory& GetHistory(); // will be created if necessary
96  void AddFillBox( const SwTableBox& rBox );
97 };
98 
99 class SwUndoTableToText : public SwUndo
100 {
101  OUString m_sTableName;
102  std::unique_ptr<SwDDEFieldType> m_pDDEFieldType;
103  std::unique_ptr<SaveTable> m_pTableSave;
105  std::unique_ptr<SwHistory> m_pHistory;
108  sal_uInt16 m_nHeadlineRepeat;
110 
111 public:
112  SwUndoTableToText( const SwTable& rTable, sal_Unicode cCh );
113 
114  virtual ~SwUndoTableToText() override;
115 
116  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
117  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
118  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
119 
120  void SetRange( const SwNodeRange& );
121  void AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx,
122  sal_Int32 nContentIdx = SAL_MAX_INT32);
123 };
124 
125 class SwUndoAttrTable : public SwUndo
126 {
128  std::unique_ptr<SaveTable> m_pSaveTable;
130 
131 public:
132  SwUndoAttrTable( const SwTableNode& rTableNd, bool bClearTabCols = false );
133 
134  virtual ~SwUndoAttrTable() override;
135 
136  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
137  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
138 };
139 
141 
143 {
146  std::unique_ptr<SaveTable> m_pSaveTable;
147  std::vector< std::shared_ptr<SwUndoTableNumFormat> > m_Undos;
149  sal_uInt16 m_nRepeatHeading;
150 
151  void UndoRedo(bool const bUndo, ::sw::UndoRedoContext & rContext);
152 
153 public:
154  SwUndoTableAutoFormat( const SwTableNode& rTableNd, const SwTableAutoFormat& );
155 
156  virtual ~SwUndoTableAutoFormat() override;
157 
158  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
159  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
160 
161  void SaveBoxContent( const SwTableBox& rBox );
162 };
163 
164 using SwUndoSaveSections = std::vector<std::unique_ptr<SwUndoSaveSection, o3tl::default_delete<SwUndoSaveSection>>>;
165 
166 class SwUndoTableNdsChg : public SwUndo
167 {
168  std::unique_ptr<SaveTable> m_pSaveTable;
169  std::set<sal_uLong> m_Boxes;
170  struct BoxMove
171  {
173  bool hasMoved;
174  BoxMove(sal_uLong idx, bool moved=false) : index(idx), hasMoved(moved) {};
175  bool operator<(const BoxMove& other) const { return index < other.index; };
176  };
177  std::unique_ptr< std::set<BoxMove> > m_pNewSttNds;
178  std::unique_ptr<SwUndoSaveSections> m_pDelSects;
179  long m_nMin, m_nMax; // for redo of delete column
181  sal_uInt16 m_nCount;
182  bool m_bFlag;
183  bool m_bSameHeight; // only used for SplitRow
184 
185  SwUndoTableNdsChg(SwUndoTableNdsChg const&) = delete;
187 
188 public:
189  SwUndoTableNdsChg( SwUndoId UndoId,
190  const SwSelBoxes& rBoxes,
191  const SwTableNode& rTableNd,
192  long nMn, long nMx,
193  sal_uInt16 nCnt, bool bFlg, bool bSameHeight );
194 
195  virtual ~SwUndoTableNdsChg() override;
196 
197  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
198  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
199 
200  void SaveNewBoxes( const SwTableNode& rTableNd, const SwTableSortBoxes& rOld );
201  void SaveNewBoxes( const SwTableNode& rTableNd, const SwTableSortBoxes& rOld,
202  const SwSelBoxes& rBoxes, const std::vector<sal_uLong> &rNodeCnts );
203  void SaveSection( SwStartNode* pSttNd );
204  void ReNewBoxes( const SwSelBoxes& rBoxes );
205 
206 };
207 
208 class SwUndoMove;
209 
210 class SwUndoTableMerge : public SwUndo, private SwUndRng
211 {
213  std::unique_ptr<SaveTable> m_pSaveTable;
214  std::set<sal_uLong> m_Boxes;
215  std::vector<sal_uLong> m_aNewStartNodes;
216  std::vector<std::unique_ptr<SwUndoMove>> m_vMoves;
217  std::unique_ptr<SwHistory> m_pHistory;
218 
219 public:
220  SwUndoTableMerge( const SwPaM& rTableSel );
221 
222  virtual ~SwUndoTableMerge() override;
223 
224  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
225  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
226 
227  void MoveBoxContent( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& rPos );
228 
229  void SetSelBoxes( const SwSelBoxes& rBoxes );
230 
231  void AddNewBox( sal_uLong nSttNdIdx )
232  { m_aNewStartNodes.push_back( nSttNdIdx ); }
233 
234  void SaveCollection( const SwTableBox& rBox );
235 };
236 
238 {
239  std::unique_ptr<SfxItemSet> m_pBoxSet;
240  std::unique_ptr<SwHistory> m_pHistory;
242 
244  double m_fNum, m_fNewNum;
247 
248  bool m_bNewFormat : 1;
249  bool m_bNewFormula : 1;
250  bool m_bNewValue : 1;
251 
252 public:
253  SwUndoTableNumFormat( const SwTableBox& rBox, const SfxItemSet* pNewSet = nullptr );
254 
255  virtual ~SwUndoTableNumFormat() override;
256 
257  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
258  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
259 
260  void SetNumFormat( sal_uLong nNewNumFormatIdx, const double& rNewNumber )
261  { m_nFormatIdx = nNewNumFormatIdx; m_fNum = rNewNumber; }
262  void SetBox( const SwTableBox& rBox );
263 };
264 
266 
268 {
269  std::vector<std::unique_ptr<UndoTableCpyTable_Entry>> m_vArr;
270  std::unique_ptr<SwUndoTableNdsChg> m_pInsRowUndo;
271 
272  //b6341295: When redlining is active, PrepareRedline has to create the
273  //redlining attributes for the new and the old table cell content
274  static std::unique_ptr<SwUndo> PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
275  const SwPosition& rPos, bool& rJoin, bool bRedo );
276 
277 public:
278  SwUndoTableCpyTable(const SwDoc* pDoc);
279 
280  virtual ~SwUndoTableCpyTable() override;
281 
282  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
283  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
284 
285  void AddBoxBefore( const SwTableBox& rBox, bool bDelContent );
286  void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx,
287  bool bDelContent );
288 
289  bool IsEmpty() const;
290  bool InsertRow( SwTable& rTable, const SwSelBoxes& rBoxes, sal_uInt16 nCnt );
291 };
292 
293 class SwUndoCpyTable : public SwUndo
294 {
295  std::unique_ptr<SwUndoDelete> m_pDelete;
297 
298 public:
299  SwUndoCpyTable(const SwDoc* pDoc);
300 
301  virtual ~SwUndoCpyTable() override;
302 
303  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
304  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
305 
306  void SetTableSttIdx( sal_uLong nIdx ) { m_nTableNode = nIdx; }
307 };
308 
309 class SwUndoSplitTable : public SwUndo
310 {
312  std::unique_ptr<SwSaveRowSpan> mpSaveRowSpan; // stores row span values at the splitting row
313  std::unique_ptr<SaveTable> m_pSavedTable;
314  std::unique_ptr<SwHistory> m_pHistory;
316  sal_uInt16 m_nFormulaEnd;
318 
319 public:
320  SwUndoSplitTable( const SwTableNode& rTableNd, std::unique_ptr<SwSaveRowSpan> pRowSp,
321  SplitTable_HeadlineOption nMode, bool bCalcNewSize );
322 
323  virtual ~SwUndoSplitTable() override;
324 
325  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
326  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
327  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
328 
329  void SetTableNodeOffset( sal_uLong nIdx ) { m_nOffset = nIdx - m_nTableNode; }
330  SwHistory* GetHistory() { return m_pHistory.get(); }
331  void SaveFormula( SwHistory& rHistory );
332 };
333 
334 class SwUndoMergeTable : public SwUndo
335 {
336  OUString m_aName;
338  std::unique_ptr<SaveTable> m_pSaveTable, m_pSaveHdl;
339  std::unique_ptr<SwHistory> m_pHistory;
340  sal_uInt16 m_nMode;
342 
343 public:
344  SwUndoMergeTable( const SwTableNode& rTableNd, const SwTableNode& rDelTableNd,
345  bool bWithPrev, sal_uInt16 nMode );
346 
347  virtual ~SwUndoMergeTable() override;
348 
349  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
350  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
351  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
352 
353  void SaveFormula( SwHistory& rHistory );
354 };
355 
357 {
359  sal_uInt16 m_nOldHeadline;
360  sal_uInt16 m_nNewHeadline;
361 
362 public:
363  SwUndoTableHeadline( const SwTable&, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl );
364 
365  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
366  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
367  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
368 };
369 
370 void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx );
371 
373 {
374  OUString m_sName;
375  std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
376 public:
377  SwUndoTableStyleMake(const OUString& rName, const SwDoc* pDoc);
378 
379  virtual ~SwUndoTableStyleMake() override;
380 
381  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
382  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
383 
384  virtual SwRewriter GetRewriter() const override;
385 };
386 
388 {
389  std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
390  std::vector<SwTable*> m_rAffectedTables;
391 public:
392  SwUndoTableStyleDelete(std::unique_ptr<SwTableAutoFormat> pAutoFormat, const std::vector<SwTable*>& rAffectedTables, const SwDoc* pDoc);
393 
394  virtual ~SwUndoTableStyleDelete() override;
395 
396  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
397  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
398 
399  virtual SwRewriter GetRewriter() const override;
400 };
401 
403 {
404  std::unique_ptr<SwTableAutoFormat> m_pOldFormat, m_pNewFormat;
405 public:
406  SwUndoTableStyleUpdate(const SwTableAutoFormat& rNewFormat, const SwTableAutoFormat& rOldFormat, const SwDoc* pDoc);
407 
408  virtual ~SwUndoTableStyleUpdate() override;
409 
410  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
411  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
412 
413  virtual SwRewriter GetRewriter() const override;
414 };
415 
416 #endif // INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX
417 
418 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3092
sal_uInt16 m_nRepeatHeading
Definition: UndoTable.hxx:149
Starts a section of nodes in the document model.
Definition: node.hxx:303
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:3010
std::unique_ptr< SaveTable > m_pSaveHdl
Definition: UndoTable.hxx:338
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:298
virtual ~SwUndoAttrTable() override
Definition: untbl.cxx:1367
SwUndoTextToTable(const SwPaM &, const SwInsertTableOptions &, sal_Unicode, sal_uInt16, const SwTableAutoFormat *pAFormat)
Definition: untbl.cxx:693
std::unique_ptr< SwDDEFieldType > m_pDDEFieldType
Definition: UndoTable.hxx:50
std::vector< std::unique_ptr< SwUndoMove > > m_vMoves
Definition: UndoTable.hxx:216
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1854
Marks a position in the document model.
Definition: pam.hxx:35
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2739
SwUndoTableStyleUpdate(const SwTableAutoFormat &rNewFormat, const SwTableAutoFormat &rOldFormat, const SwDoc *pDoc)
Definition: untbl.cxx:3129
virtual ~SwUndoTableMerge() override
Definition: untbl.cxx:1847
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:338
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2482
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1371
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:666
SwInsertTableOptions m_aInsTableOptions
Definition: UndoTable.hxx:49
SwUndoId
Definition: swundo.hxx:29
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1788
std::unique_ptr< SwTableAutoFormat > m_pNewFormat
Definition: UndoTable.hxx:404
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:804
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2796
sal_uLong m_nFormatIdx
Definition: UndoTable.hxx:243
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:240
sal_uIntPtr sal_uLong
void ReNewBoxes(const SwSelBoxes &rBoxes)
Definition: untbl.cxx:1487
std::vector< SwTable * > m_rAffectedTables
Definition: UndoTable.hxx:390
std::vector< sal_uLong > mvDelBoxes
Definition: UndoTable.hxx:77
SwUndoTableToText(const SwTable &rTable, sal_Unicode cCh)
Definition: untbl.cxx:400
SwUndoSplitTable(const SwTableNode &rTableNd, std::unique_ptr< SwSaveRowSpan > pRowSp, SplitTable_HeadlineOption nMode, bool bCalcNewSize)
Definition: untbl.cxx:2770
std::unique_ptr< SwDDEFieldType > m_pDDEFieldType
Definition: UndoTable.hxx:102
bool IsEmpty() const
Definition: untbl.cxx:2725
Definition: doc.hxx:186
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2993
SwUndoTableHeadline(const SwTable &, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl)
Definition: untbl.cxx:827
std::unique_ptr< SwUndoDelete > m_pDelete
Definition: UndoTable.hxx:295
sal_uLong m_nOffset
Definition: UndoTable.hxx:311
SwInsertTableOptions m_aInsertTableOpts
Definition: UndoTable.hxx:76
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:314
sal_uInt16 m_nNewHeadline
Definition: UndoTable.hxx:360
virtual ~SwUndoTableStyleUpdate() override
Definition: untbl.cxx:3135
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:840
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3116
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:375
SwUndoTableStyleDelete(std::unique_ptr< SwTableAutoFormat > pAutoFormat, const std::vector< SwTable * > &rAffectedTables, const SwDoc *pDoc)
Definition: untbl.cxx:3099
std::unique_ptr< SwTableAutoFormat > m_pOldFormat
Definition: UndoTable.hxx:404
void SaveNewBoxes(const SwTableNode &rTableNd, const SwTableSortBoxes &rOld)
Definition: untbl.cxx:1503
std::unique_ptr< SwSaveRowSpan > mpSaveRowSpan
Definition: UndoTable.hxx:312
sal_uInt16 m_nOldHeadline
Definition: UndoTable.hxx:359
SwUndoTableNumFormat(const SwTableBox &rBox, const SfxItemSet *pNewSet=nullptr)
Definition: untbl.cxx:2050
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2928
sal_uInt16 sal_Unicode
std::vector< std::shared_ptr< SwUndoTableNumFormat > > m_Undos
Definition: UndoTable.hxx:147
SwUndoTableCpyTable(const SwDoc *pDoc)
Definition: untbl.cxx:2322
virtual ~SwUndoTableNdsChg() override
Definition: untbl.cxx:1499
sal_uLong m_nEndNode
Definition: UndoTable.hxx:106
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:389
void AddBoxPos(SwDoc &rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx, sal_Int32 nContentIdx=SAL_MAX_INT32)
Definition: untbl.cxx:688
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:256
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:2902
sal_Unicode m_cSeparator
Definition: UndoTable.hxx:80
virtual ~SwUndoSplitTable() override
Definition: untbl.cxx:2789
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:168
sal_uLong m_nNewFormatIdx
Definition: UndoTable.hxx:243
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:213
sal_Unicode m_cSeparator
Definition: UndoTable.hxx:107
void SetTableNodeOffset(sal_uLong nIdx)
Definition: UndoTable.hxx:329
sal_uInt16 m_nAdjust
Definition: UndoTable.hxx:81
SplitTable_HeadlineOption const m_nMode
Definition: UndoTable.hxx:315
OUString m_sTableName
Definition: UndoTable.hxx:101
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
virtual ~SwUndoCpyTable() override
Definition: untbl.cxx:2735
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3143
virtual ~SwUndoTableAutoFormat() override
Definition: untbl.cxx:1415
BoxMove(sal_uLong idx, bool moved=false)
Definition: UndoTable.hxx:174
bool InsertRow(SwTable &rTable, const SwSelBoxes &rBoxes, sal_uInt16 nCnt)
Definition: untbl.cxx:2705
sal_uLong m_nStartNode
Definition: UndoTable.hxx:106
SwUndoTableStyleMake(const OUString &rName, const SwDoc *pDoc)
Definition: untbl.cxx:3066
std::set< sal_uLong > m_Boxes
Definition: UndoTable.hxx:214
virtual ~SwUndoTableToText() override
Definition: untbl.cxx:440
SwUndoTableAutoFormat(const SwTableNode &rTableNd, const SwTableAutoFormat &)
Definition: untbl.cxx:1396
std::vector< std::unique_ptr< SwTableToTextSave >> SwTableToTextSaves
Definition: ndarr.hxx:85
sal_uLong m_nTableNode
Definition: UndoTable.hxx:311
virtual ~SwUndoTableCpyTable() override
Definition: untbl.cxx:2327
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:105
void SaveFormula(SwHistory &rHistory)
Definition: untbl.cxx:3019
void SetTableSttIdx(sal_uLong nIdx)
Definition: UndoTable.hxx:306
void SetSelBoxes(const SwSelBoxes &rBoxes)
Definition: untbl.cxx:2018
SplitTable_HeadlineOption
Definition: tblenum.hxx:53
static std::unique_ptr< SwUndo > PrepareRedline(SwDoc *pDoc, const SwTableBox &rBox, const SwPosition &rPos, bool &rJoin, bool bRedo)
Definition: untbl.cxx:2634
std::unique_ptr< SfxItemSet > m_pBoxSet
Definition: UndoTable.hxx:239
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1390
sal_uLong m_nStartNode
Definition: UndoTable.hxx:127
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3148
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:53
sal_uLong m_nSttNode
Definition: UndoTable.hxx:180
std::vector< sal_uLong > m_aNewStartNodes
Definition: UndoTable.hxx:215
sal_uLong m_nTableNode
Definition: UndoTable.hxx:358
OUString m_aName
Definition: UndoTable.hxx:336
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:849
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:348
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:146
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:339
virtual ~SwUndoTableNumFormat() override
Definition: untbl.cxx:2118
Marks a node in the document model.
Definition: ndindex.hxx:31
void MoveBoxContent(SwDoc *pDoc, SwNodeRange &rRg, SwNodeIndex &rPos)
Definition: untbl.cxx:2003
sal_uInt16 m_nColumns
Definition: UndoTable.hxx:55
std::unique_ptr< SwUndoTableNdsChg > m_pInsRowUndo
Definition: UndoTable.hxx:270
sal_uInt16 m_nMode
Definition: UndoTable.hxx:340
sal_uLong index
Index of this box.
Definition: UndoTable.hxx:172
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:217
sal_uLong m_nTableNode
Definition: UndoTable.hxx:212
void UndoRedo(bool const bUndo,::sw::UndoRedoContext &rContext)
Definition: untbl.cxx:1425
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2764
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:110
void AddBoxBefore(const SwTableBox &rBox, bool bDelContent)
Definition: untbl.cxx:2572
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:2884
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Definition: UndoTable.hxx:78
std::unique_ptr< SaveTable > m_pTableSave
Definition: UndoTable.hxx:103
std::unique_ptr< std::set< BoxMove > > m_pNewSttNds
Definition: UndoTable.hxx:177
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1996
std::unique_ptr< SaveTable > m_pSavedTable
Definition: UndoTable.hxx:313
virtual ~SwUndoTableStyleDelete() override
Definition: untbl.cxx:3105
SwHistory * GetHistory()
Definition: UndoTable.hxx:330
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:793
void SaveSection(SwStartNode *pSttNd)
Definition: untbl.cxx:1634
std::vector< std::unique_ptr< SwUndoSaveSection, o3tl::default_delete< SwUndoSaveSection >>> SwUndoSaveSections
Definition: UndoTable.hxx:164
sal_uInt16 const m_nAdjust
Definition: UndoTable.hxx:56
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3074
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2124
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:448
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:128
std::vector< std::unique_ptr< UndoTableCpyTable_Entry > > m_vArr
Definition: UndoTable.hxx:269
sal_uLong m_nTableNode
Definition: UndoTable.hxx:296
sal_uInt16 m_nCount
Definition: UndoTable.hxx:181
sal_uInt16 m_nRows
Definition: UndoTable.hxx:55
SwUndoTableMerge(const SwPaM &rTableSel)
Definition: untbl.cxx:1838
bool hasMoved
Has this box been moved already.
Definition: UndoTable.hxx:173
sal_uLong m_nTableNode
Definition: UndoTable.hxx:337
SwUndoTableNdsChg(SwUndoTableNdsChg const &)=delete
sal_uInt16 m_nFormulaEnd
Definition: UndoTable.hxx:316
void SaveCollection(const SwTableBox &rBox)
Definition: untbl.cxx:2035
SwHistory & GetHistory()
Definition: untbl.cxx:820
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1463
bool operator<(const BoxMove &other) const
Definition: UndoTable.hxx:175
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:386
SwUndoCpyTable(const SwDoc *pDoc)
Definition: untbl.cxx:2730
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:631
virtual ~SwUndoTableStyleMake() override
Definition: untbl.cxx:3071
void InsertSort(std::vector< sal_uInt16 > &rArr, sal_uInt16 nIdx)
Definition: untbl.cxx:3026
std::unique_ptr< SwRedlineData > m_pRedlineData
Definition: UndoTable.hxx:52
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2872
virtual ~SwUndoInsTable() override
Definition: untbl.cxx:248
virtual ~SwUndoMergeTable() override
Definition: untbl.cxx:2921
void SetNumFormat(sal_uLong nNewNumFormatIdx, const double &rNewNumber)
Definition: UndoTable.hxx:260
SwHistory * m_pHistory
Definition: UndoTable.hxx:79
OUString m_sTableName
Definition: UndoTable.hxx:48
SwUndoTableNdsChg & operator=(SwUndoTableNdsChg const &)=delete
std::set< sal_uLong > m_Boxes
Definition: UndoTable.hxx:169
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:221
void AddNewBox(sal_uLong nSttNdIdx)
Definition: UndoTable.hxx:231
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1648
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:859
OUString m_sTableName
Definition: UndoTable.hxx:75
std::unique_ptr< SwUndoSaveSections > m_pDelSects
Definition: UndoTable.hxx:178
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:715
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3079
Definition: untbl.cxx:81
virtual ~SwUndoTextToTable() override
Definition: untbl.cxx:710
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3122
void SetBox(const SwTableBox &rBox)
Definition: untbl.cxx:2311
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2333
void SetRange(const SwNodeRange &)
Definition: untbl.cxx:682
void AddFillBox(const SwTableBox &rBox)
Definition: untbl.cxx:815
void SaveFormula(SwHistory &rHistory)
Definition: untbl.cxx:2893
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:341
sal_uLong m_nStartNode
Definition: UndoTable.hxx:54
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2219
sal_uInt16 m_nHeadlineRepeat
Definition: UndoTable.hxx:108
std::unique_ptr< std::vector< sal_uInt16 > > m_pColumnWidth
Definition: UndoTable.hxx:51
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3138
SwTableToTextSaves m_vBoxSaves
Definition: UndoTable.hxx:104
void AddBoxAfter(const SwTableBox &rBox, const SwNodeIndex &rIdx, bool bDelContent)
Definition: untbl.cxx:2605
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3108
SwUndoAttrTable(const SwTableNode &rTableNd, bool bClearTabCols=false)
Definition: untbl.cxx:1359
void SaveBoxContent(const SwTableBox &rBox)
Definition: untbl.cxx:1419
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1458