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 sTableNm;
50  std::unique_ptr<SwDDEFieldType> pDDEFieldType;
51  std::unique_ptr<std::vector<sal_uInt16>> pColWidth;
52  std::unique_ptr<SwRedlineData> pRedlData;
53  std::unique_ptr<SwTableAutoFormat> pAutoFormat;
55  sal_uInt16 nRows, nCols;
56  sal_uInt16 const 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 sTableNm;
77  std::vector<sal_uLong> mvDelBoxes;
78  std::unique_ptr<SwTableAutoFormat> pAutoFormat;
81  sal_uInt16 const nAdjust;
82  bool 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 const sTableNm;
102  std::unique_ptr<SwDDEFieldType> pDDEFieldType;
103  std::unique_ptr<SaveTable> pTableSave;
105  std::unique_ptr<SwHistory> pHistory;
108  sal_uInt16 const nHdlnRpt;
109  bool bCheckNumFormat : 1;
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> pSaveTable;
129  bool bClearTabCol : 1;
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> pSaveTable;
147  std::vector< std::shared_ptr<SwUndoTableNumFormat> > m_Undos;
149  sal_uInt16 const 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 const 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 const m_bFlag;
183  bool const 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> pSaveTable;
214  std::set<sal_uLong> m_Boxes;
215  std::vector<sal_uLong> aNewSttNds;
216  std::vector<std::unique_ptr<SwUndoMove>> m_vMoves;
217  std::unique_ptr<SwHistory> 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  { aNewSttNds.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> 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> pDel;
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 ) { 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> pSavTable;
314  std::unique_ptr<SwHistory> pHistory;
316  sal_uInt16 nFormulaEnd;
317  bool const bCalcNewSize;
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 ) { nOffset = nIdx - nTableNode; }
330  SwHistory* GetHistory() { return pHistory.get(); }
331  void SaveFormula( SwHistory& rHistory );
332 };
333 
334 class SwUndoMergeTable : public SwUndo
335 {
336  OUString aName;
338  std::unique_ptr<SaveTable> pSavTable, pSavHdl;
339  std::unique_ptr<SwHistory> pHistory;
340  sal_uInt16 const nMode;
341  bool const bWithPrev;
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 const nOldHeadline;
360  sal_uInt16 const 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 const 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:3088
Starts a section of nodes in the document model.
Definition: node.hxx:303
sal_uLong nSttNode
Definition: UndoTable.hxx:54
OUString const sTableNm
Definition: UndoTable.hxx:101
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:3006
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:295
virtual ~SwUndoAttrTable() override
Definition: untbl.cxx:1365
SwUndoTextToTable(const SwPaM &, const SwInsertTableOptions &, sal_Unicode, sal_uInt16, const SwTableAutoFormat *pAFormat)
Definition: untbl.cxx:690
std::vector< std::unique_ptr< SwUndoMove > > m_vMoves
Definition: UndoTable.hxx:216
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1853
sal_uInt16 nRows
Definition: UndoTable.hxx:55
Marks a position in the document model.
Definition: pam.hxx:35
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2735
SwUndoTableStyleUpdate(const SwTableAutoFormat &rNewFormat, const SwTableAutoFormat &rOldFormat, const SwDoc *pDoc)
Definition: untbl.cxx:3125
std::unique_ptr< SaveTable > pSaveTable
Definition: UndoTable.hxx:128
virtual ~SwUndoTableMerge() override
Definition: untbl.cxx:1846
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2478
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1369
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:663
sal_uLong nOffset
Definition: UndoTable.hxx:311
SwUndoId
Definition: swundo.hxx:29
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1787
std::unique_ptr< SwTableAutoFormat > m_pNewFormat
Definition: UndoTable.hxx:404
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:802
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2792
SwInsertTableOptions const aInsTableOpts
Definition: UndoTable.hxx:76
sal_uLong m_nFormatIdx
Definition: UndoTable.hxx:243
SwInsertTableOptions const aInsTableOpts
Definition: UndoTable.hxx:49
std::unique_ptr< SwHistory > m_pHistory
Definition: UndoTable.hxx:240
sal_uLong nTableNode
Definition: UndoTable.hxx:296
sal_uIntPtr sal_uLong
void ReNewBoxes(const SwSelBoxes &rBoxes)
Definition: untbl.cxx:1486
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:397
std::unique_ptr< SwDDEFieldType > pDDEFieldType
Definition: UndoTable.hxx:50
sal_uLong nEndNd
Definition: UndoTable.hxx:106
SwUndoSplitTable(const SwTableNode &rTableNd, std::unique_ptr< SwSaveRowSpan > pRowSp, SplitTable_HeadlineOption nMode, bool bCalcNewSize)
Definition: untbl.cxx:2766
bool const m_bSameHeight
Definition: UndoTable.hxx:183
OUString sTableNm
Definition: UndoTable.hxx:75
bool IsEmpty() const
Definition: untbl.cxx:2721
Definition: doc.hxx:185
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2989
SwUndoTableHeadline(const SwTable &, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl)
Definition: untbl.cxx:825
std::unique_ptr< SaveTable > pTableSave
Definition: UndoTable.hxx:103
std::unique_ptr< SwHistory > pHistory
Definition: UndoTable.hxx:339
virtual ~SwUndoTableStyleUpdate() override
Definition: untbl.cxx:3131
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:838
std::unique_ptr< SwHistory > pHistory
Definition: UndoTable.hxx:217
std::unique_ptr< SwUndoDelete > pDel
Definition: UndoTable.hxx:295
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3112
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:3095
std::unique_ptr< SwTableAutoFormat > m_pOldFormat
Definition: UndoTable.hxx:404
void SaveNewBoxes(const SwTableNode &rTableNd, const SwTableSortBoxes &rOld)
Definition: untbl.cxx:1502
std::unique_ptr< SwSaveRowSpan > mpSaveRowSpan
Definition: UndoTable.hxx:312
SwUndoTableNumFormat(const SwTableBox &rBox, const SfxItemSet *pNewSet=nullptr)
Definition: untbl.cxx:2050
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2924
sal_uInt16 sal_Unicode
std::vector< std::shared_ptr< SwUndoTableNumFormat > > m_Undos
Definition: UndoTable.hxx:147
SwUndoTableCpyTable(const SwDoc *pDoc)
Definition: untbl.cxx:2318
virtual ~SwUndoTableNdsChg() override
Definition: untbl.cxx:1498
sal_uLong nSttNd
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:685
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:253
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:2898
virtual ~SwUndoSplitTable() override
Definition: untbl.cxx:2785
sal_uInt16 const nOldHeadline
Definition: UndoTable.hxx:359
std::unique_ptr< SaveTable > m_pSaveTable
Definition: UndoTable.hxx:168
sal_uLong m_nNewFormatIdx
Definition: UndoTable.hxx:243
std::unique_ptr< SwHistory > pHistory
Definition: UndoTable.hxx:314
std::unique_ptr< SwTableAutoFormat > pAutoFormat
Definition: UndoTable.hxx:53
SwHistory * pHistory
Definition: UndoTable.hxx:79
void SetTableNodeOffset(sal_uLong nIdx)
Definition: UndoTable.hxx:329
sal_Unicode const cSeparator
Definition: UndoTable.hxx:107
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
std::unique_ptr< SaveTable > pSaveTable
Definition: UndoTable.hxx:146
virtual ~SwUndoCpyTable() override
Definition: untbl.cxx:2731
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3139
virtual ~SwUndoTableAutoFormat() override
Definition: untbl.cxx:1413
BoxMove(sal_uLong idx, bool moved=false)
Definition: UndoTable.hxx:174
OUString const m_sName
Definition: UndoTable.hxx:374
bool InsertRow(SwTable &rTable, const SwSelBoxes &rBoxes, sal_uInt16 nCnt)
Definition: untbl.cxx:2701
SwUndoTableStyleMake(const OUString &rName, const SwDoc *pDoc)
Definition: untbl.cxx:3062
std::set< sal_uLong > m_Boxes
Definition: UndoTable.hxx:214
virtual ~SwUndoTableToText() override
Definition: untbl.cxx:437
SwUndoTableAutoFormat(const SwTableNode &rTableNd, const SwTableAutoFormat &)
Definition: untbl.cxx:1394
std::vector< std::unique_ptr< SwTableToTextSave >> SwTableToTextSaves
Definition: ndarr.hxx:86
virtual ~SwUndoTableCpyTable() override
Definition: untbl.cxx:2323
void SaveFormula(SwHistory &rHistory)
Definition: untbl.cxx:3015
void SetTableSttIdx(sal_uLong nIdx)
Definition: UndoTable.hxx:306
sal_uLong nTableNode
Definition: UndoTable.hxx:212
std::unique_ptr< SaveTable > pSavTable
Definition: UndoTable.hxx:338
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:2630
std::unique_ptr< SfxItemSet > m_pBoxSet
Definition: UndoTable.hxx:239
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1388
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3144
sal_uLong m_nSttNode
Definition: UndoTable.hxx:180
std::unique_ptr< SwHistory > pHistory
Definition: UndoTable.hxx:105
SplitTable_HeadlineOption const nMode
Definition: UndoTable.hxx:315
sal_uInt16 const nMode
Definition: UndoTable.hxx:340
sal_uInt16 const m_nRepeatHeading
Definition: UndoTable.hxx:149
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:847
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:345
virtual ~SwUndoTableNumFormat() override
Definition: untbl.cxx:2118
Marks a node in the document model.
Definition: ndindex.hxx:31
sal_uInt16 nCols
Definition: UndoTable.hxx:55
void MoveBoxContent(SwDoc *pDoc, SwNodeRange &rRg, SwNodeIndex &rPos)
Definition: untbl.cxx:2003
sal_uLong index
Index of this box.
Definition: UndoTable.hxx:172
void UndoRedo(bool const bUndo,::sw::UndoRedoContext &rContext)
Definition: untbl.cxx:1424
std::vector< sal_uLong > aNewSttNds
Definition: UndoTable.hxx:215
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2760
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:2568
sal_uInt16 nFormulaEnd
Definition: UndoTable.hxx:316
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:2880
std::unique_ptr< std::set< BoxMove > > m_pNewSttNds
Definition: UndoTable.hxx:177
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1996
virtual ~SwUndoTableStyleDelete() override
Definition: untbl.cxx:3101
SwHistory * GetHistory()
Definition: UndoTable.hxx:330
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:791
void SaveSection(SwStartNode *pSttNd)
Definition: untbl.cxx:1633
std::vector< std::unique_ptr< SwUndoSaveSection, o3tl::default_delete< SwUndoSaveSection >>> SwUndoSaveSections
Definition: UndoTable.hxx:164
bool const hasMoved
Has this box been moved already.
Definition: UndoTable.hxx:173
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3070
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2124
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:445
sal_uInt16 const nAdjust
Definition: UndoTable.hxx:56
std::vector< std::unique_ptr< UndoTableCpyTable_Entry > > m_vArr
Definition: UndoTable.hxx:269
sal_uInt16 m_nCount
Definition: UndoTable.hxx:181
sal_uLong nTableNode
Definition: UndoTable.hxx:337
bool const bWithPrev
Definition: UndoTable.hxx:341
SwUndoTableMerge(const SwPaM &rTableSel)
Definition: untbl.cxx:1837
SwUndoTableNdsChg(SwUndoTableNdsChg const &)=delete
std::unique_ptr< std::vector< sal_uInt16 > > pColWidth
Definition: UndoTable.hxx:51
void SaveCollection(const SwTableBox &rBox)
Definition: untbl.cxx:2035
SwHistory & GetHistory()
Definition: untbl.cxx:818
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1462
std::unique_ptr< SaveTable > pSaveTable
Definition: UndoTable.hxx:213
bool operator<(const BoxMove &other) const
Definition: UndoTable.hxx:175
std::unique_ptr< SaveTable > pSavTable
Definition: UndoTable.hxx:313
sal_uInt16 const nAdjust
Definition: UndoTable.hxx:81
std::unique_ptr< SwRedlineData > pRedlData
Definition: UndoTable.hxx:52
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:386
SwUndoCpyTable(const SwDoc *pDoc)
Definition: untbl.cxx:2726
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:628
sal_Unicode const cSeparator
Definition: UndoTable.hxx:80
virtual ~SwUndoTableStyleMake() override
Definition: untbl.cxx:3067
sal_uInt16 const nHdlnRpt
Definition: UndoTable.hxx:108
void InsertSort(std::vector< sal_uInt16 > &rArr, sal_uInt16 nIdx)
Definition: untbl.cxx:3022
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2868
virtual ~SwUndoInsTable() override
Definition: untbl.cxx:245
sal_uLong nSttNode
Definition: UndoTable.hxx:127
virtual ~SwUndoMergeTable() override
Definition: untbl.cxx:2917
void SetNumFormat(sal_uLong nNewNumFormatIdx, const double &rNewNumber)
Definition: UndoTable.hxx:260
OUString sTableNm
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:218
void AddNewBox(sal_uLong nSttNdIdx)
Definition: UndoTable.hxx:231
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1647
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:857
std::unique_ptr< SwUndoSaveSections > m_pDelSects
Definition: UndoTable.hxx:178
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:712
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3075
Definition: untbl.cxx:85
virtual ~SwUndoTextToTable() override
Definition: untbl.cxx:707
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: untbl.cxx:3118
sal_uLong nTableNode
Definition: UndoTable.hxx:311
void SetBox(const SwTableBox &rBox)
Definition: untbl.cxx:2307
std::unique_ptr< SwDDEFieldType > pDDEFieldType
Definition: UndoTable.hxx:102
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2329
void SetRange(const SwNodeRange &)
Definition: untbl.cxx:679
void AddFillBox(const SwTableBox &rBox)
Definition: untbl.cxx:813
sal_uInt16 const nNewHeadline
Definition: UndoTable.hxx:360
void SaveFormula(SwHistory &rHistory)
Definition: untbl.cxx:2889
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: untbl.cxx:338
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:2215
bool const m_bFlag
Definition: UndoTable.hxx:182
std::unique_ptr< SwTableAutoFormat > pAutoFormat
Definition: UndoTable.hxx:78
std::unique_ptr< SwUndoTableNdsChg > pInsRowUndo
Definition: UndoTable.hxx:270
bool const bCalcNewSize
Definition: UndoTable.hxx:317
std::unique_ptr< SaveTable > pSavHdl
Definition: UndoTable.hxx:338
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3134
SwTableToTextSaves m_vBoxSaves
Definition: UndoTable.hxx:104
void AddBoxAfter(const SwTableBox &rBox, const SwNodeIndex &rIdx, bool bDelContent)
Definition: untbl.cxx:2601
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:3104
SwUndoAttrTable(const SwTableNode &rTableNd, bool bClearTabCols=false)
Definition: untbl.cxx:1357
void SaveBoxContent(const SwTableBox &rBox)
Definition: untbl.cxx:1417
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: untbl.cxx:1457