1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: undoblk.hxx,v $
10 * $Revision: 1.15.128.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SC_UNDOBLK_HXX
31 #define SC_UNDOBLK_HXX
33 #include "undobase.hxx"
34 #include "markdata.hxx"
35 #include "viewutil.hxx"
36 #include "spellparam.hxx"
37 #include "cellmergeoption.hxx"
41 #include <boost/shared_ptr.hpp>
56 //----------------------------------------------------------------------------
58 class ScUndoInsertCells
: public ScMoveUndo
62 ScUndoInsertCells( ScDocShell
* pNewDocShell
,
63 const ScRange
& rRange
, SCTAB nNewCount
, SCTAB
* pNewTabs
, SCTAB
* pNewScenarios
,
64 InsCellCmd eNewCmd
, ScDocument
* pUndoDocument
, ScRefUndoData
* pRefData
,
65 BOOL bNewPartOfPaste
);
66 virtual ~ScUndoInsertCells();
70 virtual void Repeat( SfxRepeatTarget
& rTarget
);
71 virtual BOOL
CanRepeat( SfxRepeatTarget
& rTarget
) const;
73 virtual String
GetComment() const;
75 virtual BOOL
Merge( SfxUndoAction
*pNextAction
);
82 ULONG nEndChangeAction
;
85 SfxUndoAction
* pPasteUndo
;
87 void DoChange ( const BOOL bUndo
);
88 void SetChangeTrack();
92 class ScUndoDeleteCells
: public ScMoveUndo
96 ScUndoDeleteCells( ScDocShell
* pNewDocShell
,
97 const ScRange
& rRange
, SCTAB nNewCount
, SCTAB
* pNewTabs
, SCTAB
* pNewScenarios
,
98 DelCellCmd eNewCmd
, ScDocument
* pUndoDocument
, ScRefUndoData
* pRefData
);
99 virtual ~ScUndoDeleteCells();
103 virtual void Repeat(SfxRepeatTarget
& rTarget
);
104 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
106 virtual String
GetComment() const;
113 ULONG nStartChangeAction
;
114 ULONG nEndChangeAction
;
117 void DoChange ( const BOOL bUndo
);
118 void SetChangeTrack();
122 class ScUndoDeleteMulti
: public ScMoveUndo
126 ScUndoDeleteMulti( ScDocShell
* pNewDocShell
,
127 BOOL bNewRows
, BOOL bNeedsRefresh
, SCTAB nNewTab
,
128 const SCCOLROW
* pRng
, SCCOLROW nRngCnt
,
129 ScDocument
* pUndoDocument
, ScRefUndoData
* pRefData
);
130 virtual ~ScUndoDeleteMulti();
134 virtual void Repeat(SfxRepeatTarget
& rTarget
);
135 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
137 virtual String
GetComment() const;
145 ULONG nStartChangeAction
;
146 ULONG nEndChangeAction
;
148 void DoChange() const;
149 void SetChangeTrack();
153 class ScUndoCut
: public ScBlockUndo
157 ScUndoCut( ScDocShell
* pNewDocShell
,
158 ScRange aRange
, // adjusted for merged cells
159 ScAddress aOldEnd
, // end position without adjustment
160 const ScMarkData
& rMark
, // selected sheets
161 ScDocument
* pNewUndoDoc
);
162 virtual ~ScUndoCut();
166 virtual void Repeat(SfxRepeatTarget
& rTarget
);
167 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
169 virtual String
GetComment() const;
172 ScMarkData aMarkData
;
173 ScDocument
* pUndoDoc
;
174 ScRange aExtendedRange
;
175 ULONG nStartChangeAction
;
176 ULONG nEndChangeAction
;
178 void DoChange( const BOOL bUndo
);
179 void SetChangeTrack();
183 struct ScUndoPasteOptions
189 InsCellCmd eMoveMode
;
191 ScUndoPasteOptions() :
192 nFunction( PASTE_NOFUNC
),
196 eMoveMode( INS_NONE
)
200 class ScUndoPaste
: public ScBlockUndo
204 ScUndoPaste( ScDocShell
* pNewDocShell
,
205 SCCOL nStartX
, SCROW nStartY
, SCTAB nStartZ
,
206 SCCOL nEndX
, SCROW nEndY
, SCTAB nEndZ
,
207 const ScMarkData
& rMark
,
208 ScDocument
* pNewUndoDoc
, ScDocument
* pNewRedoDoc
,
210 ScRefUndoData
* pRefData
, void* pFill1
, void* pFill2
, void* pFill3
,
211 BOOL bRedoIsFilled
= TRUE
,
212 const ScUndoPasteOptions
* pOptions
= NULL
);
213 virtual ~ScUndoPaste();
217 virtual void Repeat(SfxRepeatTarget
& rTarget
);
218 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
220 virtual String
GetComment() const;
223 ScMarkData aMarkData
;
224 ScDocument
* pUndoDoc
;
225 ScDocument
* pRedoDoc
;
227 ScRefUndoData
* pRefUndoData
;
228 ScRefUndoData
* pRefRedoData
;
229 ULONG nStartChangeAction
;
230 ULONG nEndChangeAction
;
232 ScUndoPasteOptions aPasteOptions
;
234 void DoChange( const BOOL bUndo
);
235 void SetChangeTrack();
239 class ScUndoDragDrop
: public ScMoveUndo
243 ScUndoDragDrop( ScDocShell
* pNewDocShell
,
244 const ScRange
& rRange
, ScAddress aNewDestPos
, BOOL bNewCut
,
245 ScDocument
* pUndoDocument
, ScRefUndoData
* pRefData
,
247 virtual ~ScUndoDragDrop();
251 virtual void Repeat(SfxRepeatTarget
& rTarget
);
252 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
254 virtual String
GetComment() const;
259 ULONG nStartChangeAction
;
260 ULONG nEndChangeAction
;
262 BOOL bKeepScenarioFlags
;
264 void PaintArea( ScRange aRange
, USHORT nExtFlags
) const;
265 void DoUndo( ScRange aRange
) const;
267 void SetChangeTrack();
271 class ScUndoDeleteContents
: public ScSimpleUndo
275 ScUndoDeleteContents( ScDocShell
* pNewDocShell
,
276 const ScMarkData
& rMark
,
277 const ScRange
& rRange
,
278 ScDocument
* pNewUndoDoc
, BOOL bNewMulti
,
279 USHORT nNewFlags
, BOOL bObjects
);
280 virtual ~ScUndoDeleteContents();
284 virtual void Repeat(SfxRepeatTarget
& rTarget
);
285 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
287 virtual String
GetComment() const;
291 ScMarkData aMarkData
;
292 ScDocument
* pUndoDoc
; // Blockmarkierung und geloeschte Daten
293 SdrUndoAction
* pDrawUndo
; // geloeschte Objekte
294 ULONG nStartChangeAction
;
295 ULONG nEndChangeAction
;
297 BOOL bMulti
; // Mehrfachselektion
299 void DoChange( const BOOL bUndo
);
300 void SetChangeTrack();
304 class ScUndoFillTable
: public ScSimpleUndo
308 ScUndoFillTable( ScDocShell
* pNewDocShell
,
309 const ScMarkData
& rMark
,
310 SCCOL nStartX
, SCROW nStartY
, SCTAB nStartZ
,
311 SCCOL nEndX
, SCROW nEndY
, SCTAB nEndZ
,
312 ScDocument
* pNewUndoDoc
, BOOL bNewMulti
, SCTAB nSrc
,
313 USHORT nFlg
, USHORT nFunc
, BOOL bSkip
, BOOL bLink
);
314 virtual ~ScUndoFillTable();
318 virtual void Repeat(SfxRepeatTarget
& rTarget
);
319 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
321 virtual String
GetComment() const;
325 ScMarkData aMarkData
;
326 ScDocument
* pUndoDoc
; // Blockmarkierung und geloeschte Daten
327 ULONG nStartChangeAction
;
328 ULONG nEndChangeAction
;
332 BOOL bMulti
; // Mehrfachselektion
336 void DoChange( const BOOL bUndo
);
337 void SetChangeTrack();
341 class ScUndoSelectionAttr
: public ScSimpleUndo
345 ScUndoSelectionAttr( ScDocShell
* pNewDocShell
,
346 const ScMarkData
& rMark
,
347 SCCOL nStartX
, SCROW nStartY
, SCTAB nStartZ
,
348 SCCOL nEndX
, SCROW nEndY
, SCTAB nEndZ
,
349 ScDocument
* pNewUndoDoc
, BOOL bNewMulti
,
350 const ScPatternAttr
* pNewApply
,
351 const SvxBoxItem
* pNewOuter
= NULL
,
352 const SvxBoxInfoItem
* pNewInner
= NULL
);
353 virtual ~ScUndoSelectionAttr();
357 virtual void Repeat(SfxRepeatTarget
& rTarget
);
358 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
360 virtual String
GetComment() const;
362 ScEditDataArray
* GetDataArray();
364 ScMarkData aMarkData
;
366 ScEditDataArray aDataArray
;
367 ScDocument
* pUndoDoc
;
369 ScPatternAttr
* pApplyPattern
;
370 SvxBoxItem
* pLineOuter
;
371 SvxBoxInfoItem
* pLineInner
;
373 void DoChange( const BOOL bUndo
);
374 void ChangeEditData( const bool bUndo
);
378 class ScUndoWidthOrHeight
: public ScSimpleUndo
382 ScUndoWidthOrHeight( ScDocShell
* pNewDocShell
,
383 const ScMarkData
& rMark
,
384 SCCOLROW nNewStart
, SCTAB nNewStartTab
,
385 SCCOLROW nNewEnd
, SCTAB nNewEndTab
,
386 ScDocument
* pNewUndoDoc
,
387 SCCOLROW nNewCnt
, SCCOLROW
* pNewRanges
,
388 ScOutlineTable
* pNewUndoTab
,
389 ScSizeMode eNewMode
, USHORT nNewSizeTwips
,
391 virtual ~ScUndoWidthOrHeight();
395 virtual void Repeat(SfxRepeatTarget
& rTarget
);
396 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
398 virtual String
GetComment() const;
401 ScMarkData aMarkData
;
406 ScDocument
* pUndoDoc
;
407 ScOutlineTable
* pUndoTab
;
413 SdrUndoAction
* pDrawUndo
;
417 class ScUndoAutoFill
: public ScBlockUndo
421 ScUndoAutoFill( ScDocShell
* pNewDocShell
,
422 const ScRange
& rRange
, const ScRange
& rSourceArea
,
423 ScDocument
* pNewUndoDoc
, const ScMarkData
& rMark
,
425 FillCmd eNewFillCmd
, FillDateCmd eNewFillDateCmd
,
426 double fNewStartValue
, double fNewStepValue
, double fNewMaxValue
,
427 USHORT nMaxShIndex
);
428 virtual ~ScUndoAutoFill();
432 virtual void Repeat(SfxRepeatTarget
& rTarget
);
433 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
435 virtual String
GetComment() const;
439 ScMarkData aMarkData
;
440 ScDocument
* pUndoDoc
;
443 FillDateCmd eFillDateCmd
;
447 ULONG nStartChangeAction
;
448 ULONG nEndChangeAction
;
449 USHORT nMaxSharedIndex
;
451 void SetChangeTrack();
455 class ScUndoMerge
: public ScSimpleUndo
459 ScUndoMerge( ScDocShell
* pNewDocShell
, const ScCellMergeOption
& rOption
,
460 bool bMergeContents
, ScDocument
* pUndoDoc
, SdrUndoAction
* pDrawUndo
);
461 virtual ~ScUndoMerge();
465 virtual void Repeat(SfxRepeatTarget
& rTarget
);
466 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
468 virtual String
GetComment() const;
471 ScCellMergeOption maOption
;
472 bool mbMergeContents
; // Merge contents in Redo().
473 ScDocument
* mpUndoDoc
; // wenn Daten zusammengefasst
474 SdrUndoAction
* mpDrawUndo
;
476 void DoChange( bool bUndo
) const;
480 class ScUndoAutoFormat
: public ScBlockUndo
484 ScUndoAutoFormat( ScDocShell
* pNewDocShell
,
485 const ScRange
& rRange
, ScDocument
* pNewUndoDoc
,
486 const ScMarkData
& rMark
,
487 BOOL bNewSize
, USHORT nNewFormatNo
);
488 virtual ~ScUndoAutoFormat();
492 virtual void Repeat(SfxRepeatTarget
& rTarget
);
493 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
495 virtual String
GetComment() const;
498 ScDocument
* pUndoDoc
; // geloeschte Daten
499 ScMarkData aMarkData
;
505 class ScUndoReplace
: public ScSimpleUndo
509 ScUndoReplace( ScDocShell
* pNewDocShell
,
510 const ScMarkData
& rMark
,
511 SCCOL nCurX
, SCROW nCurY
, SCTAB nCurZ
,
512 const String
& rNewUndoStr
, ScDocument
* pNewUndoDoc
,
513 const SvxSearchItem
* pItem
);
514 virtual ~ScUndoReplace();
518 virtual void Repeat(SfxRepeatTarget
& rTarget
);
519 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
521 virtual String
GetComment() const;
524 ScAddress aCursorPos
;
525 ScMarkData aMarkData
;
526 String aUndoStr
; // Daten bei Einfachmarkierung
527 ScDocument
* pUndoDoc
; // Blockmarkierung und geloeschte Daten
528 SvxSearchItem
* pSearchItem
;
529 ULONG nStartChangeAction
;
530 ULONG nEndChangeAction
;
532 void SetChangeTrack();
536 class ScUndoTabOp
: public ScSimpleUndo
540 ScUndoTabOp( ScDocShell
* pNewDocShell
,
541 SCCOL nStartX
, SCROW nStartY
, SCTAB nStartZ
,
542 SCCOL nEndX
, SCROW nEndY
, SCTAB nEndZ
,
543 ScDocument
* pNewUndoDoc
,
544 const ScRefAddress
& rFormulaCell
,
545 const ScRefAddress
& rFormulaEnd
,
546 const ScRefAddress
& rRowCell
,
547 const ScRefAddress
& rColCell
,
549 virtual ~ScUndoTabOp();
553 virtual void Repeat(SfxRepeatTarget
& rTarget
);
554 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
556 virtual String
GetComment() const;
560 ScDocument
* pUndoDoc
; // geloeschte Daten
561 ScRefAddress theFormulaCell
;
562 ScRefAddress theFormulaEnd
;
563 ScRefAddress theRowCell
;
564 ScRefAddress theColCell
;
569 class ScUndoConversion
: public ScSimpleUndo
575 ScDocShell
* pNewDocShell
, const ScMarkData
& rMark
,
576 SCCOL nCurX
, SCROW nCurY
, SCTAB nCurZ
, ScDocument
* pNewUndoDoc
,
577 SCCOL nNewX
, SCROW nNewY
, SCTAB nNewZ
, ScDocument
* pNewRedoDoc
,
578 const ScConversionParam
& rConvParam
);
579 virtual ~ScUndoConversion();
583 virtual void Repeat(SfxRepeatTarget
& rTarget
);
584 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
586 virtual String
GetComment() const;
589 ScMarkData aMarkData
;
590 ScAddress aCursorPos
;
591 ScDocument
* pUndoDoc
; // Blockmarkierung und geloeschte Daten
592 ScAddress aNewCursorPos
;
593 ScDocument
* pRedoDoc
; // Blockmarkierung und neue Daten
594 ULONG nStartChangeAction
;
595 ULONG nEndChangeAction
;
596 ScConversionParam maConvParam
; /// Conversion type and parameters.
598 void DoChange( ScDocument
* pRefDoc
, const ScAddress
& rCursorPos
);
599 void SetChangeTrack();
602 class ScUndoRefConversion
: public ScSimpleUndo
606 ScUndoRefConversion( ScDocShell
* pNewDocShell
,
607 const ScRange
& aMarkRange
, const ScMarkData
& rMark
,
608 ScDocument
* pNewUndoDoc
, ScDocument
* pNewRedoDoc
, BOOL bNewMulti
, USHORT nNewFlag
);
609 virtual ~ScUndoRefConversion();
613 virtual void Repeat(SfxRepeatTarget
& rTarget
);
614 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
616 virtual String
GetComment() const;
619 ScMarkData aMarkData
;
620 ScDocument
* pUndoDoc
;
621 ScDocument
* pRedoDoc
;
625 ULONG nStartChangeAction
;
626 ULONG nEndChangeAction
;
628 void DoChange( ScDocument
* pRefDoc
);
629 void SetChangeTrack();
632 class ScUndoListNames
: public ScBlockUndo
636 ScUndoListNames( ScDocShell
* pNewDocShell
,
637 const ScRange
& rRange
,
638 ScDocument
* pNewUndoDoc
, ScDocument
* pNewRedoDoc
);
639 virtual ~ScUndoListNames();
643 virtual void Repeat(SfxRepeatTarget
& rTarget
);
644 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
646 virtual String
GetComment() const;
649 ScDocument
* pUndoDoc
;
650 ScDocument
* pRedoDoc
;
652 void DoChange( ScDocument
* pSrcDoc
) const;
656 class ScUndoUseScenario
: public ScSimpleUndo
660 ScUndoUseScenario( ScDocShell
* pNewDocShell
,
661 const ScMarkData
& rMark
,
662 const ScArea
& rDestArea
, ScDocument
* pNewUndoDoc
,
663 const String
& rNewName
);
664 virtual ~ScUndoUseScenario();
668 virtual void Repeat(SfxRepeatTarget
& rTarget
);
669 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
671 virtual String
GetComment() const;
674 ScDocument
* pUndoDoc
;
676 ScMarkData aMarkData
;
681 class ScUndoSelectionStyle
: public ScSimpleUndo
685 ScUndoSelectionStyle( ScDocShell
* pNewDocShell
,
686 const ScMarkData
& rMark
,
687 const ScRange
& rRange
,
689 ScDocument
* pNewUndoDoc
);
690 virtual ~ScUndoSelectionStyle();
694 virtual void Repeat(SfxRepeatTarget
& rTarget
);
695 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
697 virtual String
GetComment() const;
698 virtual USHORT
GetId() const;
701 ScMarkData aMarkData
;
702 ScDocument
* pUndoDoc
;
706 void DoChange( const BOOL bUndo
);
710 class ScUndoRefreshLink
: public ScSimpleUndo
714 ScUndoRefreshLink( ScDocShell
* pNewDocShell
,
715 ScDocument
* pNewUndoDoc
);
716 virtual ~ScUndoRefreshLink();
720 virtual void Repeat(SfxRepeatTarget
& rTarget
);
721 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
723 virtual String
GetComment() const;
726 ScDocument
* pUndoDoc
;
727 ScDocument
* pRedoDoc
;
731 class ScUndoEnterMatrix
: public ScBlockUndo
735 ScUndoEnterMatrix( ScDocShell
* pNewDocShell
,
736 const ScRange
& rArea
,
737 ScDocument
* pNewUndoDoc
,
738 const String
& rForm
);
739 virtual ~ScUndoEnterMatrix();
743 virtual void Repeat(SfxRepeatTarget
& rTarget
);
744 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
746 virtual String
GetComment() const;
749 ScDocument
* pUndoDoc
;
751 formula::FormulaGrammar::AddressConvention eConv
;
752 ULONG nStartChangeAction
;
753 ULONG nEndChangeAction
;
755 void SetChangeTrack();
759 class ScUndoInsertAreaLink
: public ScSimpleUndo
763 ScUndoInsertAreaLink( ScDocShell
* pShell
,
765 const String
& rFlt
, const String
& rOpt
,
766 const String
& rArea
, const ScRange
& rDestRange
,
767 ULONG nRefreshDelay
);
768 virtual ~ScUndoInsertAreaLink();
772 virtual void Repeat(SfxRepeatTarget
& rTarget
);
773 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
775 virtual String
GetComment() const;
787 class ScUndoRemoveAreaLink
: public ScSimpleUndo
791 ScUndoRemoveAreaLink( ScDocShell
* pShell
,
793 const String
& rFlt
, const String
& rOpt
,
794 const String
& rArea
, const ScRange
& rDestRange
,
795 ULONG nRefreshDelay
);
796 virtual ~ScUndoRemoveAreaLink();
800 virtual void Repeat(SfxRepeatTarget
& rTarget
);
801 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
803 virtual String
GetComment() const;
815 class ScUndoUpdateAreaLink
: public ScSimpleUndo
//! auch BlockUndo umstellen?
819 ScUndoUpdateAreaLink( ScDocShell
* pShell
,
821 const String
& rOldF
, const String
& rOldO
,
822 const String
& rOldA
, const ScRange
& rOldR
,
825 const String
& rNewF
, const String
& rNewO
,
826 const String
& rNewA
, const ScRange
& rNewR
,
828 ScDocument
* pUndo
, ScDocument
* pRedo
,
830 virtual ~ScUndoUpdateAreaLink();
834 virtual void Repeat(SfxRepeatTarget
& rTarget
);
835 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
837 virtual String
GetComment() const;
850 ScDocument
* pUndoDoc
;
851 ScDocument
* pRedoDoc
;
856 void DoChange( const BOOL bUndo
) const;
860 class ScUndoIndent
: public ScBlockUndo
864 ScUndoIndent( ScDocShell
* pNewDocShell
, const ScMarkData
& rMark
,
865 ScDocument
* pNewUndoDoc
, BOOL bIncrement
);
866 virtual ~ScUndoIndent();
870 virtual void Repeat(SfxRepeatTarget
& rTarget
);
871 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
873 virtual String
GetComment() const;
876 ScMarkData aMarkData
;
877 ScDocument
* pUndoDoc
;
882 class ScUndoTransliterate
: public ScBlockUndo
886 ScUndoTransliterate( ScDocShell
* pNewDocShell
, const ScMarkData
& rMark
,
887 ScDocument
* pNewUndoDoc
, sal_Int32 nType
);
888 virtual ~ScUndoTransliterate();
892 virtual void Repeat(SfxRepeatTarget
& rTarget
);
893 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
895 virtual String
GetComment() const;
898 ScMarkData aMarkData
;
899 ScDocument
* pUndoDoc
;
900 sal_Int32 nTransliterationType
;
904 class ScUndoClearItems
: public ScBlockUndo
908 ScUndoClearItems( ScDocShell
* pNewDocShell
, const ScMarkData
& rMark
,
909 ScDocument
* pNewUndoDoc
, const USHORT
* pW
);
910 virtual ~ScUndoClearItems();
914 virtual void Repeat(SfxRepeatTarget
& rTarget
);
915 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
917 virtual String
GetComment() const;
920 ScMarkData aMarkData
;
921 ScDocument
* pUndoDoc
;
926 class ScUndoRemoveBreaks
: public ScSimpleUndo
930 ScUndoRemoveBreaks( ScDocShell
* pNewDocShell
,
931 SCTAB nNewTab
, ScDocument
* pNewUndoDoc
);
932 virtual ~ScUndoRemoveBreaks();
936 virtual void Repeat(SfxRepeatTarget
& rTarget
);
937 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
939 virtual String
GetComment() const;
943 ScDocument
* pUndoDoc
;
947 class ScUndoRemoveMerge
: public ScBlockUndo
951 ScUndoRemoveMerge( ScDocShell
* pNewDocShell
,
952 const ScCellMergeOption
& rOption
,
953 ScDocument
* pNewUndoDoc
);
954 virtual ~ScUndoRemoveMerge();
958 virtual void Repeat(SfxRepeatTarget
& rTarget
);
959 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
961 virtual String
GetComment() const;
966 ScCellMergeOption maOption
;
967 ScDocument
* pUndoDoc
;
971 class ScUndoBorder
: public ScBlockUndo
975 ScUndoBorder( ScDocShell
* pNewDocShell
,
976 const ScRangeList
& rRangeList
,
977 ScDocument
* pNewUndoDoc
,
978 const SvxBoxItem
& rNewOuter
,
979 const SvxBoxInfoItem
& rNewInner
);
980 virtual ~ScUndoBorder();
984 virtual void Repeat(SfxRepeatTarget
& rTarget
);
985 virtual BOOL
CanRepeat(SfxRepeatTarget
& rTarget
) const;
987 virtual String
GetComment() const;
990 ScDocument
* pUndoDoc
;
991 ScRangeList
* pRanges
;
993 SvxBoxInfoItem
* pInner
;