1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir #ifndef SC_UNDOBLK_HXX 24cdf0e10cSrcweir #define SC_UNDOBLK_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "undobase.hxx" 27cdf0e10cSrcweir #include "markdata.hxx" 28cdf0e10cSrcweir #include "viewutil.hxx" 29cdf0e10cSrcweir #include "spellparam.hxx" 30cdf0e10cSrcweir 31cdf0e10cSrcweir class ScDocShell; 32cdf0e10cSrcweir class ScBaseCell; 33cdf0e10cSrcweir class ScDocument; 34cdf0e10cSrcweir class ScOutlineTable; 35cdf0e10cSrcweir class ScRangeName; 36cdf0e10cSrcweir class ScRangeList; 37cdf0e10cSrcweir class ScDBCollection; 38cdf0e10cSrcweir class ScPatternAttr; 39cdf0e10cSrcweir class SvxBoxItem; 40cdf0e10cSrcweir class SvxBoxInfoItem; 41cdf0e10cSrcweir class SvxSearchItem; 42cdf0e10cSrcweir class SdrUndoAction; 43cdf0e10cSrcweir 44cdf0e10cSrcweir //---------------------------------------------------------------------------- 45cdf0e10cSrcweir 46cdf0e10cSrcweir class ScUndoInsertCells: public ScMoveUndo 47cdf0e10cSrcweir { 48cdf0e10cSrcweir public: 49cdf0e10cSrcweir TYPEINFO(); 50cdf0e10cSrcweir ScUndoInsertCells( ScDocShell* pNewDocShell, 51cdf0e10cSrcweir const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios, 52cdf0e10cSrcweir InsCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData, 53cdf0e10cSrcweir sal_Bool bNewPartOfPaste ); 54cdf0e10cSrcweir virtual ~ScUndoInsertCells(); 55cdf0e10cSrcweir 56cdf0e10cSrcweir virtual void Undo(); 57cdf0e10cSrcweir virtual void Redo(); 58cdf0e10cSrcweir virtual void Repeat( SfxRepeatTarget& rTarget ); 59cdf0e10cSrcweir virtual sal_Bool CanRepeat( SfxRepeatTarget& rTarget ) const; 60cdf0e10cSrcweir 61cdf0e10cSrcweir virtual String GetComment() const; 62cdf0e10cSrcweir 63cdf0e10cSrcweir virtual sal_Bool Merge( SfxUndoAction *pNextAction ); 64cdf0e10cSrcweir 65cdf0e10cSrcweir private: 66cdf0e10cSrcweir ScRange aEffRange; 67cdf0e10cSrcweir SCTAB nCount; 68cdf0e10cSrcweir SCTAB* pTabs; 69cdf0e10cSrcweir SCTAB* pScenarios; 70cdf0e10cSrcweir sal_uLong nEndChangeAction; 71cdf0e10cSrcweir InsCellCmd eCmd; 72cdf0e10cSrcweir sal_Bool bPartOfPaste; 73cdf0e10cSrcweir SfxUndoAction* pPasteUndo; 74cdf0e10cSrcweir 75cdf0e10cSrcweir void DoChange ( const sal_Bool bUndo ); 76cdf0e10cSrcweir void SetChangeTrack(); 77cdf0e10cSrcweir }; 78cdf0e10cSrcweir 79cdf0e10cSrcweir 80cdf0e10cSrcweir class ScUndoDeleteCells: public ScMoveUndo 81cdf0e10cSrcweir { 82cdf0e10cSrcweir public: 83cdf0e10cSrcweir TYPEINFO(); 84cdf0e10cSrcweir ScUndoDeleteCells( ScDocShell* pNewDocShell, 85cdf0e10cSrcweir const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios, 86cdf0e10cSrcweir DelCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData ); 87cdf0e10cSrcweir virtual ~ScUndoDeleteCells(); 88cdf0e10cSrcweir 89cdf0e10cSrcweir virtual void Undo(); 90cdf0e10cSrcweir virtual void Redo(); 91cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 92cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 93cdf0e10cSrcweir 94cdf0e10cSrcweir virtual String GetComment() const; 95cdf0e10cSrcweir 96cdf0e10cSrcweir private: 97cdf0e10cSrcweir ScRange aEffRange; 98cdf0e10cSrcweir SCTAB nCount; 99cdf0e10cSrcweir SCTAB* pTabs; 100cdf0e10cSrcweir SCTAB* pScenarios; 101cdf0e10cSrcweir sal_uLong nStartChangeAction; 102cdf0e10cSrcweir sal_uLong nEndChangeAction; 103cdf0e10cSrcweir DelCellCmd eCmd; 104cdf0e10cSrcweir 105cdf0e10cSrcweir void DoChange ( const sal_Bool bUndo ); 106cdf0e10cSrcweir void SetChangeTrack(); 107cdf0e10cSrcweir }; 108cdf0e10cSrcweir 109cdf0e10cSrcweir 110cdf0e10cSrcweir class ScUndoDeleteMulti: public ScMoveUndo 111cdf0e10cSrcweir { 112cdf0e10cSrcweir public: 113cdf0e10cSrcweir TYPEINFO(); 114cdf0e10cSrcweir ScUndoDeleteMulti( ScDocShell* pNewDocShell, 115cdf0e10cSrcweir sal_Bool bNewRows, sal_Bool bNeedsRefresh, SCTAB nNewTab, 116cdf0e10cSrcweir const SCCOLROW* pRng, SCCOLROW nRngCnt, 117cdf0e10cSrcweir ScDocument* pUndoDocument, ScRefUndoData* pRefData ); 118cdf0e10cSrcweir virtual ~ScUndoDeleteMulti(); 119cdf0e10cSrcweir 120cdf0e10cSrcweir virtual void Undo(); 121cdf0e10cSrcweir virtual void Redo(); 122cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 123cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 124cdf0e10cSrcweir 125cdf0e10cSrcweir virtual String GetComment() const; 126cdf0e10cSrcweir 127cdf0e10cSrcweir private: 128cdf0e10cSrcweir sal_Bool bRows; 129cdf0e10cSrcweir sal_Bool bRefresh; 130cdf0e10cSrcweir SCTAB nTab; 131cdf0e10cSrcweir SCCOLROW* pRanges; 132cdf0e10cSrcweir SCCOLROW nRangeCnt; 133cdf0e10cSrcweir sal_uLong nStartChangeAction; 134cdf0e10cSrcweir sal_uLong nEndChangeAction; 135cdf0e10cSrcweir 136cdf0e10cSrcweir void DoChange() const; 137cdf0e10cSrcweir void SetChangeTrack(); 138cdf0e10cSrcweir }; 139cdf0e10cSrcweir 140cdf0e10cSrcweir 141cdf0e10cSrcweir class ScUndoCut: public ScBlockUndo 142cdf0e10cSrcweir { 143cdf0e10cSrcweir public: 144cdf0e10cSrcweir TYPEINFO(); 145cdf0e10cSrcweir ScUndoCut( ScDocShell* pNewDocShell, 146cdf0e10cSrcweir ScRange aRange, // adjusted for merged cells 147cdf0e10cSrcweir ScAddress aOldEnd, // end position without adjustment 148cdf0e10cSrcweir const ScMarkData& rMark, // selected sheets 149cdf0e10cSrcweir ScDocument* pNewUndoDoc ); 150cdf0e10cSrcweir virtual ~ScUndoCut(); 151cdf0e10cSrcweir 152cdf0e10cSrcweir virtual void Undo(); 153cdf0e10cSrcweir virtual void Redo(); 154cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 155cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 156cdf0e10cSrcweir 157cdf0e10cSrcweir virtual String GetComment() const; 158cdf0e10cSrcweir 159cdf0e10cSrcweir private: 160cdf0e10cSrcweir ScMarkData aMarkData; 161cdf0e10cSrcweir ScDocument* pUndoDoc; 162cdf0e10cSrcweir ScRange aExtendedRange; 163cdf0e10cSrcweir sal_uLong nStartChangeAction; 164cdf0e10cSrcweir sal_uLong nEndChangeAction; 165cdf0e10cSrcweir 166cdf0e10cSrcweir void DoChange( const sal_Bool bUndo ); 167cdf0e10cSrcweir void SetChangeTrack(); 168cdf0e10cSrcweir }; 169cdf0e10cSrcweir 170cdf0e10cSrcweir 171cdf0e10cSrcweir struct ScUndoPasteOptions 172cdf0e10cSrcweir { 173cdf0e10cSrcweir sal_uInt16 nFunction; 174cdf0e10cSrcweir sal_Bool bSkipEmpty; 175cdf0e10cSrcweir sal_Bool bTranspose; 176cdf0e10cSrcweir sal_Bool bAsLink; 177cdf0e10cSrcweir InsCellCmd eMoveMode; 178cdf0e10cSrcweir ScUndoPasteOptionsScUndoPasteOptions179cdf0e10cSrcweir ScUndoPasteOptions() : 180cdf0e10cSrcweir nFunction( PASTE_NOFUNC ), 181cdf0e10cSrcweir bSkipEmpty( sal_False ), 182cdf0e10cSrcweir bTranspose( sal_False ), 183cdf0e10cSrcweir bAsLink( sal_False ), 184cdf0e10cSrcweir eMoveMode( INS_NONE ) 185cdf0e10cSrcweir {} 186cdf0e10cSrcweir }; 187cdf0e10cSrcweir 188cdf0e10cSrcweir class ScUndoPaste: public ScBlockUndo 189cdf0e10cSrcweir { 190cdf0e10cSrcweir public: 191cdf0e10cSrcweir TYPEINFO(); 192cdf0e10cSrcweir ScUndoPaste( ScDocShell* pNewDocShell, 193cdf0e10cSrcweir SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, 194cdf0e10cSrcweir SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, 195cdf0e10cSrcweir const ScMarkData& rMark, 196cdf0e10cSrcweir ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, 197cdf0e10cSrcweir sal_uInt16 nNewFlags, 198cdf0e10cSrcweir ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3, 199cdf0e10cSrcweir sal_Bool bRedoIsFilled = sal_True, 200cdf0e10cSrcweir const ScUndoPasteOptions* pOptions = NULL ); 201cdf0e10cSrcweir virtual ~ScUndoPaste(); 202cdf0e10cSrcweir 203cdf0e10cSrcweir virtual void Undo(); 204cdf0e10cSrcweir virtual void Redo(); 205cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 206cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 207cdf0e10cSrcweir 208cdf0e10cSrcweir virtual String GetComment() const; 209cdf0e10cSrcweir 210cdf0e10cSrcweir private: 211cdf0e10cSrcweir ScMarkData aMarkData; 212cdf0e10cSrcweir ScDocument* pUndoDoc; 213cdf0e10cSrcweir ScDocument* pRedoDoc; 214cdf0e10cSrcweir sal_uInt16 nFlags; 215cdf0e10cSrcweir ScRefUndoData* pRefUndoData; 216cdf0e10cSrcweir ScRefUndoData* pRefRedoData; 217cdf0e10cSrcweir sal_uLong nStartChangeAction; 218cdf0e10cSrcweir sal_uLong nEndChangeAction; 219cdf0e10cSrcweir sal_Bool bRedoFilled; 220cdf0e10cSrcweir ScUndoPasteOptions aPasteOptions; 221cdf0e10cSrcweir 222cdf0e10cSrcweir void DoChange( const sal_Bool bUndo ); 223cdf0e10cSrcweir void SetChangeTrack(); 224cdf0e10cSrcweir }; 225cdf0e10cSrcweir 226cdf0e10cSrcweir 227cdf0e10cSrcweir class ScUndoDragDrop: public ScMoveUndo 228cdf0e10cSrcweir { 229cdf0e10cSrcweir public: 230cdf0e10cSrcweir TYPEINFO(); 231cdf0e10cSrcweir ScUndoDragDrop( ScDocShell* pNewDocShell, 232cdf0e10cSrcweir const ScRange& rRange, ScAddress aNewDestPos, sal_Bool bNewCut, 233cdf0e10cSrcweir ScDocument* pUndoDocument, ScRefUndoData* pRefData, 234cdf0e10cSrcweir sal_Bool bScenario ); 235cdf0e10cSrcweir virtual ~ScUndoDragDrop(); 236cdf0e10cSrcweir 237cdf0e10cSrcweir virtual void Undo(); 238cdf0e10cSrcweir virtual void Redo(); 239cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 240cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 241cdf0e10cSrcweir 242cdf0e10cSrcweir virtual String GetComment() const; 243cdf0e10cSrcweir 244cdf0e10cSrcweir private: 245cdf0e10cSrcweir ScRange aSrcRange; 246cdf0e10cSrcweir ScRange aDestRange; 247cdf0e10cSrcweir sal_uLong nStartChangeAction; 248cdf0e10cSrcweir sal_uLong nEndChangeAction; 249cdf0e10cSrcweir sal_Bool bCut; 250cdf0e10cSrcweir sal_Bool bKeepScenarioFlags; 251cdf0e10cSrcweir 252cdf0e10cSrcweir void PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const; 253cdf0e10cSrcweir void DoUndo( ScRange aRange ) const; 254cdf0e10cSrcweir 255cdf0e10cSrcweir void SetChangeTrack(); 256cdf0e10cSrcweir }; 257cdf0e10cSrcweir 258cdf0e10cSrcweir 259cdf0e10cSrcweir class ScUndoDeleteContents: public ScSimpleUndo 260cdf0e10cSrcweir { 261cdf0e10cSrcweir public: 262cdf0e10cSrcweir TYPEINFO(); 263cdf0e10cSrcweir ScUndoDeleteContents( ScDocShell* pNewDocShell, 264cdf0e10cSrcweir const ScMarkData& rMark, 265cdf0e10cSrcweir const ScRange& rRange, 266cdf0e10cSrcweir ScDocument* pNewUndoDoc, sal_Bool bNewMulti, 267cdf0e10cSrcweir sal_uInt16 nNewFlags, sal_Bool bObjects ); 268cdf0e10cSrcweir virtual ~ScUndoDeleteContents(); 269cdf0e10cSrcweir 270cdf0e10cSrcweir virtual void Undo(); 271cdf0e10cSrcweir virtual void Redo(); 272cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 273cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 274cdf0e10cSrcweir 275cdf0e10cSrcweir virtual String GetComment() const; 276cdf0e10cSrcweir 277cdf0e10cSrcweir private: 278cdf0e10cSrcweir ScRange aRange; 279cdf0e10cSrcweir ScMarkData aMarkData; 280cdf0e10cSrcweir ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten 281cdf0e10cSrcweir SdrUndoAction* pDrawUndo; // geloeschte Objekte 282cdf0e10cSrcweir sal_uLong nStartChangeAction; 283cdf0e10cSrcweir sal_uLong nEndChangeAction; 284cdf0e10cSrcweir sal_uInt16 nFlags; 285cdf0e10cSrcweir sal_Bool bMulti; // Mehrfachselektion 286cdf0e10cSrcweir 287cdf0e10cSrcweir void DoChange( const sal_Bool bUndo ); 288cdf0e10cSrcweir void SetChangeTrack(); 289cdf0e10cSrcweir }; 290cdf0e10cSrcweir 291cdf0e10cSrcweir 292cdf0e10cSrcweir class ScUndoFillTable: public ScSimpleUndo 293cdf0e10cSrcweir { 294cdf0e10cSrcweir public: 295cdf0e10cSrcweir TYPEINFO(); 296cdf0e10cSrcweir ScUndoFillTable( ScDocShell* pNewDocShell, 297cdf0e10cSrcweir const ScMarkData& rMark, 298cdf0e10cSrcweir SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, 299cdf0e10cSrcweir SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, 300cdf0e10cSrcweir ScDocument* pNewUndoDoc, sal_Bool bNewMulti, SCTAB nSrc, 301cdf0e10cSrcweir sal_uInt16 nFlg, sal_uInt16 nFunc, sal_Bool bSkip, sal_Bool bLink ); 302cdf0e10cSrcweir virtual ~ScUndoFillTable(); 303cdf0e10cSrcweir 304cdf0e10cSrcweir virtual void Undo(); 305cdf0e10cSrcweir virtual void Redo(); 306cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 307cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 308cdf0e10cSrcweir 309cdf0e10cSrcweir virtual String GetComment() const; 310cdf0e10cSrcweir 311cdf0e10cSrcweir private: 312cdf0e10cSrcweir ScRange aRange; 313cdf0e10cSrcweir ScMarkData aMarkData; 314cdf0e10cSrcweir ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten 315cdf0e10cSrcweir sal_uLong nStartChangeAction; 316cdf0e10cSrcweir sal_uLong nEndChangeAction; 317cdf0e10cSrcweir sal_uInt16 nFlags; 318cdf0e10cSrcweir sal_uInt16 nFunction; 319cdf0e10cSrcweir SCTAB nSrcTab; 320cdf0e10cSrcweir sal_Bool bMulti; // Mehrfachselektion 321cdf0e10cSrcweir sal_Bool bSkipEmpty; 322cdf0e10cSrcweir sal_Bool bAsLink; 323cdf0e10cSrcweir 324cdf0e10cSrcweir void DoChange( const sal_Bool bUndo ); 325cdf0e10cSrcweir void SetChangeTrack(); 326cdf0e10cSrcweir }; 327cdf0e10cSrcweir 328cdf0e10cSrcweir 329cdf0e10cSrcweir class ScUndoSelectionAttr: public ScSimpleUndo 330cdf0e10cSrcweir { 331cdf0e10cSrcweir public: 332cdf0e10cSrcweir TYPEINFO(); 333cdf0e10cSrcweir ScUndoSelectionAttr( ScDocShell* pNewDocShell, 334cdf0e10cSrcweir const ScMarkData& rMark, 335cdf0e10cSrcweir SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, 336cdf0e10cSrcweir SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, 337cdf0e10cSrcweir ScDocument* pNewUndoDoc, sal_Bool bNewMulti, 338cdf0e10cSrcweir const ScPatternAttr* pNewApply, 339cdf0e10cSrcweir const SvxBoxItem* pNewOuter = NULL, 340cdf0e10cSrcweir const SvxBoxInfoItem* pNewInner = NULL ); 341cdf0e10cSrcweir virtual ~ScUndoSelectionAttr(); 342cdf0e10cSrcweir 343cdf0e10cSrcweir virtual void Undo(); 344cdf0e10cSrcweir virtual void Redo(); 345cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 346cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 347cdf0e10cSrcweir 348cdf0e10cSrcweir virtual String GetComment() const; 349cdf0e10cSrcweir 350cdf0e10cSrcweir private: 351cdf0e10cSrcweir ScMarkData aMarkData; 352cdf0e10cSrcweir ScRange aRange; 353cdf0e10cSrcweir ScDocument* pUndoDoc; 354cdf0e10cSrcweir sal_Bool bMulti; 355cdf0e10cSrcweir ScPatternAttr* pApplyPattern; 356cdf0e10cSrcweir SvxBoxItem* pLineOuter; 357cdf0e10cSrcweir SvxBoxInfoItem* pLineInner; 358cdf0e10cSrcweir 359cdf0e10cSrcweir void DoChange( const sal_Bool bUndo ); 360cdf0e10cSrcweir }; 361cdf0e10cSrcweir 362cdf0e10cSrcweir 363cdf0e10cSrcweir class ScUndoWidthOrHeight: public ScSimpleUndo 364cdf0e10cSrcweir { 365cdf0e10cSrcweir public: 366cdf0e10cSrcweir TYPEINFO(); 367cdf0e10cSrcweir ScUndoWidthOrHeight( ScDocShell* pNewDocShell, 368cdf0e10cSrcweir const ScMarkData& rMark, 369cdf0e10cSrcweir SCCOLROW nNewStart, SCTAB nNewStartTab, 370cdf0e10cSrcweir SCCOLROW nNewEnd, SCTAB nNewEndTab, 371cdf0e10cSrcweir ScDocument* pNewUndoDoc, 372cdf0e10cSrcweir SCCOLROW nNewCnt, SCCOLROW* pNewRanges, 373cdf0e10cSrcweir ScOutlineTable* pNewUndoTab, 374cdf0e10cSrcweir ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips, 375cdf0e10cSrcweir sal_Bool bNewWidth ); 376cdf0e10cSrcweir virtual ~ScUndoWidthOrHeight(); 377cdf0e10cSrcweir 378cdf0e10cSrcweir virtual void Undo(); 379cdf0e10cSrcweir virtual void Redo(); 380cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 381cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 382cdf0e10cSrcweir 383cdf0e10cSrcweir virtual String GetComment() const; 384cdf0e10cSrcweir 385cdf0e10cSrcweir private: 386cdf0e10cSrcweir ScMarkData aMarkData; 387cdf0e10cSrcweir SCCOLROW nStart; 388cdf0e10cSrcweir SCCOLROW nEnd; 389cdf0e10cSrcweir SCTAB nStartTab; 390cdf0e10cSrcweir SCTAB nEndTab; 391cdf0e10cSrcweir ScDocument* pUndoDoc; 392cdf0e10cSrcweir ScOutlineTable* pUndoTab; 393cdf0e10cSrcweir SCCOLROW nRangeCnt; 394cdf0e10cSrcweir SCCOLROW* pRanges; 395cdf0e10cSrcweir sal_uInt16 nNewSize; 396cdf0e10cSrcweir sal_Bool bWidth; 397cdf0e10cSrcweir ScSizeMode eMode; 398cdf0e10cSrcweir SdrUndoAction* pDrawUndo; 399cdf0e10cSrcweir }; 400cdf0e10cSrcweir 401cdf0e10cSrcweir 402cdf0e10cSrcweir class ScUndoAutoFill: public ScBlockUndo 403cdf0e10cSrcweir { 404cdf0e10cSrcweir public: 405cdf0e10cSrcweir TYPEINFO(); 406cdf0e10cSrcweir ScUndoAutoFill( ScDocShell* pNewDocShell, 407cdf0e10cSrcweir const ScRange& rRange, const ScRange& rSourceArea, 408cdf0e10cSrcweir ScDocument* pNewUndoDoc, const ScMarkData& rMark, 409cdf0e10cSrcweir FillDir eNewFillDir, 410cdf0e10cSrcweir FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd, 411cdf0e10cSrcweir double fNewStartValue, double fNewStepValue, double fNewMaxValue, 412cdf0e10cSrcweir sal_uInt16 nMaxShIndex ); 413cdf0e10cSrcweir virtual ~ScUndoAutoFill(); 414cdf0e10cSrcweir 415cdf0e10cSrcweir virtual void Undo(); 416cdf0e10cSrcweir virtual void Redo(); 417cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 418cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 419cdf0e10cSrcweir 420cdf0e10cSrcweir virtual String GetComment() const; 421cdf0e10cSrcweir 422cdf0e10cSrcweir private: 423cdf0e10cSrcweir ScRange aSource; 424cdf0e10cSrcweir ScMarkData aMarkData; 425cdf0e10cSrcweir ScDocument* pUndoDoc; 426cdf0e10cSrcweir FillDir eFillDir; 427cdf0e10cSrcweir FillCmd eFillCmd; 428cdf0e10cSrcweir FillDateCmd eFillDateCmd; 429cdf0e10cSrcweir double fStartValue; 430cdf0e10cSrcweir double fStepValue; 431cdf0e10cSrcweir double fMaxValue; 432cdf0e10cSrcweir sal_uLong nStartChangeAction; 433cdf0e10cSrcweir sal_uLong nEndChangeAction; 434cdf0e10cSrcweir sal_uInt16 nMaxSharedIndex; 435cdf0e10cSrcweir 436cdf0e10cSrcweir void SetChangeTrack(); 437cdf0e10cSrcweir }; 438cdf0e10cSrcweir 439cdf0e10cSrcweir 440cdf0e10cSrcweir class ScUndoMerge: public ScSimpleUndo 441cdf0e10cSrcweir { 442cdf0e10cSrcweir public: 443cdf0e10cSrcweir TYPEINFO(); 444cdf0e10cSrcweir ScUndoMerge( ScDocShell* pNewDocShell, 445cdf0e10cSrcweir SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, 446cdf0e10cSrcweir SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, 447cdf0e10cSrcweir bool bMergeContents, ScDocument* pUndoDoc, SdrUndoAction* pDrawUndo ); 448cdf0e10cSrcweir virtual ~ScUndoMerge(); 449cdf0e10cSrcweir 450cdf0e10cSrcweir virtual void Undo(); 451cdf0e10cSrcweir virtual void Redo(); 452cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 453cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 454cdf0e10cSrcweir 455cdf0e10cSrcweir virtual String GetComment() const; 456cdf0e10cSrcweir 457cdf0e10cSrcweir private: 458cdf0e10cSrcweir ScRange maRange; 459cdf0e10cSrcweir bool mbMergeContents; // Merge contents in Redo(). 460cdf0e10cSrcweir ScDocument* mpUndoDoc; // wenn Daten zusammengefasst 461cdf0e10cSrcweir SdrUndoAction* mpDrawUndo; 462cdf0e10cSrcweir 463cdf0e10cSrcweir void DoChange( bool bUndo ) const; 464cdf0e10cSrcweir }; 465cdf0e10cSrcweir 466cdf0e10cSrcweir 467cdf0e10cSrcweir class ScUndoAutoFormat: public ScBlockUndo 468cdf0e10cSrcweir { 469cdf0e10cSrcweir public: 470cdf0e10cSrcweir TYPEINFO(); 471cdf0e10cSrcweir ScUndoAutoFormat( ScDocShell* pNewDocShell, 472cdf0e10cSrcweir const ScRange& rRange, ScDocument* pNewUndoDoc, 473cdf0e10cSrcweir const ScMarkData& rMark, 474cdf0e10cSrcweir sal_Bool bNewSize, sal_uInt16 nNewFormatNo ); 475cdf0e10cSrcweir virtual ~ScUndoAutoFormat(); 476cdf0e10cSrcweir 477cdf0e10cSrcweir virtual void Undo(); 478cdf0e10cSrcweir virtual void Redo(); 479cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 480cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 481cdf0e10cSrcweir 482cdf0e10cSrcweir virtual String GetComment() const; 483cdf0e10cSrcweir 484cdf0e10cSrcweir private: 485cdf0e10cSrcweir ScDocument* pUndoDoc; // geloeschte Daten 486cdf0e10cSrcweir ScMarkData aMarkData; 487cdf0e10cSrcweir sal_Bool bSize; 488cdf0e10cSrcweir sal_uInt16 nFormatNo; 489cdf0e10cSrcweir }; 490cdf0e10cSrcweir 491cdf0e10cSrcweir 492cdf0e10cSrcweir class ScUndoReplace: public ScSimpleUndo 493cdf0e10cSrcweir { 494cdf0e10cSrcweir public: 495cdf0e10cSrcweir TYPEINFO(); 496cdf0e10cSrcweir ScUndoReplace( ScDocShell* pNewDocShell, 497cdf0e10cSrcweir const ScMarkData& rMark, 498cdf0e10cSrcweir SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, 499cdf0e10cSrcweir const String& rNewUndoStr, ScDocument* pNewUndoDoc, 500cdf0e10cSrcweir const SvxSearchItem* pItem ); 501cdf0e10cSrcweir virtual ~ScUndoReplace(); 502cdf0e10cSrcweir 503cdf0e10cSrcweir virtual void Undo(); 504cdf0e10cSrcweir virtual void Redo(); 505cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 506cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 507cdf0e10cSrcweir 508cdf0e10cSrcweir virtual String GetComment() const; 509cdf0e10cSrcweir 510cdf0e10cSrcweir private: 511cdf0e10cSrcweir ScAddress aCursorPos; 512cdf0e10cSrcweir ScMarkData aMarkData; 513cdf0e10cSrcweir String aUndoStr; // Daten bei Einfachmarkierung 514cdf0e10cSrcweir ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten 515cdf0e10cSrcweir SvxSearchItem* pSearchItem; 516cdf0e10cSrcweir sal_uLong nStartChangeAction; 517cdf0e10cSrcweir sal_uLong nEndChangeAction; 518cdf0e10cSrcweir 519cdf0e10cSrcweir void SetChangeTrack(); 520cdf0e10cSrcweir }; 521cdf0e10cSrcweir 522cdf0e10cSrcweir 523cdf0e10cSrcweir class ScUndoTabOp: public ScSimpleUndo 524cdf0e10cSrcweir { 525cdf0e10cSrcweir public: 526cdf0e10cSrcweir TYPEINFO(); 527cdf0e10cSrcweir ScUndoTabOp( ScDocShell* pNewDocShell, 528cdf0e10cSrcweir SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, 529cdf0e10cSrcweir SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, 530cdf0e10cSrcweir ScDocument* pNewUndoDoc, 531cdf0e10cSrcweir const ScRefAddress& rFormulaCell, 532cdf0e10cSrcweir const ScRefAddress& rFormulaEnd, 533cdf0e10cSrcweir const ScRefAddress& rRowCell, 534cdf0e10cSrcweir const ScRefAddress& rColCell, 535cdf0e10cSrcweir sal_uInt8 nMode ); 536cdf0e10cSrcweir virtual ~ScUndoTabOp(); 537cdf0e10cSrcweir 538cdf0e10cSrcweir virtual void Undo(); 539cdf0e10cSrcweir virtual void Redo(); 540cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 541cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 542cdf0e10cSrcweir 543cdf0e10cSrcweir virtual String GetComment() const; 544cdf0e10cSrcweir 545cdf0e10cSrcweir private: 546cdf0e10cSrcweir ScRange aRange; 547cdf0e10cSrcweir ScDocument* pUndoDoc; // geloeschte Daten 548cdf0e10cSrcweir ScRefAddress theFormulaCell; 549cdf0e10cSrcweir ScRefAddress theFormulaEnd; 550cdf0e10cSrcweir ScRefAddress theRowCell; 551cdf0e10cSrcweir ScRefAddress theColCell; 552cdf0e10cSrcweir sal_uInt8 nMode; 553cdf0e10cSrcweir }; 554cdf0e10cSrcweir 555cdf0e10cSrcweir 556cdf0e10cSrcweir class ScUndoConversion : public ScSimpleUndo 557cdf0e10cSrcweir { 558cdf0e10cSrcweir public: 559cdf0e10cSrcweir TYPEINFO(); 560cdf0e10cSrcweir 561cdf0e10cSrcweir ScUndoConversion( 562cdf0e10cSrcweir ScDocShell* pNewDocShell, const ScMarkData& rMark, 563cdf0e10cSrcweir SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScDocument* pNewUndoDoc, 564cdf0e10cSrcweir SCCOL nNewX, SCROW nNewY, SCTAB nNewZ, ScDocument* pNewRedoDoc, 565cdf0e10cSrcweir const ScConversionParam& rConvParam ); 566cdf0e10cSrcweir virtual ~ScUndoConversion(); 567cdf0e10cSrcweir 568cdf0e10cSrcweir virtual void Undo(); 569cdf0e10cSrcweir virtual void Redo(); 570cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 571cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 572cdf0e10cSrcweir 573cdf0e10cSrcweir virtual String GetComment() const; 574cdf0e10cSrcweir 575cdf0e10cSrcweir private: 576cdf0e10cSrcweir ScMarkData aMarkData; 577cdf0e10cSrcweir ScAddress aCursorPos; 578cdf0e10cSrcweir ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten 579cdf0e10cSrcweir ScAddress aNewCursorPos; 580cdf0e10cSrcweir ScDocument* pRedoDoc; // Blockmarkierung und neue Daten 581cdf0e10cSrcweir sal_uLong nStartChangeAction; 582cdf0e10cSrcweir sal_uLong nEndChangeAction; 583cdf0e10cSrcweir ScConversionParam maConvParam; /// Conversion type and parameters. 584cdf0e10cSrcweir 585cdf0e10cSrcweir void DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPos ); 586cdf0e10cSrcweir void SetChangeTrack(); 587cdf0e10cSrcweir }; 588cdf0e10cSrcweir 589cdf0e10cSrcweir class ScUndoRefConversion: public ScSimpleUndo 590cdf0e10cSrcweir { 591cdf0e10cSrcweir public: 592cdf0e10cSrcweir TYPEINFO(); 593cdf0e10cSrcweir ScUndoRefConversion( ScDocShell* pNewDocShell, 594cdf0e10cSrcweir const ScRange& aMarkRange, const ScMarkData& rMark, 595cdf0e10cSrcweir ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, sal_Bool bNewMulti, sal_uInt16 nNewFlag); 596cdf0e10cSrcweir virtual ~ScUndoRefConversion(); 597cdf0e10cSrcweir 598cdf0e10cSrcweir virtual void Undo(); 599cdf0e10cSrcweir virtual void Redo(); 600cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 601cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 602cdf0e10cSrcweir 603cdf0e10cSrcweir virtual String GetComment() const; 604cdf0e10cSrcweir 605cdf0e10cSrcweir private: 606cdf0e10cSrcweir ScMarkData aMarkData; 607cdf0e10cSrcweir ScDocument* pUndoDoc; 608cdf0e10cSrcweir ScDocument* pRedoDoc; 609cdf0e10cSrcweir ScRange aRange; 610cdf0e10cSrcweir sal_Bool bMulti; 611cdf0e10cSrcweir sal_uInt16 nFlags; 612cdf0e10cSrcweir sal_uLong nStartChangeAction; 613cdf0e10cSrcweir sal_uLong nEndChangeAction; 614cdf0e10cSrcweir 615cdf0e10cSrcweir void DoChange( ScDocument* pRefDoc); 616cdf0e10cSrcweir void SetChangeTrack(); 617cdf0e10cSrcweir }; 618cdf0e10cSrcweir 619cdf0e10cSrcweir class ScUndoListNames: public ScBlockUndo 620cdf0e10cSrcweir { 621cdf0e10cSrcweir public: 622cdf0e10cSrcweir TYPEINFO(); 623cdf0e10cSrcweir ScUndoListNames( ScDocShell* pNewDocShell, 624cdf0e10cSrcweir const ScRange& rRange, 625cdf0e10cSrcweir ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc ); 626cdf0e10cSrcweir virtual ~ScUndoListNames(); 627cdf0e10cSrcweir 628cdf0e10cSrcweir virtual void Undo(); 629cdf0e10cSrcweir virtual void Redo(); 630cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 631cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 632cdf0e10cSrcweir 633cdf0e10cSrcweir virtual String GetComment() const; 634cdf0e10cSrcweir 635cdf0e10cSrcweir private: 636cdf0e10cSrcweir ScDocument* pUndoDoc; 637cdf0e10cSrcweir ScDocument* pRedoDoc; 638cdf0e10cSrcweir 639cdf0e10cSrcweir void DoChange( ScDocument* pSrcDoc ) const; 640cdf0e10cSrcweir }; 641cdf0e10cSrcweir 642cdf0e10cSrcweir 643cdf0e10cSrcweir class ScUndoUseScenario: public ScSimpleUndo 644cdf0e10cSrcweir { 645cdf0e10cSrcweir public: 646cdf0e10cSrcweir TYPEINFO(); 647cdf0e10cSrcweir ScUndoUseScenario( ScDocShell* pNewDocShell, 648cdf0e10cSrcweir const ScMarkData& rMark, 649cdf0e10cSrcweir const ScArea& rDestArea, ScDocument* pNewUndoDoc, 650cdf0e10cSrcweir const String& rNewName ); 651cdf0e10cSrcweir virtual ~ScUndoUseScenario(); 652cdf0e10cSrcweir 653cdf0e10cSrcweir virtual void Undo(); 654cdf0e10cSrcweir virtual void Redo(); 655cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 656cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 657cdf0e10cSrcweir 658cdf0e10cSrcweir virtual String GetComment() const; 659cdf0e10cSrcweir 660cdf0e10cSrcweir private: 661cdf0e10cSrcweir ScDocument* pUndoDoc; 662cdf0e10cSrcweir ScRange aRange; 663cdf0e10cSrcweir ScMarkData aMarkData; 664cdf0e10cSrcweir String aName; 665cdf0e10cSrcweir }; 666cdf0e10cSrcweir 667cdf0e10cSrcweir 668cdf0e10cSrcweir class ScUndoSelectionStyle: public ScSimpleUndo 669cdf0e10cSrcweir { 670cdf0e10cSrcweir public: 671cdf0e10cSrcweir TYPEINFO(); 672cdf0e10cSrcweir ScUndoSelectionStyle( ScDocShell* pNewDocShell, 673cdf0e10cSrcweir const ScMarkData& rMark, 674cdf0e10cSrcweir const ScRange& rRange, 675cdf0e10cSrcweir const String& rName, 676cdf0e10cSrcweir ScDocument* pNewUndoDoc ); 677cdf0e10cSrcweir virtual ~ScUndoSelectionStyle(); 678cdf0e10cSrcweir 679cdf0e10cSrcweir virtual void Undo(); 680cdf0e10cSrcweir virtual void Redo(); 681cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 682cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 683cdf0e10cSrcweir 684cdf0e10cSrcweir virtual String GetComment() const; 685cdf0e10cSrcweir virtual sal_uInt16 GetId() const; 686cdf0e10cSrcweir 687cdf0e10cSrcweir private: 688cdf0e10cSrcweir ScMarkData aMarkData; 689cdf0e10cSrcweir ScDocument* pUndoDoc; 690cdf0e10cSrcweir String aStyleName; 691cdf0e10cSrcweir ScRange aRange; 692cdf0e10cSrcweir 693cdf0e10cSrcweir void DoChange( const sal_Bool bUndo ); 694cdf0e10cSrcweir }; 695cdf0e10cSrcweir 696cdf0e10cSrcweir 697cdf0e10cSrcweir class ScUndoRefreshLink: public ScSimpleUndo 698cdf0e10cSrcweir { 699cdf0e10cSrcweir public: 700cdf0e10cSrcweir TYPEINFO(); 701cdf0e10cSrcweir ScUndoRefreshLink( ScDocShell* pNewDocShell, 702cdf0e10cSrcweir ScDocument* pNewUndoDoc ); 703cdf0e10cSrcweir virtual ~ScUndoRefreshLink(); 704cdf0e10cSrcweir 705cdf0e10cSrcweir virtual void Undo(); 706cdf0e10cSrcweir virtual void Redo(); 707cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 708cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 709cdf0e10cSrcweir 710cdf0e10cSrcweir virtual String GetComment() const; 711cdf0e10cSrcweir 712cdf0e10cSrcweir private: 713cdf0e10cSrcweir ScDocument* pUndoDoc; 714cdf0e10cSrcweir ScDocument* pRedoDoc; 715cdf0e10cSrcweir }; 716cdf0e10cSrcweir 717cdf0e10cSrcweir 718cdf0e10cSrcweir class ScUndoEnterMatrix: public ScBlockUndo 719cdf0e10cSrcweir { 720cdf0e10cSrcweir public: 721cdf0e10cSrcweir TYPEINFO(); 722cdf0e10cSrcweir ScUndoEnterMatrix( ScDocShell* pNewDocShell, 723cdf0e10cSrcweir const ScRange& rArea, 724cdf0e10cSrcweir ScDocument* pNewUndoDoc, 725cdf0e10cSrcweir const String& rForm ); 726cdf0e10cSrcweir virtual ~ScUndoEnterMatrix(); 727cdf0e10cSrcweir 728cdf0e10cSrcweir virtual void Undo(); 729cdf0e10cSrcweir virtual void Redo(); 730cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 731cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 732cdf0e10cSrcweir 733cdf0e10cSrcweir virtual String GetComment() const; 734cdf0e10cSrcweir 735cdf0e10cSrcweir private: 736cdf0e10cSrcweir ScDocument* pUndoDoc; 737cdf0e10cSrcweir String aFormula; 738cdf0e10cSrcweir formula::FormulaGrammar::AddressConvention eConv; 739cdf0e10cSrcweir sal_uLong nStartChangeAction; 740cdf0e10cSrcweir sal_uLong nEndChangeAction; 741cdf0e10cSrcweir 742cdf0e10cSrcweir void SetChangeTrack(); 743cdf0e10cSrcweir }; 744cdf0e10cSrcweir 745cdf0e10cSrcweir 746cdf0e10cSrcweir class ScUndoInsertAreaLink : public ScSimpleUndo 747cdf0e10cSrcweir { 748cdf0e10cSrcweir public: 749cdf0e10cSrcweir TYPEINFO(); 750cdf0e10cSrcweir ScUndoInsertAreaLink( ScDocShell* pShell, 751cdf0e10cSrcweir const String& rDoc, 752cdf0e10cSrcweir const String& rFlt, const String& rOpt, 753cdf0e10cSrcweir const String& rArea, const ScRange& rDestRange, 754cdf0e10cSrcweir sal_uLong nRefreshDelay ); 755cdf0e10cSrcweir virtual ~ScUndoInsertAreaLink(); 756cdf0e10cSrcweir 757cdf0e10cSrcweir virtual void Undo(); 758cdf0e10cSrcweir virtual void Redo(); 759cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 760cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 761cdf0e10cSrcweir 762cdf0e10cSrcweir virtual String GetComment() const; 763cdf0e10cSrcweir 764cdf0e10cSrcweir private: 765cdf0e10cSrcweir String aDocName; 766cdf0e10cSrcweir String aFltName; 767cdf0e10cSrcweir String aOptions; 768cdf0e10cSrcweir String aAreaName; 769cdf0e10cSrcweir ScRange aRange; 770cdf0e10cSrcweir sal_uLong nRefreshDelay; 771cdf0e10cSrcweir }; 772cdf0e10cSrcweir 773cdf0e10cSrcweir 774cdf0e10cSrcweir class ScUndoRemoveAreaLink : public ScSimpleUndo 775cdf0e10cSrcweir { 776cdf0e10cSrcweir public: 777cdf0e10cSrcweir TYPEINFO(); 778cdf0e10cSrcweir ScUndoRemoveAreaLink( ScDocShell* pShell, 779cdf0e10cSrcweir const String& rDoc, 780cdf0e10cSrcweir const String& rFlt, const String& rOpt, 781cdf0e10cSrcweir const String& rArea, const ScRange& rDestRange, 782cdf0e10cSrcweir sal_uLong nRefreshDelay ); 783cdf0e10cSrcweir virtual ~ScUndoRemoveAreaLink(); 784cdf0e10cSrcweir 785cdf0e10cSrcweir virtual void Undo(); 786cdf0e10cSrcweir virtual void Redo(); 787cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 788cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 789cdf0e10cSrcweir 790cdf0e10cSrcweir virtual String GetComment() const; 791cdf0e10cSrcweir 792cdf0e10cSrcweir private: 793cdf0e10cSrcweir String aDocName; 794cdf0e10cSrcweir String aFltName; 795cdf0e10cSrcweir String aOptions; 796cdf0e10cSrcweir String aAreaName; 797cdf0e10cSrcweir ScRange aRange; 798cdf0e10cSrcweir sal_uLong nRefreshDelay; 799cdf0e10cSrcweir }; 800cdf0e10cSrcweir 801cdf0e10cSrcweir 802cdf0e10cSrcweir class ScUndoUpdateAreaLink : public ScSimpleUndo //! auch BlockUndo umstellen? 803cdf0e10cSrcweir { 804cdf0e10cSrcweir public: 805cdf0e10cSrcweir TYPEINFO(); 806cdf0e10cSrcweir ScUndoUpdateAreaLink( ScDocShell* pShell, 807cdf0e10cSrcweir const String& rOldD, 808cdf0e10cSrcweir const String& rOldF, const String& rOldO, 809cdf0e10cSrcweir const String& rOldA, const ScRange& rOldR, 810cdf0e10cSrcweir sal_uLong nOldRD, 811cdf0e10cSrcweir const String& rNewD, 812cdf0e10cSrcweir const String& rNewF, const String& rNewO, 813cdf0e10cSrcweir const String& rNewA, const ScRange& rNewR, 814cdf0e10cSrcweir sal_uLong nNewRD, 815cdf0e10cSrcweir ScDocument* pUndo, ScDocument* pRedo, 816cdf0e10cSrcweir sal_Bool bDoInsert ); 817cdf0e10cSrcweir virtual ~ScUndoUpdateAreaLink(); 818cdf0e10cSrcweir 819cdf0e10cSrcweir virtual void Undo(); 820cdf0e10cSrcweir virtual void Redo(); 821cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 822cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 823cdf0e10cSrcweir 824cdf0e10cSrcweir virtual String GetComment() const; 825cdf0e10cSrcweir 826cdf0e10cSrcweir private: 827cdf0e10cSrcweir String aOldDoc; 828cdf0e10cSrcweir String aOldFlt; 829cdf0e10cSrcweir String aOldOpt; 830cdf0e10cSrcweir String aOldArea; 831cdf0e10cSrcweir ScRange aOldRange; 832cdf0e10cSrcweir String aNewDoc; 833cdf0e10cSrcweir String aNewFlt; 834cdf0e10cSrcweir String aNewOpt; 835cdf0e10cSrcweir String aNewArea; 836cdf0e10cSrcweir ScRange aNewRange; 837cdf0e10cSrcweir ScDocument* pUndoDoc; 838cdf0e10cSrcweir ScDocument* pRedoDoc; 839cdf0e10cSrcweir sal_uLong nOldRefresh; 840cdf0e10cSrcweir sal_uLong nNewRefresh; 841cdf0e10cSrcweir sal_Bool bWithInsert; 842cdf0e10cSrcweir 843cdf0e10cSrcweir void DoChange( const sal_Bool bUndo ) const; 844cdf0e10cSrcweir }; 845cdf0e10cSrcweir 846cdf0e10cSrcweir 847cdf0e10cSrcweir class ScUndoIndent: public ScBlockUndo 848cdf0e10cSrcweir { 849cdf0e10cSrcweir public: 850cdf0e10cSrcweir TYPEINFO(); 851cdf0e10cSrcweir ScUndoIndent( ScDocShell* pNewDocShell, const ScMarkData& rMark, 852cdf0e10cSrcweir ScDocument* pNewUndoDoc, sal_Bool bIncrement ); 853cdf0e10cSrcweir virtual ~ScUndoIndent(); 854cdf0e10cSrcweir 855cdf0e10cSrcweir virtual void Undo(); 856cdf0e10cSrcweir virtual void Redo(); 857cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 858cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 859cdf0e10cSrcweir 860cdf0e10cSrcweir virtual String GetComment() const; 861cdf0e10cSrcweir 862cdf0e10cSrcweir private: 863cdf0e10cSrcweir ScMarkData aMarkData; 864cdf0e10cSrcweir ScDocument* pUndoDoc; 865cdf0e10cSrcweir sal_Bool bIsIncrement; 866cdf0e10cSrcweir }; 867cdf0e10cSrcweir 868cdf0e10cSrcweir 869cdf0e10cSrcweir class ScUndoTransliterate: public ScBlockUndo 870cdf0e10cSrcweir { 871cdf0e10cSrcweir public: 872cdf0e10cSrcweir TYPEINFO(); 873cdf0e10cSrcweir ScUndoTransliterate( ScDocShell* pNewDocShell, const ScMarkData& rMark, 874cdf0e10cSrcweir ScDocument* pNewUndoDoc, sal_Int32 nType ); 875cdf0e10cSrcweir virtual ~ScUndoTransliterate(); 876cdf0e10cSrcweir 877cdf0e10cSrcweir virtual void Undo(); 878cdf0e10cSrcweir virtual void Redo(); 879cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 880cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 881cdf0e10cSrcweir 882cdf0e10cSrcweir virtual String GetComment() const; 883cdf0e10cSrcweir 884cdf0e10cSrcweir private: 885cdf0e10cSrcweir ScMarkData aMarkData; 886cdf0e10cSrcweir ScDocument* pUndoDoc; 887cdf0e10cSrcweir sal_Int32 nTransliterationType; 888cdf0e10cSrcweir }; 889cdf0e10cSrcweir 890cdf0e10cSrcweir 891cdf0e10cSrcweir class ScUndoClearItems: public ScBlockUndo 892cdf0e10cSrcweir { 893cdf0e10cSrcweir public: 894cdf0e10cSrcweir TYPEINFO(); 895cdf0e10cSrcweir ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData& rMark, 896cdf0e10cSrcweir ScDocument* pNewUndoDoc, const sal_uInt16* pW ); 897cdf0e10cSrcweir virtual ~ScUndoClearItems(); 898cdf0e10cSrcweir 899cdf0e10cSrcweir virtual void Undo(); 900cdf0e10cSrcweir virtual void Redo(); 901cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 902cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 903cdf0e10cSrcweir 904cdf0e10cSrcweir virtual String GetComment() const; 905cdf0e10cSrcweir 906cdf0e10cSrcweir private: 907cdf0e10cSrcweir ScMarkData aMarkData; 908cdf0e10cSrcweir ScDocument* pUndoDoc; 909cdf0e10cSrcweir sal_uInt16* pWhich; 910cdf0e10cSrcweir }; 911cdf0e10cSrcweir 912cdf0e10cSrcweir 913cdf0e10cSrcweir class ScUndoRemoveBreaks: public ScSimpleUndo 914cdf0e10cSrcweir { 915cdf0e10cSrcweir public: 916cdf0e10cSrcweir TYPEINFO(); 917cdf0e10cSrcweir ScUndoRemoveBreaks( ScDocShell* pNewDocShell, 918cdf0e10cSrcweir SCTAB nNewTab, ScDocument* pNewUndoDoc ); 919cdf0e10cSrcweir virtual ~ScUndoRemoveBreaks(); 920cdf0e10cSrcweir 921cdf0e10cSrcweir virtual void Undo(); 922cdf0e10cSrcweir virtual void Redo(); 923cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 924cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 925cdf0e10cSrcweir 926cdf0e10cSrcweir virtual String GetComment() const; 927cdf0e10cSrcweir 928cdf0e10cSrcweir private: 929cdf0e10cSrcweir SCTAB nTab; 930cdf0e10cSrcweir ScDocument* pUndoDoc; 931cdf0e10cSrcweir }; 932cdf0e10cSrcweir 933cdf0e10cSrcweir 934cdf0e10cSrcweir class ScUndoRemoveMerge: public ScBlockUndo 935cdf0e10cSrcweir { 936cdf0e10cSrcweir public: 937cdf0e10cSrcweir TYPEINFO(); 938cdf0e10cSrcweir ScUndoRemoveMerge( ScDocShell* pNewDocShell, 939cdf0e10cSrcweir const ScRange& rArea, 940cdf0e10cSrcweir ScDocument* pNewUndoDoc ); 941cdf0e10cSrcweir virtual ~ScUndoRemoveMerge(); 942cdf0e10cSrcweir 943cdf0e10cSrcweir virtual void Undo(); 944cdf0e10cSrcweir virtual void Redo(); 945cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 946cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 947cdf0e10cSrcweir 948cdf0e10cSrcweir virtual String GetComment() const; 949cdf0e10cSrcweir 950cdf0e10cSrcweir private: 951cdf0e10cSrcweir ScDocument* pUndoDoc; 952cdf0e10cSrcweir }; 953cdf0e10cSrcweir 954cdf0e10cSrcweir 955cdf0e10cSrcweir class ScUndoBorder: public ScBlockUndo 956cdf0e10cSrcweir { 957cdf0e10cSrcweir public: 958cdf0e10cSrcweir TYPEINFO(); 959cdf0e10cSrcweir ScUndoBorder( ScDocShell* pNewDocShell, 960cdf0e10cSrcweir const ScRangeList& rRangeList, 961cdf0e10cSrcweir ScDocument* pNewUndoDoc, 962cdf0e10cSrcweir const SvxBoxItem& rNewOuter, 963cdf0e10cSrcweir const SvxBoxInfoItem& rNewInner ); 964cdf0e10cSrcweir virtual ~ScUndoBorder(); 965cdf0e10cSrcweir 966cdf0e10cSrcweir virtual void Undo(); 967cdf0e10cSrcweir virtual void Redo(); 968cdf0e10cSrcweir virtual void Repeat(SfxRepeatTarget& rTarget); 969cdf0e10cSrcweir virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; 970cdf0e10cSrcweir 971cdf0e10cSrcweir virtual String GetComment() const; 972cdf0e10cSrcweir 973cdf0e10cSrcweir private: 974cdf0e10cSrcweir ScDocument* pUndoDoc; 975cdf0e10cSrcweir ScRangeList* pRanges; 976cdf0e10cSrcweir SvxBoxItem* pOuter; 977cdf0e10cSrcweir SvxBoxInfoItem* pInner; 978cdf0e10cSrcweir }; 979cdf0e10cSrcweir 980cdf0e10cSrcweir 981cdf0e10cSrcweir 982cdf0e10cSrcweir 983cdf0e10cSrcweir #endif 984cdf0e10cSrcweir 985