xref: /AOO41X/main/sc/source/ui/inc/undodat.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef SC_UNDODAT_HXX
29*cdf0e10cSrcweir #define SC_UNDODAT_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include "undobase.hxx"
32*cdf0e10cSrcweir #include "rangeutl.hxx"		// ScArea
33*cdf0e10cSrcweir #include "rangelst.hxx"		// ScRangeListRef
34*cdf0e10cSrcweir #include "markdata.hxx"
35*cdf0e10cSrcweir #include "sortparam.hxx"
36*cdf0e10cSrcweir #include "queryparam.hxx"
37*cdf0e10cSrcweir #include "pivot.hxx"
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir class ScDocShell;
40*cdf0e10cSrcweir class ScDocument;
41*cdf0e10cSrcweir class ScOutlineTable;
42*cdf0e10cSrcweir class ScRangeName;
43*cdf0e10cSrcweir class ScDBData;
44*cdf0e10cSrcweir class ScDBCollection;
45*cdf0e10cSrcweir class ScDPObject;
46*cdf0e10cSrcweir class SdrUndoAction;
47*cdf0e10cSrcweir 
48*cdf0e10cSrcweir //----------------------------------------------------------------------------
49*cdf0e10cSrcweir 
50*cdf0e10cSrcweir class ScUndoDoOutline: public ScSimpleUndo
51*cdf0e10cSrcweir {
52*cdf0e10cSrcweir public:
53*cdf0e10cSrcweir 					TYPEINFO();
54*cdf0e10cSrcweir 					ScUndoDoOutline( ScDocShell* pNewDocShell,
55*cdf0e10cSrcweir 							SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
56*cdf0e10cSrcweir 							ScDocument* pNewUndoDoc, sal_Bool bNewColumns,
57*cdf0e10cSrcweir 							sal_uInt16 nNewLevel, sal_uInt16 nNewEntry, sal_Bool bNewShow );
58*cdf0e10cSrcweir 	virtual 		~ScUndoDoOutline();
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir 	virtual void	Undo();
61*cdf0e10cSrcweir 	virtual void	Redo();
62*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
63*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir 	virtual String	GetComment() const;
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir private:
68*cdf0e10cSrcweir 	SCCOLROW		nStart;
69*cdf0e10cSrcweir 	SCCOLROW		nEnd;
70*cdf0e10cSrcweir 	SCTAB			nTab;
71*cdf0e10cSrcweir 	ScDocument*		pUndoDoc;
72*cdf0e10cSrcweir 	sal_Bool			bColumns;
73*cdf0e10cSrcweir 	sal_uInt16			nLevel;
74*cdf0e10cSrcweir 	sal_uInt16			nEntry;
75*cdf0e10cSrcweir 	sal_Bool			bShow;
76*cdf0e10cSrcweir };
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir 
79*cdf0e10cSrcweir class ScUndoMakeOutline: public ScSimpleUndo
80*cdf0e10cSrcweir {
81*cdf0e10cSrcweir public:
82*cdf0e10cSrcweir 					TYPEINFO();
83*cdf0e10cSrcweir 					ScUndoMakeOutline( ScDocShell* pNewDocShell,
84*cdf0e10cSrcweir 							SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
85*cdf0e10cSrcweir 							SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
86*cdf0e10cSrcweir 							ScOutlineTable* pNewUndoTab,
87*cdf0e10cSrcweir 							sal_Bool bNewColumns, sal_Bool bNewMake );
88*cdf0e10cSrcweir 	virtual 		~ScUndoMakeOutline();
89*cdf0e10cSrcweir 
90*cdf0e10cSrcweir 	virtual void	Undo();
91*cdf0e10cSrcweir 	virtual void	Redo();
92*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
93*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir 	virtual String	GetComment() const;
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir private:
98*cdf0e10cSrcweir 	ScAddress		aBlockStart;
99*cdf0e10cSrcweir 	ScAddress		aBlockEnd;
100*cdf0e10cSrcweir 	ScOutlineTable*	pUndoTable;
101*cdf0e10cSrcweir 	sal_Bool			bColumns;
102*cdf0e10cSrcweir 	sal_Bool			bMake;
103*cdf0e10cSrcweir };
104*cdf0e10cSrcweir 
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir class ScUndoOutlineLevel: public ScSimpleUndo
107*cdf0e10cSrcweir {
108*cdf0e10cSrcweir public:
109*cdf0e10cSrcweir 					TYPEINFO();
110*cdf0e10cSrcweir 					ScUndoOutlineLevel( ScDocShell* pNewDocShell,
111*cdf0e10cSrcweir                             SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
112*cdf0e10cSrcweir 							ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
113*cdf0e10cSrcweir 							sal_Bool bNewColumns, sal_uInt16 nNewLevel );
114*cdf0e10cSrcweir 	virtual 		~ScUndoOutlineLevel();
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir 	virtual void	Undo();
117*cdf0e10cSrcweir 	virtual void	Redo();
118*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
119*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
120*cdf0e10cSrcweir 
121*cdf0e10cSrcweir 	virtual String	GetComment() const;
122*cdf0e10cSrcweir 
123*cdf0e10cSrcweir private:
124*cdf0e10cSrcweir 	SCCOLROW		nStart;
125*cdf0e10cSrcweir 	SCCOLROW		nEnd;
126*cdf0e10cSrcweir 	SCTAB			nTab;
127*cdf0e10cSrcweir 	ScDocument*		pUndoDoc;
128*cdf0e10cSrcweir 	ScOutlineTable*	pUndoTable;
129*cdf0e10cSrcweir 	sal_Bool			bColumns;
130*cdf0e10cSrcweir 	sal_uInt16			nLevel;
131*cdf0e10cSrcweir };
132*cdf0e10cSrcweir 
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir class ScUndoOutlineBlock: public ScSimpleUndo
135*cdf0e10cSrcweir {
136*cdf0e10cSrcweir public:
137*cdf0e10cSrcweir 					TYPEINFO();
138*cdf0e10cSrcweir 					ScUndoOutlineBlock( ScDocShell* pNewDocShell,
139*cdf0e10cSrcweir 							SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
140*cdf0e10cSrcweir 							SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
141*cdf0e10cSrcweir 							ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
142*cdf0e10cSrcweir 							sal_Bool bNewShow );
143*cdf0e10cSrcweir 	virtual 		~ScUndoOutlineBlock();
144*cdf0e10cSrcweir 
145*cdf0e10cSrcweir 	virtual void	Undo();
146*cdf0e10cSrcweir 	virtual void	Redo();
147*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
148*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir 	virtual String	GetComment() const;
151*cdf0e10cSrcweir 
152*cdf0e10cSrcweir private:
153*cdf0e10cSrcweir 	ScAddress		aBlockStart;
154*cdf0e10cSrcweir 	ScAddress		aBlockEnd;
155*cdf0e10cSrcweir 	ScDocument*		pUndoDoc;
156*cdf0e10cSrcweir 	ScOutlineTable*	pUndoTable;
157*cdf0e10cSrcweir 	sal_Bool			bShow;
158*cdf0e10cSrcweir };
159*cdf0e10cSrcweir 
160*cdf0e10cSrcweir 
161*cdf0e10cSrcweir class ScUndoRemoveAllOutlines: public ScSimpleUndo
162*cdf0e10cSrcweir {
163*cdf0e10cSrcweir public:
164*cdf0e10cSrcweir 					TYPEINFO();
165*cdf0e10cSrcweir 					ScUndoRemoveAllOutlines( ScDocShell* pNewDocShell,
166*cdf0e10cSrcweir 							SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
167*cdf0e10cSrcweir 							SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
168*cdf0e10cSrcweir 							ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab );
169*cdf0e10cSrcweir 	virtual 		~ScUndoRemoveAllOutlines();
170*cdf0e10cSrcweir 
171*cdf0e10cSrcweir 	virtual void	Undo();
172*cdf0e10cSrcweir 	virtual void	Redo();
173*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
174*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir 	virtual String	GetComment() const;
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir private:
179*cdf0e10cSrcweir 	ScAddress		aBlockStart;
180*cdf0e10cSrcweir 	ScAddress		aBlockEnd;
181*cdf0e10cSrcweir 	ScDocument*		pUndoDoc;
182*cdf0e10cSrcweir 	ScOutlineTable*	pUndoTable;
183*cdf0e10cSrcweir };
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir class ScUndoAutoOutline: public ScSimpleUndo
187*cdf0e10cSrcweir {
188*cdf0e10cSrcweir public:
189*cdf0e10cSrcweir 					TYPEINFO();
190*cdf0e10cSrcweir 					ScUndoAutoOutline( ScDocShell* pNewDocShell,
191*cdf0e10cSrcweir 							SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
192*cdf0e10cSrcweir 							SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
193*cdf0e10cSrcweir 							ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab );
194*cdf0e10cSrcweir 	virtual 		~ScUndoAutoOutline();
195*cdf0e10cSrcweir 
196*cdf0e10cSrcweir 	virtual void	Undo();
197*cdf0e10cSrcweir 	virtual void	Redo();
198*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
199*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
200*cdf0e10cSrcweir 
201*cdf0e10cSrcweir 	virtual String	GetComment() const;
202*cdf0e10cSrcweir 
203*cdf0e10cSrcweir private:
204*cdf0e10cSrcweir 	ScAddress		aBlockStart;
205*cdf0e10cSrcweir 	ScAddress		aBlockEnd;
206*cdf0e10cSrcweir 	ScDocument*		pUndoDoc;
207*cdf0e10cSrcweir 	ScOutlineTable*	pUndoTable;
208*cdf0e10cSrcweir };
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 
211*cdf0e10cSrcweir class ScUndoSubTotals: public ScDBFuncUndo
212*cdf0e10cSrcweir {
213*cdf0e10cSrcweir public:
214*cdf0e10cSrcweir 					TYPEINFO();
215*cdf0e10cSrcweir 					ScUndoSubTotals( ScDocShell* pNewDocShell, SCTAB nNewTab,
216*cdf0e10cSrcweir 							const ScSubTotalParam& rNewParam, SCROW nNewEndY,
217*cdf0e10cSrcweir 							ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
218*cdf0e10cSrcweir //							ScDBData* pNewData,
219*cdf0e10cSrcweir 							ScRangeName* pNewUndoRange, ScDBCollection* pNewUndoDB );
220*cdf0e10cSrcweir 	virtual 		~ScUndoSubTotals();
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir 	virtual void	Undo();
223*cdf0e10cSrcweir 	virtual void	Redo();
224*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
225*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir 	virtual String	GetComment() const;
228*cdf0e10cSrcweir 
229*cdf0e10cSrcweir private:
230*cdf0e10cSrcweir 	SCTAB			nTab;
231*cdf0e10cSrcweir 	ScSubTotalParam	aParam;							// Original uebergebener Parameter
232*cdf0e10cSrcweir 	SCROW			nNewEndRow;						// Ergebnis-Groesse
233*cdf0e10cSrcweir 	ScDocument*		pUndoDoc;
234*cdf0e10cSrcweir 	ScOutlineTable*	pUndoTable;
235*cdf0e10cSrcweir //	ScDBData*		pUndoDBData;
236*cdf0e10cSrcweir 	ScRangeName*	pUndoRange;
237*cdf0e10cSrcweir 	ScDBCollection*	pUndoDB;
238*cdf0e10cSrcweir };
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir class ScUndoSort: public ScDBFuncUndo
242*cdf0e10cSrcweir {
243*cdf0e10cSrcweir public:
244*cdf0e10cSrcweir 					TYPEINFO();
245*cdf0e10cSrcweir 					ScUndoSort( ScDocShell* pNewDocShell, SCTAB nNewTab,
246*cdf0e10cSrcweir 							const ScSortParam& rParam,
247*cdf0e10cSrcweir 							sal_Bool bQuery, ScDocument* pNewUndoDoc,
248*cdf0e10cSrcweir 							ScDBCollection* pNewUndoDB, const ScRange* pDest = NULL );
249*cdf0e10cSrcweir 	virtual 		~ScUndoSort();
250*cdf0e10cSrcweir 
251*cdf0e10cSrcweir 	virtual void	Undo();
252*cdf0e10cSrcweir 	virtual void	Redo();
253*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
254*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir 	virtual String	GetComment() const;
257*cdf0e10cSrcweir 
258*cdf0e10cSrcweir private:
259*cdf0e10cSrcweir 	SCTAB			nTab;
260*cdf0e10cSrcweir 	ScSortParam		aSortParam;
261*cdf0e10cSrcweir 	sal_Bool			bRepeatQuery;
262*cdf0e10cSrcweir 	ScDocument*		pUndoDoc;
263*cdf0e10cSrcweir 	ScDBCollection*	pUndoDB;				// wegen Quell- und Zielbereich
264*cdf0e10cSrcweir 	sal_Bool			bDestArea;
265*cdf0e10cSrcweir 	ScRange			aDestRange;
266*cdf0e10cSrcweir };
267*cdf0e10cSrcweir 
268*cdf0e10cSrcweir 
269*cdf0e10cSrcweir class ScUndoQuery: public ScDBFuncUndo
270*cdf0e10cSrcweir {
271*cdf0e10cSrcweir public:
272*cdf0e10cSrcweir 					TYPEINFO();
273*cdf0e10cSrcweir 					ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab,
274*cdf0e10cSrcweir 							const ScQueryParam& rParam, ScDocument* pNewUndoDoc,
275*cdf0e10cSrcweir 							ScDBCollection* pNewUndoDB, const ScRange* pOld,
276*cdf0e10cSrcweir 							sal_Bool bSize, const ScRange* pAdvSrc );
277*cdf0e10cSrcweir 	virtual 		~ScUndoQuery();
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir 	virtual void	Undo();
280*cdf0e10cSrcweir 	virtual void	Redo();
281*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
282*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
283*cdf0e10cSrcweir 
284*cdf0e10cSrcweir 	virtual String	GetComment() const;
285*cdf0e10cSrcweir 
286*cdf0e10cSrcweir private:
287*cdf0e10cSrcweir     SdrUndoAction*  pDrawUndo;
288*cdf0e10cSrcweir 	SCTAB			nTab;
289*cdf0e10cSrcweir 	ScQueryParam	aQueryParam;
290*cdf0e10cSrcweir 	ScDocument*		pUndoDoc;
291*cdf0e10cSrcweir 	ScDBCollection*	pUndoDB;				// wegen Quell- und Zielbereich
292*cdf0e10cSrcweir 	ScRange			aOldDest;
293*cdf0e10cSrcweir 	ScRange			aAdvSource;
294*cdf0e10cSrcweir 	sal_Bool			bIsAdvanced;
295*cdf0e10cSrcweir 	sal_Bool			bDestArea;
296*cdf0e10cSrcweir 	sal_Bool			bDoSize;
297*cdf0e10cSrcweir };
298*cdf0e10cSrcweir 
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir class ScUndoAutoFilter: public ScDBFuncUndo
301*cdf0e10cSrcweir {
302*cdf0e10cSrcweir private:
303*cdf0e10cSrcweir     String          aDBName;
304*cdf0e10cSrcweir     sal_Bool            bFilterSet;
305*cdf0e10cSrcweir 
306*cdf0e10cSrcweir     void            DoChange( sal_Bool bUndo );
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir public:
309*cdf0e10cSrcweir                     TYPEINFO();
310*cdf0e10cSrcweir                     ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange,
311*cdf0e10cSrcweir                             const String& rName, sal_Bool bSet );
312*cdf0e10cSrcweir     virtual         ~ScUndoAutoFilter();
313*cdf0e10cSrcweir 
314*cdf0e10cSrcweir     virtual void    Undo();
315*cdf0e10cSrcweir     virtual void    Redo();
316*cdf0e10cSrcweir     virtual void    Repeat(SfxRepeatTarget& rTarget);
317*cdf0e10cSrcweir     virtual sal_Bool    CanRepeat(SfxRepeatTarget& rTarget) const;
318*cdf0e10cSrcweir 
319*cdf0e10cSrcweir     virtual String  GetComment() const;
320*cdf0e10cSrcweir };
321*cdf0e10cSrcweir 
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir class ScUndoDBData: public ScSimpleUndo
324*cdf0e10cSrcweir {
325*cdf0e10cSrcweir public:
326*cdf0e10cSrcweir 					TYPEINFO();
327*cdf0e10cSrcweir 					ScUndoDBData( ScDocShell* pNewDocShell,
328*cdf0e10cSrcweir 							ScDBCollection* pNewUndoColl, ScDBCollection* pNewRedoColl );
329*cdf0e10cSrcweir 	virtual 		~ScUndoDBData();
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir 	virtual void	Undo();
332*cdf0e10cSrcweir 	virtual void	Redo();
333*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
334*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir 	virtual String	GetComment() const;
337*cdf0e10cSrcweir 
338*cdf0e10cSrcweir private:
339*cdf0e10cSrcweir 	ScDBCollection* pUndoColl;
340*cdf0e10cSrcweir 	ScDBCollection* pRedoColl;
341*cdf0e10cSrcweir };
342*cdf0e10cSrcweir 
343*cdf0e10cSrcweir 
344*cdf0e10cSrcweir class ScUndoImportData: public ScSimpleUndo
345*cdf0e10cSrcweir {
346*cdf0e10cSrcweir public:
347*cdf0e10cSrcweir 					TYPEINFO();
348*cdf0e10cSrcweir 					ScUndoImportData( ScDocShell* pNewDocShell, SCTAB nNewTab,
349*cdf0e10cSrcweir 							const ScImportParam& rParam, SCCOL nNewEndX, SCROW nNewEndY,
350*cdf0e10cSrcweir 							SCCOL nNewFormula,
351*cdf0e10cSrcweir 							ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
352*cdf0e10cSrcweir 							ScDBData* pNewUndoData, ScDBData* pNewRedoData );
353*cdf0e10cSrcweir 	virtual 		~ScUndoImportData();
354*cdf0e10cSrcweir 
355*cdf0e10cSrcweir 	virtual void	Undo();
356*cdf0e10cSrcweir 	virtual void	Redo();
357*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
358*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
359*cdf0e10cSrcweir 
360*cdf0e10cSrcweir 	virtual String	GetComment() const;
361*cdf0e10cSrcweir 
362*cdf0e10cSrcweir private:
363*cdf0e10cSrcweir 	SCTAB			nTab;
364*cdf0e10cSrcweir 	ScImportParam	aImportParam;
365*cdf0e10cSrcweir 	SCCOL			nEndCol;
366*cdf0e10cSrcweir 	SCROW			nEndRow;
367*cdf0e10cSrcweir 	ScDocument*		pUndoDoc;
368*cdf0e10cSrcweir 	ScDocument*		pRedoDoc;
369*cdf0e10cSrcweir 	ScDBData*		pUndoDBData;
370*cdf0e10cSrcweir 	ScDBData*		pRedoDBData;
371*cdf0e10cSrcweir 	SCCOL			nFormulaCols;
372*cdf0e10cSrcweir 	sal_Bool			bRedoFilled;
373*cdf0e10cSrcweir };
374*cdf0e10cSrcweir 
375*cdf0e10cSrcweir 
376*cdf0e10cSrcweir class ScUndoRepeatDB: public ScSimpleUndo
377*cdf0e10cSrcweir {
378*cdf0e10cSrcweir public:
379*cdf0e10cSrcweir 					TYPEINFO();
380*cdf0e10cSrcweir 					ScUndoRepeatDB( ScDocShell* pNewDocShell, SCTAB nNewTab,
381*cdf0e10cSrcweir 							SCCOL nStartX, SCROW nStartY, SCCOL nEndX, SCROW nEndY,
382*cdf0e10cSrcweir 							SCROW nResultEndRow, SCCOL nCurX, SCROW nCurY,
383*cdf0e10cSrcweir 							ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
384*cdf0e10cSrcweir 							ScRangeName* pNewUndoRange, ScDBCollection* pNewUndoDB,
385*cdf0e10cSrcweir 							const ScRange* pOldQ, const ScRange* pNewQ );
386*cdf0e10cSrcweir 	virtual 		~ScUndoRepeatDB();
387*cdf0e10cSrcweir 
388*cdf0e10cSrcweir 	virtual void	Undo();
389*cdf0e10cSrcweir 	virtual void	Redo();
390*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
391*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
392*cdf0e10cSrcweir 
393*cdf0e10cSrcweir 	virtual String	GetComment() const;
394*cdf0e10cSrcweir 
395*cdf0e10cSrcweir private:
396*cdf0e10cSrcweir 	ScAddress		aBlockStart;
397*cdf0e10cSrcweir 	ScAddress		aBlockEnd;
398*cdf0e10cSrcweir 	SCROW			nNewEndRow;
399*cdf0e10cSrcweir 	ScAddress		aCursorPos;
400*cdf0e10cSrcweir 	ScDocument*		pUndoDoc;
401*cdf0e10cSrcweir 	ScOutlineTable*	pUndoTable;
402*cdf0e10cSrcweir 	ScRangeName*	pUndoRange;
403*cdf0e10cSrcweir 	ScDBCollection*	pUndoDB;
404*cdf0e10cSrcweir 	ScRange			aOldQuery;
405*cdf0e10cSrcweir 	ScRange			aNewQuery;
406*cdf0e10cSrcweir 	sal_Bool			bQuerySize;
407*cdf0e10cSrcweir };
408*cdf0e10cSrcweir 
409*cdf0e10cSrcweir //UNUSED2008-05  class ScUndoPivot: public ScSimpleUndo
410*cdf0e10cSrcweir //UNUSED2008-05  {
411*cdf0e10cSrcweir //UNUSED2008-05  public:
412*cdf0e10cSrcweir //UNUSED2008-05                      TYPEINFO();
413*cdf0e10cSrcweir //UNUSED2008-05                      ScUndoPivot( ScDocShell* pNewDocShell,
414*cdf0e10cSrcweir //UNUSED2008-05                              const ScArea& rOld, const ScArea& rNew,
415*cdf0e10cSrcweir //UNUSED2008-05                              ScDocument* pOldDoc, ScDocument* pNewDoc,
416*cdf0e10cSrcweir //UNUSED2008-05                              const ScPivot* pOldPivot, const ScPivot* pNewPivot );
417*cdf0e10cSrcweir //UNUSED2008-05      virtual         ~ScUndoPivot();
418*cdf0e10cSrcweir //UNUSED2008-05
419*cdf0e10cSrcweir //UNUSED2008-05      virtual void    Undo();
420*cdf0e10cSrcweir //UNUSED2008-05      virtual void    Redo();
421*cdf0e10cSrcweir //UNUSED2008-05      virtual void    Repeat(SfxRepeatTarget& rTarget);
422*cdf0e10cSrcweir //UNUSED2008-05      virtual sal_Bool    CanRepeat(SfxRepeatTarget& rTarget) const;
423*cdf0e10cSrcweir //UNUSED2008-05
424*cdf0e10cSrcweir //UNUSED2008-05      virtual String  GetComment() const;
425*cdf0e10cSrcweir //UNUSED2008-05
426*cdf0e10cSrcweir //UNUSED2008-05  private:
427*cdf0e10cSrcweir //UNUSED2008-05      ScArea          aOldArea;
428*cdf0e10cSrcweir //UNUSED2008-05      ScArea          aNewArea;
429*cdf0e10cSrcweir //UNUSED2008-05      ScDocument*     pOldUndoDoc;
430*cdf0e10cSrcweir //UNUSED2008-05      ScDocument*     pNewUndoDoc;
431*cdf0e10cSrcweir //UNUSED2008-05      ScPivotParam    aOldParam;              // fuer Redo
432*cdf0e10cSrcweir //UNUSED2008-05      ScQueryParam    aOldQuery;
433*cdf0e10cSrcweir //UNUSED2008-05      ScArea          aOldSrc;
434*cdf0e10cSrcweir //UNUSED2008-05      ScPivotParam    aNewParam;              // fuer Undo in Collection
435*cdf0e10cSrcweir //UNUSED2008-05      ScQueryParam    aNewQuery;
436*cdf0e10cSrcweir //UNUSED2008-05      ScArea          aNewSrc;
437*cdf0e10cSrcweir //UNUSED2008-05      String          aOldName;
438*cdf0e10cSrcweir //UNUSED2008-05      String          aOldTag;
439*cdf0e10cSrcweir //UNUSED2008-05      String          aNewName;
440*cdf0e10cSrcweir //UNUSED2008-05      String          aNewTag;
441*cdf0e10cSrcweir //UNUSED2008-05  };
442*cdf0e10cSrcweir 
443*cdf0e10cSrcweir class ScUndoDataPilot: public ScSimpleUndo
444*cdf0e10cSrcweir {
445*cdf0e10cSrcweir public:
446*cdf0e10cSrcweir 					TYPEINFO();
447*cdf0e10cSrcweir 					ScUndoDataPilot( ScDocShell* pNewDocShell,
448*cdf0e10cSrcweir 							ScDocument* pOldDoc, ScDocument* pNewDoc,
449*cdf0e10cSrcweir 							const ScDPObject* pOldObj, const ScDPObject* pNewObj,
450*cdf0e10cSrcweir 							sal_Bool bMove );
451*cdf0e10cSrcweir 	virtual 		~ScUndoDataPilot();
452*cdf0e10cSrcweir 
453*cdf0e10cSrcweir 	virtual void	Undo();
454*cdf0e10cSrcweir 	virtual void	Redo();
455*cdf0e10cSrcweir 	virtual void	Repeat(SfxRepeatTarget& rTarget);
456*cdf0e10cSrcweir 	virtual sal_Bool	CanRepeat(SfxRepeatTarget& rTarget) const;
457*cdf0e10cSrcweir 
458*cdf0e10cSrcweir 	virtual String	GetComment() const;
459*cdf0e10cSrcweir 
460*cdf0e10cSrcweir private:
461*cdf0e10cSrcweir 	ScDocument*		pOldUndoDoc;
462*cdf0e10cSrcweir 	ScDocument*		pNewUndoDoc;
463*cdf0e10cSrcweir 	ScDPObject*		pOldDPObject;
464*cdf0e10cSrcweir 	ScDPObject*		pNewDPObject;
465*cdf0e10cSrcweir 	sal_Bool			bAllowMove;
466*cdf0e10cSrcweir };
467*cdf0e10cSrcweir 
468*cdf0e10cSrcweir 
469*cdf0e10cSrcweir class ScUndoConsolidate: public ScSimpleUndo
470*cdf0e10cSrcweir {
471*cdf0e10cSrcweir public:
472*cdf0e10cSrcweir 						TYPEINFO();
473*cdf0e10cSrcweir 						ScUndoConsolidate( ScDocShell* pNewDocShell,
474*cdf0e10cSrcweir 								const ScArea& rArea, const ScConsolidateParam& rPar,
475*cdf0e10cSrcweir 								ScDocument* pNewUndoDoc, sal_Bool bReference,
476*cdf0e10cSrcweir 								SCROW nInsCount, ScOutlineTable* pTab,
477*cdf0e10cSrcweir 								ScDBData* pData );
478*cdf0e10cSrcweir 	virtual 			~ScUndoConsolidate();
479*cdf0e10cSrcweir 
480*cdf0e10cSrcweir 	virtual void		Undo();
481*cdf0e10cSrcweir 	virtual void		Redo();
482*cdf0e10cSrcweir 	virtual void		Repeat(SfxRepeatTarget& rTarget);
483*cdf0e10cSrcweir 	virtual sal_Bool		CanRepeat(SfxRepeatTarget& rTarget) const;
484*cdf0e10cSrcweir 
485*cdf0e10cSrcweir 	virtual String		GetComment() const;
486*cdf0e10cSrcweir 
487*cdf0e10cSrcweir private:
488*cdf0e10cSrcweir 	ScArea				aDestArea;
489*cdf0e10cSrcweir 	ScDocument*			pUndoDoc;
490*cdf0e10cSrcweir 	ScConsolidateParam	aParam;
491*cdf0e10cSrcweir 	sal_Bool				bInsRef;
492*cdf0e10cSrcweir 	SCSIZE				nInsertCount;
493*cdf0e10cSrcweir 	ScOutlineTable*		pUndoTab;
494*cdf0e10cSrcweir 	ScDBData*			pUndoData;
495*cdf0e10cSrcweir };
496*cdf0e10cSrcweir 
497*cdf0e10cSrcweir 
498*cdf0e10cSrcweir class ScUndoChartData: public ScSimpleUndo
499*cdf0e10cSrcweir {
500*cdf0e10cSrcweir public:
501*cdf0e10cSrcweir 						TYPEINFO();
502*cdf0e10cSrcweir 						ScUndoChartData( ScDocShell* pNewDocShell,
503*cdf0e10cSrcweir 								const String& rName, const ScRange& rNew,
504*cdf0e10cSrcweir 								sal_Bool bColHdr, sal_Bool bRowHdr, sal_Bool bAdd );
505*cdf0e10cSrcweir 						ScUndoChartData( ScDocShell* pNewDocShell,
506*cdf0e10cSrcweir 								const String& rName, const ScRangeListRef& rNew,
507*cdf0e10cSrcweir 								sal_Bool bColHdr, sal_Bool bRowHdr, sal_Bool bAdd );
508*cdf0e10cSrcweir 	virtual 			~ScUndoChartData();
509*cdf0e10cSrcweir 
510*cdf0e10cSrcweir 	virtual void		Undo();
511*cdf0e10cSrcweir 	virtual void		Redo();
512*cdf0e10cSrcweir 	virtual void		Repeat(SfxRepeatTarget& rTarget);
513*cdf0e10cSrcweir 	virtual sal_Bool		CanRepeat(SfxRepeatTarget& rTarget) const;
514*cdf0e10cSrcweir 
515*cdf0e10cSrcweir 	virtual String		GetComment() const;
516*cdf0e10cSrcweir 
517*cdf0e10cSrcweir private:
518*cdf0e10cSrcweir 	String				aChartName;
519*cdf0e10cSrcweir 	ScRangeListRef		aOldRangeListRef;
520*cdf0e10cSrcweir 	sal_Bool				bOldColHeaders;
521*cdf0e10cSrcweir 	sal_Bool				bOldRowHeaders;
522*cdf0e10cSrcweir //	ScRange				aNewRange;
523*cdf0e10cSrcweir 	ScRangeListRef		aNewRangeListRef;
524*cdf0e10cSrcweir 	sal_Bool				bNewColHeaders;
525*cdf0e10cSrcweir 	sal_Bool				bNewRowHeaders;
526*cdf0e10cSrcweir 	sal_Bool				bAddRange;
527*cdf0e10cSrcweir 
528*cdf0e10cSrcweir 	void				Init();
529*cdf0e10cSrcweir };
530*cdf0e10cSrcweir 
531*cdf0e10cSrcweir 
532*cdf0e10cSrcweir 
533*cdf0e10cSrcweir 
534*cdf0e10cSrcweir #endif
535*cdf0e10cSrcweir 
536