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