1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef SC_UNDOBLK_HXX
20 #define SC_UNDOBLK_HXX
22 #include "undobase.hxx"
23 #include "markdata.hxx"
24 #include "viewutil.hxx"
25 #include "spellparam.hxx"
26 #include "cellmergeoption.hxx"
27 #include "paramisc.hxx"
29 #include <boost/shared_ptr.hpp>
30 #include <boost/scoped_ptr.hpp>
41 class ScEditDataArray
;
43 //----------------------------------------------------------------------------
45 class ScUndoInsertCells
: public ScMoveUndo
49 ScUndoInsertCells( ScDocShell
* pNewDocShell
,
50 const ScRange
& rRange
, SCTAB nNewCount
, SCTAB
* pNewTabs
, SCTAB
* pNewScenarios
,
51 InsCellCmd eNewCmd
, ScDocument
* pUndoDocument
, ScRefUndoData
* pRefData
,
52 sal_Bool bNewPartOfPaste
);
53 virtual ~ScUndoInsertCells();
57 virtual void Repeat( SfxRepeatTarget
& rTarget
);
58 virtual bool CanRepeat( SfxRepeatTarget
& rTarget
) const;
60 virtual OUString
GetComment() const;
62 virtual bool Merge( SfxUndoAction
*pNextAction
);
69 sal_uLong nEndChangeAction
;
71 sal_Bool bPartOfPaste
;
72 SfxUndoAction
* pPasteUndo
;
74 void DoChange ( const sal_Bool bUndo
);
75 void SetChangeTrack();
79 class ScUndoDeleteCells
: public ScMoveUndo
83 ScUndoDeleteCells( ScDocShell
* pNewDocShell
,
84 const ScRange
& rRange
, SCTAB nNewCount
, SCTAB
* pNewTabs
, SCTAB
* pNewScenarios
,
85 DelCellCmd eNewCmd
, ScDocument
* pUndoDocument
, ScRefUndoData
* pRefData
);
86 virtual ~ScUndoDeleteCells();
90 virtual void Repeat(SfxRepeatTarget
& rTarget
);
91 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
93 virtual OUString
GetComment() const;
100 sal_uLong nStartChangeAction
;
101 sal_uLong nEndChangeAction
;
104 void DoChange ( const sal_Bool bUndo
);
105 void SetChangeTrack();
109 class ScUndoDeleteMulti
: public ScMoveUndo
113 ScUndoDeleteMulti( ScDocShell
* pNewDocShell
,
114 sal_Bool bNewRows
, sal_Bool bNeedsRefresh
, SCTAB nNewTab
,
115 const SCCOLROW
* pRng
, SCCOLROW nRngCnt
,
116 ScDocument
* pUndoDocument
, ScRefUndoData
* pRefData
);
117 virtual ~ScUndoDeleteMulti();
121 virtual void Repeat(SfxRepeatTarget
& rTarget
);
122 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
124 virtual OUString
GetComment() const;
132 sal_uLong nStartChangeAction
;
133 sal_uLong nEndChangeAction
;
135 void DoChange() const;
136 void SetChangeTrack();
140 class ScUndoCut
: public ScBlockUndo
144 ScUndoCut( ScDocShell
* pNewDocShell
,
145 ScRange aRange
, // adjusted for merged cells
146 ScAddress aOldEnd
, // end position without adjustment
147 const ScMarkData
& rMark
, // selected sheets
148 ScDocument
* pNewUndoDoc
);
149 virtual ~ScUndoCut();
153 virtual void Repeat(SfxRepeatTarget
& rTarget
);
154 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
156 virtual OUString
GetComment() const;
159 ScMarkData aMarkData
;
160 ScDocument
* pUndoDoc
;
161 ScRange aExtendedRange
;
162 sal_uLong nStartChangeAction
;
163 sal_uLong nEndChangeAction
;
165 void DoChange( const sal_Bool bUndo
);
166 void SetChangeTrack();
170 struct ScUndoPasteOptions
172 sal_uInt16 nFunction
;
176 InsCellCmd eMoveMode
;
178 ScUndoPasteOptions() :
179 nFunction( PASTE_NOFUNC
),
183 eMoveMode( INS_NONE
)
187 class ScUndoPaste
: public ScMultiBlockUndo
191 ScUndoPaste(ScDocShell
* pNewDocShell
, const ScRangeList
& rRanges
,
192 const ScMarkData
& rMark
,
193 ScDocument
* pNewUndoDoc
, ScDocument
* pNewRedoDoc
,
194 sal_uInt16 nNewFlags
,
195 ScRefUndoData
* pRefData
,
196 bool bRedoIsFilled
= true,
197 const ScUndoPasteOptions
* pOptions
= NULL
);
198 virtual ~ScUndoPaste();
202 virtual void Repeat(SfxRepeatTarget
& rTarget
);
203 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
205 virtual OUString
GetComment() const;
208 ScMarkData aMarkData
;
209 ScDocument
* pUndoDoc
;
210 ScDocument
* pRedoDoc
;
212 ScRefUndoData
* pRefUndoData
;
213 ScRefUndoData
* pRefRedoData
;
214 sal_uLong nStartChangeAction
;
215 sal_uLong nEndChangeAction
;
216 sal_Bool bRedoFilled
;
217 ScUndoPasteOptions aPasteOptions
;
219 void DoChange(bool bUndo
);
220 void SetChangeTrack();
224 class ScUndoDragDrop
: public ScMoveUndo
228 ScUndoDragDrop( ScDocShell
* pNewDocShell
,
229 const ScRange
& rRange
, ScAddress aNewDestPos
, sal_Bool bNewCut
,
230 ScDocument
* pUndoDocument
, ScRefUndoData
* pRefData
,
231 sal_Bool bScenario
);
232 virtual ~ScUndoDragDrop();
236 virtual void Repeat(SfxRepeatTarget
& rTarget
);
237 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
239 virtual OUString
GetComment() const;
244 sal_uLong nStartChangeAction
;
245 sal_uLong nEndChangeAction
;
247 sal_Bool bKeepScenarioFlags
;
249 void PaintArea( ScRange aRange
, sal_uInt16 nExtFlags
) const;
250 void DoUndo( ScRange aRange
) const;
252 void SetChangeTrack();
256 class ScUndoDeleteContents
: public ScSimpleUndo
260 ScUndoDeleteContents( ScDocShell
* pNewDocShell
,
261 const ScMarkData
& rMark
,
262 const ScRange
& rRange
,
263 ScDocument
* pNewUndoDoc
, sal_Bool bNewMulti
,
264 sal_uInt16 nNewFlags
, sal_Bool bObjects
);
265 virtual ~ScUndoDeleteContents();
269 virtual void Repeat(SfxRepeatTarget
& rTarget
);
270 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
272 virtual OUString
GetComment() const;
276 ScMarkData aMarkData
;
277 ScDocument
* pUndoDoc
; // Block mark and deleted data
278 SdrUndoAction
* pDrawUndo
; // Deleted objects
279 sal_uLong nStartChangeAction
;
280 sal_uLong nEndChangeAction
;
282 sal_Bool bMulti
; // Multi selection
284 void DoChange( const sal_Bool bUndo
);
285 void SetChangeTrack();
289 class ScUndoFillTable
: public ScSimpleUndo
293 ScUndoFillTable( ScDocShell
* pNewDocShell
,
294 const ScMarkData
& rMark
,
295 SCCOL nStartX
, SCROW nStartY
, SCTAB nStartZ
,
296 SCCOL nEndX
, SCROW nEndY
, SCTAB nEndZ
,
297 ScDocument
* pNewUndoDoc
, sal_Bool bNewMulti
, SCTAB nSrc
,
298 sal_uInt16 nFlg
, sal_uInt16 nFunc
, sal_Bool bSkip
, sal_Bool bLink
);
299 virtual ~ScUndoFillTable();
303 virtual void Repeat(SfxRepeatTarget
& rTarget
);
304 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
306 virtual OUString
GetComment() const;
310 ScMarkData aMarkData
;
311 ScDocument
* pUndoDoc
; // Block mark and deleted data
312 sal_uLong nStartChangeAction
;
313 sal_uLong nEndChangeAction
;
315 sal_uInt16 nFunction
;
317 sal_Bool bMulti
; // Multi selection
321 void DoChange( const sal_Bool bUndo
);
322 void SetChangeTrack();
326 class ScUndoSelectionAttr
: public ScSimpleUndo
330 ScUndoSelectionAttr( ScDocShell
* pNewDocShell
,
331 const ScMarkData
& rMark
,
332 SCCOL nStartX
, SCROW nStartY
, SCTAB nStartZ
,
333 SCCOL nEndX
, SCROW nEndY
, SCTAB nEndZ
,
334 ScDocument
* pNewUndoDoc
, sal_Bool bNewMulti
,
335 const ScPatternAttr
* pNewApply
,
336 const SvxBoxItem
* pNewOuter
= NULL
,
337 const SvxBoxInfoItem
* pNewInner
= NULL
);
338 virtual ~ScUndoSelectionAttr();
342 virtual void Repeat(SfxRepeatTarget
& rTarget
);
343 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
345 virtual OUString
GetComment() const;
347 ScEditDataArray
* GetDataArray();
349 ScMarkData aMarkData
;
351 boost::scoped_ptr
<ScEditDataArray
> mpDataArray
;
352 ScDocument
* pUndoDoc
;
354 ScPatternAttr
* pApplyPattern
;
355 SvxBoxItem
* pLineOuter
;
356 SvxBoxInfoItem
* pLineInner
;
358 void DoChange( const sal_Bool bUndo
);
359 void ChangeEditData( const bool bUndo
);
363 class ScUndoWidthOrHeight
: public ScSimpleUndo
367 ScUndoWidthOrHeight( ScDocShell
* pNewDocShell
,
368 const ScMarkData
& rMark
,
369 SCCOLROW nNewStart
, SCTAB nNewStartTab
,
370 SCCOLROW nNewEnd
, SCTAB nNewEndTab
,
371 ScDocument
* pNewUndoDoc
,
372 SCCOLROW nNewCnt
, SCCOLROW
* pNewRanges
,
373 ScOutlineTable
* pNewUndoTab
,
374 ScSizeMode eNewMode
, sal_uInt16 nNewSizeTwips
,
375 sal_Bool bNewWidth
);
376 virtual ~ScUndoWidthOrHeight();
380 virtual void Repeat(SfxRepeatTarget
& rTarget
);
381 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
383 virtual OUString
GetComment() const;
386 ScMarkData aMarkData
;
391 ScDocument
* pUndoDoc
;
392 ScOutlineTable
* pUndoTab
;
398 SdrUndoAction
* pDrawUndo
;
402 class ScUndoAutoFill
: public ScBlockUndo
406 ScUndoAutoFill( ScDocShell
* pNewDocShell
,
407 const ScRange
& rRange
, const ScRange
& rSourceArea
,
408 ScDocument
* pNewUndoDoc
, const ScMarkData
& rMark
,
410 FillCmd eNewFillCmd
, FillDateCmd eNewFillDateCmd
,
411 double fNewStartValue
, double fNewStepValue
, double fNewMaxValue
);
412 virtual ~ScUndoAutoFill();
416 virtual void Repeat(SfxRepeatTarget
& rTarget
);
417 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
419 virtual OUString
GetComment() const;
423 ScMarkData aMarkData
;
424 ScDocument
* pUndoDoc
;
427 FillDateCmd eFillDateCmd
;
431 sal_uLong nStartChangeAction
;
432 sal_uLong nEndChangeAction
;
434 void SetChangeTrack();
438 class ScUndoMerge
: public ScSimpleUndo
442 ScUndoMerge( ScDocShell
* pNewDocShell
, const ScCellMergeOption
& rOption
,
443 bool bMergeContents
, ScDocument
* pUndoDoc
, SdrUndoAction
* pDrawUndo
);
444 virtual ~ScUndoMerge();
448 virtual void Repeat(SfxRepeatTarget
& rTarget
);
449 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
451 virtual OUString
GetComment() const;
454 ScCellMergeOption maOption
;
455 bool mbMergeContents
; // Merge contents in Redo().
456 ScDocument
* mpUndoDoc
; // when data is merged
457 SdrUndoAction
* mpDrawUndo
;
459 void DoChange( bool bUndo
) const;
463 class ScUndoAutoFormat
: public ScBlockUndo
467 ScUndoAutoFormat( ScDocShell
* pNewDocShell
,
468 const ScRange
& rRange
, ScDocument
* pNewUndoDoc
,
469 const ScMarkData
& rMark
,
470 sal_Bool bNewSize
, sal_uInt16 nNewFormatNo
);
471 virtual ~ScUndoAutoFormat();
475 virtual void Repeat(SfxRepeatTarget
& rTarget
);
476 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
478 virtual OUString
GetComment() const;
481 ScDocument
* pUndoDoc
; // deleted data
482 ScMarkData aMarkData
;
484 sal_uInt16 nFormatNo
;
488 class ScUndoReplace
: public ScSimpleUndo
492 ScUndoReplace( ScDocShell
* pNewDocShell
,
493 const ScMarkData
& rMark
,
494 SCCOL nCurX
, SCROW nCurY
, SCTAB nCurZ
,
495 const OUString
& rNewUndoStr
, ScDocument
* pNewUndoDoc
,
496 const SvxSearchItem
* pItem
);
497 virtual ~ScUndoReplace();
501 virtual void Repeat(SfxRepeatTarget
& rTarget
);
502 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
504 virtual OUString
GetComment() const;
507 ScAddress aCursorPos
;
508 ScMarkData aMarkData
;
509 OUString aUndoStr
; // Data at single selection
510 ScDocument
* pUndoDoc
; // Block mark and deleted data
511 SvxSearchItem
* pSearchItem
;
512 sal_uLong nStartChangeAction
;
513 sal_uLong nEndChangeAction
;
515 void SetChangeTrack();
519 class ScUndoTabOp
: public ScSimpleUndo
523 ScUndoTabOp( ScDocShell
* pNewDocShell
,
524 SCCOL nStartX
, SCROW nStartY
, SCTAB nStartZ
,
525 SCCOL nEndX
, SCROW nEndY
, SCTAB nEndZ
,
526 ScDocument
* pNewUndoDoc
,
527 const ScRefAddress
& rFormulaCell
,
528 const ScRefAddress
& rFormulaEnd
,
529 const ScRefAddress
& rRowCell
,
530 const ScRefAddress
& rColCell
,
531 ScTabOpParam::Mode eMode
);
532 virtual ~ScUndoTabOp();
536 virtual void Repeat(SfxRepeatTarget
& rTarget
);
537 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
539 virtual OUString
GetComment() const;
543 ScDocument
* pUndoDoc
; // Deleted data
544 ScRefAddress theFormulaCell
;
545 ScRefAddress theFormulaEnd
;
546 ScRefAddress theRowCell
;
547 ScRefAddress theColCell
;
548 ScTabOpParam::Mode meMode
;
552 class ScUndoConversion
: public ScSimpleUndo
557 ScUndoConversion( ScDocShell
* pNewDocShell
, const ScMarkData
& rMark
,
558 SCCOL nCurX
, SCROW nCurY
, SCTAB nCurZ
, ScDocument
* pNewUndoDoc
,
559 SCCOL nNewX
, SCROW nNewY
, SCTAB nNewZ
, ScDocument
* pNewRedoDoc
,
560 const ScConversionParam
& rConvParam
);
561 virtual ~ScUndoConversion();
565 virtual void Repeat(SfxRepeatTarget
& rTarget
);
566 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
568 virtual OUString
GetComment() const;
571 ScMarkData aMarkData
;
572 ScAddress aCursorPos
;
573 ScDocument
* pUndoDoc
; // Block mark and deleted data
574 ScAddress aNewCursorPos
;
575 ScDocument
* pRedoDoc
; // Block mark and new data
576 sal_uLong nStartChangeAction
;
577 sal_uLong nEndChangeAction
;
578 ScConversionParam maConvParam
; /// Conversion type and parameters.
580 void DoChange( ScDocument
* pRefDoc
, const ScAddress
& rCursorPos
);
581 void SetChangeTrack();
584 class ScUndoRefConversion
: public ScSimpleUndo
588 ScUndoRefConversion( ScDocShell
* pNewDocShell
,
589 const ScRange
& aMarkRange
, const ScMarkData
& rMark
,
590 ScDocument
* pNewUndoDoc
, ScDocument
* pNewRedoDoc
, sal_Bool bNewMulti
, sal_uInt16 nNewFlag
);
591 virtual ~ScUndoRefConversion();
595 virtual void Repeat(SfxRepeatTarget
& rTarget
);
596 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
598 virtual OUString
GetComment() const;
601 ScMarkData aMarkData
;
602 ScDocument
* pUndoDoc
;
603 ScDocument
* pRedoDoc
;
607 sal_uLong nStartChangeAction
;
608 sal_uLong nEndChangeAction
;
610 void DoChange( ScDocument
* pRefDoc
);
611 void SetChangeTrack();
614 class ScUndoListNames
: public ScBlockUndo
618 ScUndoListNames( ScDocShell
* pNewDocShell
,
619 const ScRange
& rRange
,
620 ScDocument
* pNewUndoDoc
, ScDocument
* pNewRedoDoc
);
621 virtual ~ScUndoListNames();
625 virtual void Repeat(SfxRepeatTarget
& rTarget
);
626 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
628 virtual OUString
GetComment() const;
631 ScDocument
* pUndoDoc
;
632 ScDocument
* pRedoDoc
;
634 void DoChange( ScDocument
* pSrcDoc
) const;
638 class ScUndoUseScenario
: public ScSimpleUndo
642 ScUndoUseScenario( ScDocShell
* pNewDocShell
,
643 const ScMarkData
& rMark
,
644 const ScArea
& rDestArea
, ScDocument
* pNewUndoDoc
,
645 const OUString
& rNewName
);
646 virtual ~ScUndoUseScenario();
650 virtual void Repeat(SfxRepeatTarget
& rTarget
);
651 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
653 virtual OUString
GetComment() const;
656 ScDocument
* pUndoDoc
;
658 ScMarkData aMarkData
;
663 class ScUndoSelectionStyle
: public ScSimpleUndo
667 ScUndoSelectionStyle( ScDocShell
* pNewDocShell
,
668 const ScMarkData
& rMark
,
669 const ScRange
& rRange
,
670 const OUString
& rName
,
671 ScDocument
* pNewUndoDoc
);
672 virtual ~ScUndoSelectionStyle();
676 virtual void Repeat(SfxRepeatTarget
& rTarget
);
677 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
679 virtual OUString
GetComment() const;
680 virtual sal_uInt16
GetId() const;
683 ScMarkData aMarkData
;
684 ScDocument
* pUndoDoc
;
688 void DoChange( const sal_Bool bUndo
);
692 class ScUndoRefreshLink
: public ScSimpleUndo
696 ScUndoRefreshLink( ScDocShell
* pNewDocShell
,
697 ScDocument
* pNewUndoDoc
);
698 virtual ~ScUndoRefreshLink();
702 virtual void Repeat(SfxRepeatTarget
& rTarget
);
703 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
705 virtual OUString
GetComment() const;
708 ScDocument
* pUndoDoc
;
709 ScDocument
* pRedoDoc
;
713 class ScUndoEnterMatrix
: public ScBlockUndo
717 ScUndoEnterMatrix( ScDocShell
* pNewDocShell
,
718 const ScRange
& rArea
,
719 ScDocument
* pNewUndoDoc
,
720 const OUString
& rForm
);
721 virtual ~ScUndoEnterMatrix();
725 virtual void Repeat(SfxRepeatTarget
& rTarget
);
726 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
728 virtual OUString
GetComment() const;
731 ScDocument
* pUndoDoc
;
733 sal_uLong nStartChangeAction
;
734 sal_uLong nEndChangeAction
;
736 void SetChangeTrack();
740 class ScUndoInsertAreaLink
: public ScSimpleUndo
744 ScUndoInsertAreaLink( ScDocShell
* pShell
,
745 const OUString
& rDocName
,
746 const OUString
& rFltName
, const OUString
& rOptions
,
747 const OUString
& rAreaName
, const ScRange
& rDestRange
,
748 sal_uLong nRefreshDelay
);
749 virtual ~ScUndoInsertAreaLink();
753 virtual void Repeat(SfxRepeatTarget
& rTarget
);
754 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
756 virtual OUString
GetComment() const;
764 sal_uLong nRefreshDelay
;
768 class ScUndoRemoveAreaLink
: public ScSimpleUndo
772 ScUndoRemoveAreaLink( ScDocShell
* pShell
,
773 const OUString
& rDocName
,
774 const OUString
& rFltName
, const OUString
& rOptions
,
775 const OUString
& rAreaName
, const ScRange
& rDestRange
,
776 sal_uLong nRefreshDelay
);
777 virtual ~ScUndoRemoveAreaLink();
781 virtual void Repeat(SfxRepeatTarget
& rTarget
);
782 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
784 virtual OUString
GetComment() const;
792 sal_uLong nRefreshDelay
;
796 class ScUndoUpdateAreaLink
: public ScSimpleUndo
//! also change BlockUndo?
800 ScUndoUpdateAreaLink( ScDocShell
* pShell
,
801 const OUString
& rOldD
,
802 const OUString
& rOldF
, const OUString
& rOldO
,
803 const OUString
& rOldA
, const ScRange
& rOldR
,
805 const OUString
& rNewD
,
806 const OUString
& rNewF
, const OUString
& rNewO
,
807 const OUString
& rNewA
, const ScRange
& rNewR
,
809 ScDocument
* pUndo
, ScDocument
* pRedo
,
810 sal_Bool bDoInsert
);
811 virtual ~ScUndoUpdateAreaLink();
815 virtual void Repeat(SfxRepeatTarget
& rTarget
);
816 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
818 virtual OUString
GetComment() const;
831 ScDocument
* pUndoDoc
;
832 ScDocument
* pRedoDoc
;
833 sal_uLong nOldRefresh
;
834 sal_uLong nNewRefresh
;
835 sal_Bool bWithInsert
;
837 void DoChange( const sal_Bool bUndo
) const;
841 class ScUndoIndent
: public ScBlockUndo
845 ScUndoIndent( ScDocShell
* pNewDocShell
, const ScMarkData
& rMark
,
846 ScDocument
* pNewUndoDoc
, sal_Bool bIncrement
);
847 virtual ~ScUndoIndent();
851 virtual void Repeat(SfxRepeatTarget
& rTarget
);
852 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
854 virtual OUString
GetComment() const;
857 ScMarkData aMarkData
;
858 ScDocument
* pUndoDoc
;
859 sal_Bool bIsIncrement
;
863 class ScUndoTransliterate
: public ScBlockUndo
867 ScUndoTransliterate( ScDocShell
* pNewDocShell
, const ScMarkData
& rMark
,
868 ScDocument
* pNewUndoDoc
, sal_Int32 nType
);
869 virtual ~ScUndoTransliterate();
873 virtual void Repeat(SfxRepeatTarget
& rTarget
);
874 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
876 virtual OUString
GetComment() const;
879 ScMarkData aMarkData
;
880 ScDocument
* pUndoDoc
;
881 sal_Int32 nTransliterationType
;
885 class ScUndoClearItems
: public ScBlockUndo
889 ScUndoClearItems( ScDocShell
* pNewDocShell
, const ScMarkData
& rMark
,
890 ScDocument
* pNewUndoDoc
, const sal_uInt16
* pW
);
891 virtual ~ScUndoClearItems();
895 virtual void Repeat(SfxRepeatTarget
& rTarget
);
896 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
898 virtual OUString
GetComment() const;
901 ScMarkData aMarkData
;
902 ScDocument
* pUndoDoc
;
907 class ScUndoRemoveBreaks
: public ScSimpleUndo
911 ScUndoRemoveBreaks( ScDocShell
* pNewDocShell
,
912 SCTAB nNewTab
, ScDocument
* pNewUndoDoc
);
913 virtual ~ScUndoRemoveBreaks();
917 virtual void Repeat(SfxRepeatTarget
& rTarget
);
918 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
920 virtual OUString
GetComment() const;
924 ScDocument
* pUndoDoc
;
928 class ScUndoRemoveMerge
: public ScBlockUndo
932 ScUndoRemoveMerge( ScDocShell
* pNewDocShell
,
933 const ScCellMergeOption
& rOption
,
934 ScDocument
* pNewUndoDoc
);
935 virtual ~ScUndoRemoveMerge();
939 virtual void Repeat(SfxRepeatTarget
& rTarget
);
940 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
942 virtual OUString
GetComment() const;
947 ScCellMergeOption maOption
;
948 ScDocument
* pUndoDoc
;
952 class ScUndoBorder
: public ScBlockUndo
956 ScUndoBorder( ScDocShell
* pNewDocShell
,
957 const ScRangeList
& rRangeList
,
958 ScDocument
* pNewUndoDoc
,
959 const SvxBoxItem
& rNewOuter
,
960 const SvxBoxInfoItem
& rNewInner
);
961 virtual ~ScUndoBorder();
965 virtual void Repeat(SfxRepeatTarget
& rTarget
);
966 virtual bool CanRepeat(SfxRepeatTarget
& rTarget
) const;
968 virtual OUString
GetComment() const;
971 ScDocument
* pUndoDoc
;
972 ScRangeList
* pRanges
;
974 SvxBoxInfoItem
* pInner
;
982 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */