xref: /aoo41x/main/sw/source/core/inc/UndoTable.hxx (revision 1d2dbeb0)
1*1d2dbeb0SAndrew Rist /**************************************************************
2*1d2dbeb0SAndrew Rist  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*1d2dbeb0SAndrew Rist  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1d2dbeb0SAndrew Rist  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19*1d2dbeb0SAndrew Rist  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SW_UNDO_TABLE_HXX
25cdf0e10cSrcweir #define SW_UNDO_TABLE_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <undobj.hxx>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #ifndef _SVSTDARR_HXX
30cdf0e10cSrcweir #define _SVSTDARR_USHORTS
31cdf0e10cSrcweir #define _SVSTDARR_ULONGS
32cdf0e10cSrcweir #define _SVSTDARR_BOOLS
33cdf0e10cSrcweir #define _SVSTDARR_BYTES
34cdf0e10cSrcweir #define _SVSTDARR_USHORTSSORT
35cdf0e10cSrcweir #include <svl/svstdarr.hxx>
36cdf0e10cSrcweir #endif
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #include <swtypes.hxx>
39cdf0e10cSrcweir #include <itabenum.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir 
42cdf0e10cSrcweir class SfxItemSet;
43cdf0e10cSrcweir 
44cdf0e10cSrcweir struct SwSaveRowSpan;
45cdf0e10cSrcweir class _SaveTable;
46cdf0e10cSrcweir class SwDDEFieldType;
47cdf0e10cSrcweir class SwUndoSaveSections;
48cdf0e10cSrcweir class SwUndoMoves;
49cdf0e10cSrcweir class SwUndoDelete;
50cdf0e10cSrcweir class SwSelBoxes;
51cdf0e10cSrcweir class SwTblToTxtSaves;
52cdf0e10cSrcweir class SwTable;
53cdf0e10cSrcweir class SwTableBox;
54cdf0e10cSrcweir class SwStartNode;
55cdf0e10cSrcweir class SwTableNode;
56cdf0e10cSrcweir class SwTableAutoFmt;
57cdf0e10cSrcweir class SwTableSortBoxes;
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 
60cdf0e10cSrcweir class SwUndoInsTbl : public SwUndo
61cdf0e10cSrcweir {
62cdf0e10cSrcweir     String sTblNm;
63cdf0e10cSrcweir     SwInsertTableOptions aInsTblOpts;
64cdf0e10cSrcweir     SwDDEFieldType* pDDEFldType;
65cdf0e10cSrcweir     SvUShorts* pColWidth;
66cdf0e10cSrcweir     SwRedlineData*  pRedlData;
67cdf0e10cSrcweir     SwTableAutoFmt* pAutoFmt;
68cdf0e10cSrcweir     sal_uLong nSttNode;
69cdf0e10cSrcweir     sal_uInt16 nRows, nCols;
70cdf0e10cSrcweir     sal_uInt16 nAdjust;
71cdf0e10cSrcweir 
72cdf0e10cSrcweir public:
73cdf0e10cSrcweir     SwUndoInsTbl( const SwPosition&, sal_uInt16 nCols, sal_uInt16 nRows,
74cdf0e10cSrcweir                     sal_uInt16 eAdjust, const SwInsertTableOptions& rInsTblOpts,
75cdf0e10cSrcweir                     const SwTableAutoFmt* pTAFmt, const SvUShorts* pColArr,
76cdf0e10cSrcweir                   const String & rName);
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     virtual ~SwUndoInsTbl();
79cdf0e10cSrcweir 
80cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
81cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
82cdf0e10cSrcweir     virtual void RepeatImpl( ::sw::RepeatContext & );
83cdf0e10cSrcweir 
84cdf0e10cSrcweir     virtual SwRewriter GetRewriter() const;
85cdf0e10cSrcweir 
86cdf0e10cSrcweir };
87cdf0e10cSrcweir 
88cdf0e10cSrcweir class SwUndoTxtToTbl : public SwUndo, public SwUndRng
89cdf0e10cSrcweir {
90cdf0e10cSrcweir     String sTblNm;
91cdf0e10cSrcweir     SwInsertTableOptions aInsTblOpts;
92cdf0e10cSrcweir     SvULongs* pDelBoxes;
93cdf0e10cSrcweir     SwTableAutoFmt* pAutoFmt;
94cdf0e10cSrcweir     SwHistory* pHistory;
95cdf0e10cSrcweir     sal_Unicode cTrenner;
96cdf0e10cSrcweir     sal_uInt16 nAdjust;
97cdf0e10cSrcweir     sal_Bool bSplitEnd : 1;
98cdf0e10cSrcweir 
99cdf0e10cSrcweir public:
100cdf0e10cSrcweir     SwUndoTxtToTbl( const SwPaM&, const SwInsertTableOptions&, sal_Unicode,
101cdf0e10cSrcweir                     sal_uInt16,
102cdf0e10cSrcweir                     const SwTableAutoFmt* pAFmt );
103cdf0e10cSrcweir 
104cdf0e10cSrcweir     virtual ~SwUndoTxtToTbl();
105cdf0e10cSrcweir 
106cdf0e10cSrcweir 
107cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
108cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
109cdf0e10cSrcweir     virtual void RepeatImpl( ::sw::RepeatContext & );
110cdf0e10cSrcweir 
111cdf0e10cSrcweir     SwHistory& GetHistory(); // will be created if necessary
112cdf0e10cSrcweir     void AddFillBox( const SwTableBox& rBox );
113cdf0e10cSrcweir };
114cdf0e10cSrcweir 
115cdf0e10cSrcweir class SwUndoTblToTxt : public SwUndo
116cdf0e10cSrcweir {
117cdf0e10cSrcweir     String sTblNm;
118cdf0e10cSrcweir     SwDDEFieldType* pDDEFldType;
119cdf0e10cSrcweir     _SaveTable* pTblSave;
120cdf0e10cSrcweir     SwTblToTxtSaves* pBoxSaves;
121cdf0e10cSrcweir     SwHistory* pHistory;
122cdf0e10cSrcweir     sal_uLong nSttNd, nEndNd;
123cdf0e10cSrcweir     sal_uInt16 nAdjust;
124cdf0e10cSrcweir     sal_Unicode cTrenner;
125cdf0e10cSrcweir     sal_uInt16 nHdlnRpt;
126cdf0e10cSrcweir     sal_Bool bCheckNumFmt : 1;
127cdf0e10cSrcweir 
128cdf0e10cSrcweir public:
129cdf0e10cSrcweir     SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh );
130cdf0e10cSrcweir 
131cdf0e10cSrcweir     virtual ~SwUndoTblToTxt();
132cdf0e10cSrcweir 
133cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
134cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
135cdf0e10cSrcweir     virtual void RepeatImpl( ::sw::RepeatContext & );
136cdf0e10cSrcweir 
137cdf0e10cSrcweir     void SetRange( const SwNodeRange& );
138cdf0e10cSrcweir     void AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx,
139cdf0e10cSrcweir                     xub_StrLen nCntntIdx = STRING_MAXLEN);
140cdf0e10cSrcweir };
141cdf0e10cSrcweir 
142cdf0e10cSrcweir class SwUndoAttrTbl : public SwUndo
143cdf0e10cSrcweir {
144cdf0e10cSrcweir     sal_uLong nSttNode;
145cdf0e10cSrcweir     _SaveTable* pSaveTbl;
146cdf0e10cSrcweir     sal_Bool bClearTabCol : 1;
147cdf0e10cSrcweir public:
148cdf0e10cSrcweir     SwUndoAttrTbl( const SwTableNode& rTblNd, sal_Bool bClearTabCols = sal_False );
149cdf0e10cSrcweir 
150cdf0e10cSrcweir     virtual ~SwUndoAttrTbl();
151cdf0e10cSrcweir 
152cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
153cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
154cdf0e10cSrcweir };
155cdf0e10cSrcweir 
156cdf0e10cSrcweir class SwUndoTblNumFmt;
157cdf0e10cSrcweir 
158cdf0e10cSrcweir class SwUndoTblAutoFmt : public SwUndo
159cdf0e10cSrcweir {
160cdf0e10cSrcweir     sal_uLong nSttNode;
161cdf0e10cSrcweir     _SaveTable* pSaveTbl;
162cdf0e10cSrcweir     ::std::vector< ::boost::shared_ptr<SwUndoTblNumFmt> > m_Undos;
163cdf0e10cSrcweir     sal_Bool bSaveCntntAttr;
164cdf0e10cSrcweir 
165cdf0e10cSrcweir     void UndoRedo(bool const bUndo, ::sw::UndoRedoContext & rContext);
166cdf0e10cSrcweir 
167cdf0e10cSrcweir public:
168cdf0e10cSrcweir     SwUndoTblAutoFmt( const SwTableNode& rTblNd, const SwTableAutoFmt& );
169cdf0e10cSrcweir 
170cdf0e10cSrcweir     virtual ~SwUndoTblAutoFmt();
171cdf0e10cSrcweir 
172cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
173cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
174cdf0e10cSrcweir 
175cdf0e10cSrcweir     void SaveBoxCntnt( const SwTableBox& rBox );
176cdf0e10cSrcweir };
177cdf0e10cSrcweir 
178cdf0e10cSrcweir class SwUndoTblNdsChg : public SwUndo
179cdf0e10cSrcweir {
180cdf0e10cSrcweir     _SaveTable* pSaveTbl;
181cdf0e10cSrcweir     SvULongs aBoxes;
182cdf0e10cSrcweir 
183cdf0e10cSrcweir     union {
184cdf0e10cSrcweir         SvULongs* pNewSttNds;
185cdf0e10cSrcweir         SwUndoSaveSections* pDelSects;
186cdf0e10cSrcweir     } Ptrs;
187cdf0e10cSrcweir     SvBools aMvBoxes;       // for SplitRow (split Nodes of Box)
188cdf0e10cSrcweir     long nMin, nMax;        // for redo of delete column
189cdf0e10cSrcweir     sal_uLong nSttNode, nCurrBox;
190cdf0e10cSrcweir     sal_uInt16 nCount, nRelDiff, nAbsDiff, nSetColType;
191cdf0e10cSrcweir     sal_Bool bFlag;
192cdf0e10cSrcweir     sal_Bool bSameHeight;                   // only used for SplitRow
193cdf0e10cSrcweir public:
194cdf0e10cSrcweir     SwUndoTblNdsChg( SwUndoId UndoId,
195cdf0e10cSrcweir                     const SwSelBoxes& rBoxes,
196cdf0e10cSrcweir                     const SwTableNode& rTblNd,
197cdf0e10cSrcweir                     long nMn, long nMx,
198cdf0e10cSrcweir                     sal_uInt16 nCnt, sal_Bool bFlg, sal_Bool bSameHeight );
199cdf0e10cSrcweir 
200cdf0e10cSrcweir     // for SetColWidth
201cdf0e10cSrcweir     SwUndoTblNdsChg( SwUndoId UndoId, const SwSelBoxes& rBoxes,
202cdf0e10cSrcweir                     const SwTableNode& rTblNd );
203cdf0e10cSrcweir 
204cdf0e10cSrcweir     virtual ~SwUndoTblNdsChg();
205cdf0e10cSrcweir 
206cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
207cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
208cdf0e10cSrcweir 
209cdf0e10cSrcweir     void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld );
210cdf0e10cSrcweir     void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld,
211cdf0e10cSrcweir                        const SwSelBoxes& rBoxes, const SvULongs& rNodeCnts );
212cdf0e10cSrcweir     void SaveSection( SwStartNode* pSttNd );
213cdf0e10cSrcweir     void ReNewBoxes( const SwSelBoxes& rBoxes );
214cdf0e10cSrcweir 
215cdf0e10cSrcweir 
SetColWidthParam(sal_uLong nBoxIdx,sal_uInt16 nMode,sal_uInt16 nType,SwTwips nAbsDif,SwTwips nRelDif)216cdf0e10cSrcweir     void SetColWidthParam( sal_uLong nBoxIdx, sal_uInt16 nMode, sal_uInt16 nType,
217cdf0e10cSrcweir                             SwTwips nAbsDif, SwTwips nRelDif )
218cdf0e10cSrcweir     {
219cdf0e10cSrcweir         nCurrBox = nBoxIdx;
220cdf0e10cSrcweir         nCount = nMode;
221cdf0e10cSrcweir         nSetColType = nType;
222cdf0e10cSrcweir         nAbsDiff = (sal_uInt16)nAbsDif;
223cdf0e10cSrcweir         nRelDiff = (sal_uInt16)nRelDif;
224cdf0e10cSrcweir     }
225cdf0e10cSrcweir 
226cdf0e10cSrcweir };
227cdf0e10cSrcweir 
228cdf0e10cSrcweir class SwUndoTblMerge : public SwUndo, private SwUndRng
229cdf0e10cSrcweir {
230cdf0e10cSrcweir     sal_uLong nTblNode;
231cdf0e10cSrcweir     _SaveTable* pSaveTbl;
232cdf0e10cSrcweir     SvULongs aBoxes, aNewSttNds;
233cdf0e10cSrcweir     SwUndoMoves* pMoves;
234cdf0e10cSrcweir     SwHistory* pHistory;
235cdf0e10cSrcweir 
236cdf0e10cSrcweir public:
237cdf0e10cSrcweir     SwUndoTblMerge( const SwPaM& rTblSel );
238cdf0e10cSrcweir 
239cdf0e10cSrcweir     virtual ~SwUndoTblMerge();
240cdf0e10cSrcweir 
241cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
242cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
243cdf0e10cSrcweir 
244cdf0e10cSrcweir     void MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& rPos );
245cdf0e10cSrcweir 
246cdf0e10cSrcweir     void SetSelBoxes( const SwSelBoxes& rBoxes );
247cdf0e10cSrcweir 
AddNewBox(sal_uLong nSttNdIdx)248cdf0e10cSrcweir     void AddNewBox( sal_uLong nSttNdIdx )
249cdf0e10cSrcweir         { aNewSttNds.Insert( nSttNdIdx, aNewSttNds.Count() ); }
250cdf0e10cSrcweir 
251cdf0e10cSrcweir     void SaveCollection( const SwTableBox& rBox );
252cdf0e10cSrcweir 
253cdf0e10cSrcweir };
254cdf0e10cSrcweir 
255cdf0e10cSrcweir 
256cdf0e10cSrcweir class SwUndoTblNumFmt : public SwUndo
257cdf0e10cSrcweir {
258cdf0e10cSrcweir     SfxItemSet *pBoxSet;
259cdf0e10cSrcweir     SwHistory* pHistory;
260cdf0e10cSrcweir     String aStr, aNewFml;
261cdf0e10cSrcweir 
262cdf0e10cSrcweir     sal_uLong nFmtIdx, nNewFmtIdx;
263cdf0e10cSrcweir     double fNum, fNewNum;
264cdf0e10cSrcweir     sal_uLong nNode;
265cdf0e10cSrcweir     sal_uLong nNdPos;
266cdf0e10cSrcweir 
267cdf0e10cSrcweir     sal_Bool bNewFmt : 1;
268cdf0e10cSrcweir     sal_Bool bNewFml : 1;
269cdf0e10cSrcweir     sal_Bool bNewValue : 1;
270cdf0e10cSrcweir 
271cdf0e10cSrcweir public:
272cdf0e10cSrcweir     SwUndoTblNumFmt( const SwTableBox& rBox, const SfxItemSet* pNewSet = 0 );
273cdf0e10cSrcweir 
274cdf0e10cSrcweir     virtual ~SwUndoTblNumFmt();
275cdf0e10cSrcweir 
276cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
277cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
278cdf0e10cSrcweir 
SetNumFmt(sal_uLong nNewNumFmtIdx,const double & rNewNumber)279cdf0e10cSrcweir     void SetNumFmt( sal_uLong nNewNumFmtIdx, const double& rNewNumber )
280cdf0e10cSrcweir             { nFmtIdx = nNewNumFmtIdx; fNum = rNewNumber; }
281cdf0e10cSrcweir     void SetBox( const SwTableBox& rBox );
282cdf0e10cSrcweir };
283cdf0e10cSrcweir 
284cdf0e10cSrcweir class _UndoTblCpyTbl_Entries;
285cdf0e10cSrcweir 
286cdf0e10cSrcweir class SwUndoTblCpyTbl : public SwUndo
287cdf0e10cSrcweir {
288cdf0e10cSrcweir     _UndoTblCpyTbl_Entries* pArr;
289cdf0e10cSrcweir     SwUndoTblNdsChg* pInsRowUndo;
290cdf0e10cSrcweir 
291cdf0e10cSrcweir     //b6341295: When redlining is active, PrepareRedline has to create the
292cdf0e10cSrcweir     //redlining attributes for the new and the old table cell content
293cdf0e10cSrcweir     SwUndo* PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
294cdf0e10cSrcweir                 const SwPosition& rPos, bool& rJoin, bool bRedo );
295cdf0e10cSrcweir public:
296cdf0e10cSrcweir     SwUndoTblCpyTbl();
297cdf0e10cSrcweir 
298cdf0e10cSrcweir     virtual ~SwUndoTblCpyTbl();
299cdf0e10cSrcweir 
300cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
301cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
302cdf0e10cSrcweir 
303cdf0e10cSrcweir     void AddBoxBefore( const SwTableBox& rBox, sal_Bool bDelCntnt );
304cdf0e10cSrcweir     void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx,
305cdf0e10cSrcweir                 sal_Bool bDelCntnt );
306cdf0e10cSrcweir 
307cdf0e10cSrcweir     sal_Bool IsEmpty() const;
308cdf0e10cSrcweir     sal_Bool InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, sal_uInt16 nCnt );
309cdf0e10cSrcweir };
310cdf0e10cSrcweir 
311cdf0e10cSrcweir class SwUndoCpyTbl : public SwUndo
312cdf0e10cSrcweir {
313cdf0e10cSrcweir     SwUndoDelete* pDel;
314cdf0e10cSrcweir     sal_uLong nTblNode;
315cdf0e10cSrcweir public:
316cdf0e10cSrcweir     SwUndoCpyTbl();
317cdf0e10cSrcweir 
318cdf0e10cSrcweir     virtual ~SwUndoCpyTbl();
319cdf0e10cSrcweir 
320cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
321cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
322cdf0e10cSrcweir 
SetTableSttIdx(sal_uLong nIdx)323cdf0e10cSrcweir     void SetTableSttIdx( sal_uLong nIdx )           { nTblNode = nIdx; }
324cdf0e10cSrcweir };
325cdf0e10cSrcweir 
326cdf0e10cSrcweir class SwUndoSplitTbl : public SwUndo
327cdf0e10cSrcweir {
328cdf0e10cSrcweir     sal_uLong nTblNode, nOffset;
329cdf0e10cSrcweir     SwSaveRowSpan* mpSaveRowSpan; // stores row span values at the splitting row
330cdf0e10cSrcweir     _SaveTable* pSavTbl;
331cdf0e10cSrcweir     SwHistory* pHistory;
332cdf0e10cSrcweir     sal_uInt16 nMode, nFmlEnd;
333cdf0e10cSrcweir     sal_Bool bCalcNewSize;
334cdf0e10cSrcweir public:
335cdf0e10cSrcweir     SwUndoSplitTbl( const SwTableNode& rTblNd, SwSaveRowSpan* pRowSp,
336cdf0e10cSrcweir             sal_uInt16 nMode, sal_Bool bCalcNewSize );
337cdf0e10cSrcweir 
338cdf0e10cSrcweir     virtual ~SwUndoSplitTbl();
339cdf0e10cSrcweir 
340cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
341cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
342cdf0e10cSrcweir     virtual void RepeatImpl( ::sw::RepeatContext & );
343cdf0e10cSrcweir 
SetTblNodeOffset(sal_uLong nIdx)344cdf0e10cSrcweir     void SetTblNodeOffset( sal_uLong nIdx )     { nOffset = nIdx - nTblNode; }
GetHistory()345cdf0e10cSrcweir     SwHistory* GetHistory()                 { return pHistory; }
346cdf0e10cSrcweir     void SaveFormula( SwHistory& rHistory );
347cdf0e10cSrcweir };
348cdf0e10cSrcweir 
349cdf0e10cSrcweir class SwUndoMergeTbl : public SwUndo
350cdf0e10cSrcweir {
351cdf0e10cSrcweir     String aName;
352cdf0e10cSrcweir     sal_uLong nTblNode;
353cdf0e10cSrcweir     _SaveTable* pSavTbl, *pSavHdl;
354cdf0e10cSrcweir     SwHistory* pHistory;
355cdf0e10cSrcweir     sal_uInt16 nMode;
356cdf0e10cSrcweir     sal_Bool bWithPrev;
357cdf0e10cSrcweir public:
358cdf0e10cSrcweir     SwUndoMergeTbl( const SwTableNode& rTblNd, const SwTableNode& rDelTblNd,
359cdf0e10cSrcweir                     sal_Bool bWithPrev, sal_uInt16 nMode );
360cdf0e10cSrcweir 
361cdf0e10cSrcweir     virtual ~SwUndoMergeTbl();
362cdf0e10cSrcweir 
363cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
364cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
365cdf0e10cSrcweir     virtual void RepeatImpl( ::sw::RepeatContext & );
366cdf0e10cSrcweir 
367cdf0e10cSrcweir     void SaveFormula( SwHistory& rHistory );
368cdf0e10cSrcweir };
369cdf0e10cSrcweir 
370cdf0e10cSrcweir 
371cdf0e10cSrcweir //--------------------------------------------------------------------
372cdf0e10cSrcweir 
373cdf0e10cSrcweir class SwUndoTblHeadline : public SwUndo
374cdf0e10cSrcweir {
375cdf0e10cSrcweir     sal_uLong nTblNd;
376cdf0e10cSrcweir     sal_uInt16 nOldHeadline;
377cdf0e10cSrcweir     sal_uInt16 nNewHeadline;
378cdf0e10cSrcweir public:
379cdf0e10cSrcweir     SwUndoTblHeadline( const SwTable&, sal_uInt16 nOldHdl,  sal_uInt16 nNewHdl );
380cdf0e10cSrcweir 
381cdf0e10cSrcweir     virtual void UndoImpl( ::sw::UndoRedoContext & );
382cdf0e10cSrcweir     virtual void RedoImpl( ::sw::UndoRedoContext & );
383cdf0e10cSrcweir     virtual void RepeatImpl( ::sw::RepeatContext & );
384cdf0e10cSrcweir };
385cdf0e10cSrcweir 
386cdf0e10cSrcweir #endif // SW_UNDO_TABLE_HXX
387cdf0e10cSrcweir 
388