LibreOffice Module sc (master)  1
undotab.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #include <sfx2/app.hxx>
21 #include <sfx2/bindings.hxx>
22 #include <sfx2/dispatch.hxx>
23 #include <svl/hint.hxx>
24 
25 #include <undotab.hxx>
26 #include <document.hxx>
27 #include <docsh.hxx>
28 #include <tabvwsh.hxx>
29 #include <globstr.hrc>
30 #include <global.hxx>
31 #include <sc.hrc>
32 #include <strings.hrc>
33 #include <undoolk.hxx>
34 #include <target.hxx>
35 #include <uiitems.hxx>
36 #include <prnsave.hxx>
37 #include <printfun.hxx>
38 #include <chgtrack.hxx>
39 #include <tabprotection.hxx>
40 #include <viewdata.hxx>
41 #include <progress.hxx>
42 #include <markdata.hxx>
43 #include <refundo.hxx>
44 
45 // for ScUndoRenameObject - might me moved to another file later
46 #include <svx/svditer.hxx>
47 #include <svx/svdoole2.hxx>
48 #include <drwlayer.hxx>
49 #include <scresid.hxx>
50 #include <sheetevents.hxx>
51 
52 #include <memory>
53 #include <utility>
54 #include <vector>
55 
56 using namespace com::sun::star;
57 using ::std::unique_ptr;
58 using ::std::vector;
59 
60 
62  SCTAB nTabNum,
63  bool bApp,
64  const OUString& rNewName) :
65  ScSimpleUndo( pNewDocShell ),
66  sNewName( rNewName ),
67  nTab( nTabNum ),
68  bAppend( bApp )
69 {
72 }
73 
75 {
76  pDrawUndo.reset();
77 }
78 
80 {
81  if (bAppend)
82  return ScResId( STR_UNDO_APPEND_TAB );
83  else
84  return ScResId( STR_UNDO_INSERT_TAB );
85 }
86 
88 {
89  ScDocument& rDoc = pDocShell->GetDocument();
90  ScChangeTrack* pChangeTrack = rDoc.GetChangeTrack();
91  if ( pChangeTrack )
92  {
93  ScRange aRange( 0, 0, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab );
94  pChangeTrack->AppendInsert( aRange );
95  nEndChangeAction = pChangeTrack->GetActionMax();
96  }
97  else
98  nEndChangeAction = 0;
99 }
100 
102 {
104  pViewShell->SetTabNo(nTab);
105 
106  pDocShell->SetInUndo( true );
107  bDrawIsInUndo = true;
108  pViewShell->DeleteTable( nTab, false );
109  bDrawIsInUndo = false;
110  pDocShell->SetInUndo( false );
111 
113 
114  ScChangeTrack* pChangeTrack = pDocShell->GetDocument().GetChangeTrack();
115  if ( pChangeTrack )
116  pChangeTrack->Undo( nEndChangeAction, nEndChangeAction );
117 
118  // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
119  pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) );
120 }
121 
123 {
125 
126  RedoSdrUndoAction( pDrawUndo.get() ); // Draw Redo first
127 
128  pDocShell->SetInUndo( true );
129  bDrawIsInUndo = true;
130  if (bAppend)
131  pViewShell->AppendTable( sNewName, false );
132  else
133  {
134  pViewShell->SetTabNo(nTab);
135  pViewShell->InsertTable( sNewName, nTab, false );
136  }
137  bDrawIsInUndo = false;
138  pDocShell->SetInUndo( false );
139 
140  SetChangeTrack();
141 }
142 
144 {
145  if (auto pViewTarget = dynamic_cast<ScTabViewTarget*>( &rTarget))
146  pViewTarget->GetViewShell()->GetViewData().GetDispatcher().
147  Execute(FID_INS_TABLE, SfxCallMode::SLOT | SfxCallMode::RECORD);
148 }
149 
151 {
152  return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr;
153 }
154 
156  SCTAB nTabNum,
157  const std::vector<OUString>& newNameList) :
158  ScSimpleUndo( pNewDocShell ),
159  aNameList( newNameList ),
160  nTab( nTabNum )
161 {
163 
164  SetChangeTrack();
165 }
166 
168 {
169  pDrawUndo.reset();
170 }
171 
173 {
174  return ScResId( STR_UNDO_INSERT_TAB );
175 }
176 
178 {
179  ScDocument& rDoc = pDocShell->GetDocument();
180  ScChangeTrack* pChangeTrack = rDoc.GetChangeTrack();
181  if ( pChangeTrack )
182  {
183  nStartChangeAction = pChangeTrack->GetActionMax() + 1;
184  nEndChangeAction = 0;
185  ScRange aRange( 0, 0, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab );
186  for( size_t i = 0; i < aNameList.size(); i++ )
187  {
188  aRange.aStart.SetTab( sal::static_int_cast<SCTAB>( nTab + i ) );
189  aRange.aEnd.SetTab( sal::static_int_cast<SCTAB>( nTab + i ) );
190  pChangeTrack->AppendInsert( aRange );
191  nEndChangeAction = pChangeTrack->GetActionMax();
192  }
193  }
194  else
196 }
197 
199 {
201  pViewShell->SetTabNo(nTab);
202 
203  pDocShell->SetInUndo( true );
204  bDrawIsInUndo = true;
205 
206  pViewShell->DeleteTables( nTab, static_cast<SCTAB>(aNameList.size()) );
207 
208  bDrawIsInUndo = false;
209  pDocShell->SetInUndo( false );
210 
212 
213  ScChangeTrack* pChangeTrack = pDocShell->GetDocument().GetChangeTrack();
214  if ( pChangeTrack )
215  pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
216 
217  // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
218  pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) );
219 }
220 
222 {
224 
225  RedoSdrUndoAction( pDrawUndo.get() ); // Draw Redo first
226 
227  pDocShell->SetInUndo( true );
228  bDrawIsInUndo = true;
229  pViewShell->InsertTables( aNameList, nTab, static_cast<SCTAB>(aNameList.size()),false );
230 
231  bDrawIsInUndo = false;
232  pDocShell->SetInUndo( false );
233 
234  SetChangeTrack();
235 }
236 
238 {
239  if (auto pViewTarget = dynamic_cast<ScTabViewTarget*>( &rTarget))
240  pViewTarget->GetViewShell()->GetViewData().GetDispatcher().
241  Execute(FID_INS_TABLE, SfxCallMode::SLOT | SfxCallMode::RECORD);
242 }
243 
245 {
246  return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr;
247 }
248 
249 ScUndoDeleteTab::ScUndoDeleteTab( ScDocShell* pNewDocShell, const vector<SCTAB> &aTab,
250  ScDocumentUniquePtr pUndoDocument, std::unique_ptr<ScRefUndoData> pRefData ) :
251  ScMoveUndo( pNewDocShell, std::move(pUndoDocument), std::move(pRefData) )
252 {
253  theTabs.insert(theTabs.end(), aTab.begin(), aTab.end() );
254  SetChangeTrack();
255 }
256 
258 {
259  theTabs.clear();
260 }
261 
263 {
264  return ScResId( STR_UNDO_DELETE_TAB );
265 }
266 
268 {
269  ScDocument& rDoc = pDocShell->GetDocument();
270  ScChangeTrack* pChangeTrack = rDoc.GetChangeTrack();
271  if ( pChangeTrack )
272  {
273  sal_uLong nTmpChangeAction;
274  nStartChangeAction = pChangeTrack->GetActionMax() + 1;
275  nEndChangeAction = 0;
276  ScRange aRange( 0, 0, 0, rDoc.MaxCol(), rDoc.MaxRow(), 0 );
277  for ( size_t i = 0; i < theTabs.size(); ++i )
278  {
279  aRange.aStart.SetTab( theTabs[i] );
280  aRange.aEnd.SetTab( theTabs[i] );
281  pChangeTrack->AppendDeleteRange( aRange, pRefUndoDoc.get(),
282  nTmpChangeAction, nEndChangeAction, static_cast<short>(i) );
283  }
284  }
285  else
287 }
288 
289 static SCTAB lcl_GetVisibleTabBefore( const ScDocument& rDoc, SCTAB nTab )
290 {
291  while ( nTab > 0 && !rDoc.IsVisible( nTab ) )
292  --nTab;
293 
294  return nTab;
295 }
296 
298 {
299  BeginUndo();
300  ScDocument& rDoc = pDocShell->GetDocument();
301 
302  bool bLink = false;
303  OUString aName;
304 
305  for(SCTAB nTab: theTabs)
306  {
307  pRefUndoDoc->GetName( nTab, aName );
308 
309  bDrawIsInUndo = true;
310  bool bOk = rDoc.InsertTab(nTab, aName, false, true);
311  bDrawIsInUndo = false;
312  if (bOk)
313  {
314  pRefUndoDoc->CopyToDocument(0,0,nTab, rDoc.MaxCol(),rDoc.MaxRow(),nTab, InsertDeleteFlags::ALL,false, rDoc);
315 
316  OUString aOldName;
317  pRefUndoDoc->GetName( nTab, aOldName );
318  rDoc.RenameTab( nTab, aOldName );
319  if (pRefUndoDoc->IsLinked(nTab))
320  {
321  rDoc.SetLink( nTab, pRefUndoDoc->GetLinkMode(nTab), pRefUndoDoc->GetLinkDoc(nTab),
322  pRefUndoDoc->GetLinkFlt(nTab), pRefUndoDoc->GetLinkOpt(nTab),
323  pRefUndoDoc->GetLinkTab(nTab), pRefUndoDoc->GetLinkRefreshDelay(nTab) );
324  bLink = true;
325  }
326 
327  if ( pRefUndoDoc->IsScenario(nTab) )
328  {
329  rDoc.SetScenario( nTab, true );
330  OUString aComment;
331  Color aColor;
332  ScScenarioFlags nScenFlags;
333  pRefUndoDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
334  rDoc.SetScenarioData( nTab, aComment, aColor, nScenFlags );
335  bool bActive = pRefUndoDoc->IsActiveScenario( nTab );
336  rDoc.SetActiveScenario( nTab, bActive );
337  }
338  rDoc.SetVisible( nTab, pRefUndoDoc->IsVisible( nTab ) );
339  rDoc.SetTabBgColor( nTab, pRefUndoDoc->GetTabBgColor(nTab) );
340  auto pSheetEvents = pRefUndoDoc->GetSheetEvents( nTab );
341  rDoc.SetSheetEvents( nTab, std::unique_ptr<ScSheetEvents>(pSheetEvents ? new ScSheetEvents(*pSheetEvents) : nullptr) );
342  rDoc.SetLayoutRTL( nTab, pRefUndoDoc->IsLayoutRTL( nTab ) );
343 
344  if ( pRefUndoDoc->IsTabProtected( nTab ) )
345  rDoc.SetTabProtection(nTab, pRefUndoDoc->GetTabProtection(nTab));
346  }
347  }
348  if (bLink)
349  {
350  pDocShell->UpdateLinks(); // update Link Manager
351  }
352 
353  EndUndo(); // Draw-Undo has to be called before Broadcast!
354 
355  ScChangeTrack* pChangeTrack = pDocShell->GetDocument().GetChangeTrack();
356  if ( pChangeTrack )
357  pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
358 
359  for(SCTAB nTab: theTabs)
360  {
361  pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab) );
362  }
363  SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
364  pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
365  pSfxApp->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
366  pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) );
367 
368  pDocShell->PostPaint(0,0,0, rDoc.MaxCol(),rDoc.MaxRow(),MAXTAB, PaintPartFlags::All ); // incl. extras
369 
370  // not ShowTable due to SetTabNo(..., sal_True):
372  if (pViewShell)
373  pViewShell->SetTabNo( lcl_GetVisibleTabBefore( rDoc, theTabs[0] ), true );
374 }
375 
377 {
379  pViewShell->SetTabNo( lcl_GetVisibleTabBefore( pDocShell->GetDocument(), theTabs.front() ) );
380 
381  RedoSdrUndoAction( pDrawUndo.get() ); // Draw Redo first
382 
383  pDocShell->SetInUndo( true );
384  bDrawIsInUndo = true;
385  pViewShell->DeleteTables( theTabs, false );
386  bDrawIsInUndo = false;
387  pDocShell->SetInUndo( true );
388 
389  SetChangeTrack();
390 
391  // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
392  pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) );
393 }
394 
396 {
397  if (auto pViewTarget = dynamic_cast<ScTabViewTarget*>( &rTarget))
398  {
399  ScTabViewShell* pViewShell = pViewTarget->GetViewShell();
400  pViewShell->DeleteTable( pViewShell->GetViewData().GetTabNo() );
401  }
402 }
403 
405 {
406  return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr;
407 }
408 
410  SCTAB nT,
411  const OUString& rOldName,
412  const OUString& rNewName) :
413  ScSimpleUndo( pNewDocShell ),
414  nTab ( nT )
415 {
416  sOldName = rOldName;
417  sNewName = rNewName;
418 }
419 
421 {
422 }
423 
425 {
426  return ScResId( STR_UNDO_RENAME_TAB );
427 }
428 
429 void ScUndoRenameTab::DoChange( SCTAB nTabP, const OUString& rName ) const
430 {
431  ScDocument& rDoc = pDocShell->GetDocument();
432  rDoc.RenameTab( nTabP, rName );
433 
434  SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator
435 
439 
440  // The sheet name might be used in a formula ...
442  if (pViewShell)
443  pViewShell->UpdateInputHandler();
444 }
445 
447 {
449 }
450 
452 {
454 }
455 
457 {
458  // makes no sense
459 }
460 
461 bool ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
462 {
463  return false;
464 }
465 
467  ScDocShell* pNewDocShell, std::unique_ptr<vector<SCTAB>> pOldTabs, std::unique_ptr<vector<SCTAB>> pNewTabs,
468  std::unique_ptr<vector<OUString>> pOldNames, std::unique_ptr<vector<OUString>> pNewNames) :
469  ScSimpleUndo( pNewDocShell ),
470  mpOldTabs(std::move(pOldTabs)), mpNewTabs(std::move(pNewTabs)),
471  mpOldNames(std::move(pOldNames)), mpNewNames(std::move(pNewNames))
472 {
473  // The sizes differ. Something is wrong.
474  assert(!mpOldNames || mpOldTabs->size() == mpOldNames->size());
475  // The sizes differ. Something is wrong.
476  assert(!mpNewNames || mpNewTabs->size() == mpNewNames->size());
477 }
478 
480 {
481 }
482 
484 {
485  return ScResId( STR_UNDO_MOVE_TAB );
486 }
487 
488 void ScUndoMoveTab::DoChange( bool bUndo ) const
489 {
490  ScDocument& rDoc = pDocShell->GetDocument();
492 
493  if (bUndo) // UnDo
494  {
495  size_t i = mpNewTabs->size();
496  std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScResId(STR_UNDO_MOVE_TAB),
497  i * rDoc.GetCodeCount(), true));
498  for (; i > 0; --i)
499  {
500  SCTAB nDestTab = (*mpNewTabs)[i-1];
501  SCTAB nOldTab = (*mpOldTabs)[i-1];
502  if (nDestTab > MAXTAB) // appended ?
503  nDestTab = rDoc.GetTableCount() - 1;
504 
505  rDoc.MoveTab( nDestTab, nOldTab, pProgress.get() );
506  pViewShell->GetViewData().MoveTab( nDestTab, nOldTab );
507  pViewShell->SetTabNo( nOldTab, true );
508  if (mpOldNames)
509  {
510  const OUString& rOldName = (*mpOldNames)[i-1];
511  rDoc.RenameTab(nOldTab, rOldName);
512  }
513  }
514  }
515  else
516  {
517  size_t n = mpNewTabs->size();
518  std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScResId(STR_UNDO_MOVE_TAB),
519  n * rDoc.GetCodeCount(), true));
520  for (size_t i = 0; i < n; ++i)
521  {
522  SCTAB nDestTab = (*mpNewTabs)[i];
523  SCTAB nNewTab = nDestTab;
524  SCTAB nOldTab = (*mpOldTabs)[i];
525  if (nDestTab > MAXTAB) // appended ?
526  nDestTab = rDoc.GetTableCount() - 1;
527 
528  rDoc.MoveTab( nOldTab, nNewTab, pProgress.get() );
529  pViewShell->GetViewData().MoveTab( nOldTab, nNewTab );
530  pViewShell->SetTabNo( nDestTab, true );
531  if (mpNewNames)
532  {
533  const OUString& rNewName = (*mpNewNames)[i];
534  rDoc.RenameTab(nNewTab, rNewName);
535  }
536  }
537  }
538 
539  SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator
540 
544 }
545 
547 {
548  DoChange( true );
549 }
550 
552 {
553  DoChange( false );
554 }
555 
557 {
558  // No Repeat ! ? !
559 }
560 
561 bool ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
562 {
563  return false;
564 }
565 
567  ScDocShell* pNewDocShell,
568  std::unique_ptr<vector<SCTAB>> pOldTabs, std::unique_ptr<vector<SCTAB>> pNewTabs,
569  std::unique_ptr<vector<OUString>> pNewNames) :
570  ScSimpleUndo( pNewDocShell ),
571  mpOldTabs(std::move(pOldTabs)),
572  mpNewTabs(std::move(pNewTabs)),
573  mpNewNames(std::move(pNewNames))
574 {
576 
577  // The sizes differ. Something is wrong.
578  assert(!mpNewNames || mpNewTabs->size() == mpNewNames->size());
579 }
580 
582 {
583  pDrawUndo.reset();
584 }
585 
587 {
588  return ScResId( STR_UNDO_COPY_TAB );
589 }
590 
592 {
594 
595  if (pViewShell)
596  pViewShell->SetTabNo((*mpOldTabs)[0],true);
597 
598  SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator
599 
603 }
604 
606 {
607  ScDocument& rDoc = pDocShell->GetDocument();
608 
609  DoSdrUndoAction( pDrawUndo.get(), &rDoc ); // before the sheets are deleted
610 
611  vector<SCTAB>::const_reverse_iterator itr, itrEnd = mpNewTabs->rend();
612  for (itr = mpNewTabs->rbegin(); itr != itrEnd; ++itr)
613  {
614  SCTAB nDestTab = *itr;
615  if (nDestTab > MAXTAB) // append?
616  nDestTab = rDoc.GetTableCount() - 1;
617 
618  bDrawIsInUndo = true;
619  rDoc.DeleteTab(nDestTab);
620  bDrawIsInUndo = false;
621  }
622 
623  // ScTablesHint broadcasts after all sheets have been deleted,
624  // so sheets and draw pages are in sync!
625 
626  for (itr = mpNewTabs->rbegin(); itr != itrEnd; ++itr)
627  {
628  SCTAB nDestTab = *itr;
629  if (nDestTab > MAXTAB) // append?
630  nDestTab = rDoc.GetTableCount() - 1;
631 
632  pDocShell->Broadcast( ScTablesHint( SC_TAB_DELETED, nDestTab ) );
633  }
634 
635  DoChange();
636 }
637 
639 {
640  ScDocument& rDoc = pDocShell->GetDocument();
642 
643  SCTAB nDestTab = 0;
644  for (size_t i = 0, n = mpNewTabs->size(); i < n; ++i)
645  {
646  nDestTab = (*mpNewTabs)[i];
647  SCTAB nNewTab = nDestTab;
648  SCTAB nOldTab = (*mpOldTabs)[i];
649  if (nDestTab > MAXTAB) // appended ?
650  nDestTab = rDoc.GetTableCount() - 1;
651 
652  bDrawIsInUndo = true;
653  rDoc.CopyTab( nOldTab, nNewTab );
654  bDrawIsInUndo = false;
655 
656  pViewShell->GetViewData().MoveTab( nOldTab, nNewTab );
657 
658  SCTAB nAdjSource = nOldTab;
659  if ( nNewTab <= nOldTab )
660  ++nAdjSource; // new position of source table after CopyTab
661 
662  if ( rDoc.IsScenario(nAdjSource) )
663  {
664  rDoc.SetScenario(nNewTab, true );
665  OUString aComment;
666  Color aColor;
667  ScScenarioFlags nScenFlags;
668  rDoc.GetScenarioData(nAdjSource, aComment, aColor, nScenFlags );
669  rDoc.SetScenarioData(nNewTab, aComment, aColor, nScenFlags );
670  bool bActive = rDoc.IsActiveScenario(nAdjSource);
671  rDoc.SetActiveScenario(nNewTab, bActive );
672  bool bVisible = rDoc.IsVisible(nAdjSource);
673  rDoc.SetVisible(nNewTab,bVisible );
674  }
675 
676  if ( rDoc.IsTabProtected( nAdjSource ) )
677  rDoc.CopyTabProtection(nAdjSource, nNewTab);
678 
679  if (mpNewNames)
680  {
681  const OUString& rName = (*mpNewNames)[i];
682  rDoc.RenameTab(nNewTab, rName);
683  }
684  }
685 
686  RedoSdrUndoAction( pDrawUndo.get() ); // after the sheets are inserted
687 
688  pViewShell->SetTabNo( nDestTab, true ); // after draw-undo
689 
690  DoChange();
691 
692 }
693 
695 {
696  // no Repeat ! ? !
697 }
698 
699 bool ScUndoCopyTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
700 {
701  return false;
702 }
703 
705  ScDocShell* pNewDocShell, SCTAB nT, const Color& aOTabBgColor, const Color& aNTabBgColor) :
706  ScSimpleUndo( pNewDocShell )
707 {
708  ScUndoTabColorInfo aInfo(nT);
709  aInfo.maOldTabBgColor = aOTabBgColor;
710  aInfo.maNewTabBgColor = aNTabBgColor;
711  aTabColorList.push_back(aInfo);
712 }
713 
715  ScDocShell* pNewDocShell,
716  const ScUndoTabColorInfo::List& rUndoTabColorList) :
717  ScSimpleUndo(pNewDocShell),
718  aTabColorList(rUndoTabColorList)
719 {
720 }
721 
723 {
724 }
725 
727 {
728  if (aTabColorList.size() > 1)
729  return ScResId(STR_UNDO_SET_MULTI_TAB_BG_COLOR);
730  return ScResId(STR_UNDO_SET_TAB_BG_COLOR);
731 }
732 
733 void ScUndoTabColor::DoChange(bool bUndoType) const
734 {
735  ScDocument& rDoc = pDocShell->GetDocument();
736 
737  size_t nTabColorCount = aTabColorList.size();
738  for (size_t i = 0; i < nTabColorCount; ++i)
739  {
740  const ScUndoTabColorInfo& rTabColor = aTabColorList[i];
741  rDoc.SetTabBgColor(rTabColor.mnTabId,
742  bUndoType ? rTabColor.maOldTabBgColor : rTabColor.maNewTabBgColor);
743  }
744 
746  ScDocShellModificator aModificator( *pDocShell );
747  aModificator.SetDocumentModified();
748 }
749 
751 {
752  DoChange(true);
753 }
754 
756 {
757  DoChange(false);
758 }
759 
761 {
762  // makes no sense
763 }
764 
765 bool ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
766 {
767  return false;
768 }
769 
771  SCTAB nSrc, SCTAB nDest,
772  const OUString& rN, const OUString& rC,
773  const Color& rCol, ScScenarioFlags nF,
774  const ScMarkData& rMark ) :
775  ScSimpleUndo( pNewDocShell ),
776  mpMarkData(new ScMarkData(rMark)),
777  nSrcTab( nSrc ),
778  nDestTab( nDest ),
779  aName( rN ),
780  aComment( rC ),
781  aColor( rCol ),
782  nFlags( nF )
783 {
785 }
786 
788 {
789  pDrawUndo.reset();
790 }
791 
793 {
794  return ScResId( STR_UNDO_MAKESCENARIO );
795 }
796 
798 {
799  ScDocument& rDoc = pDocShell->GetDocument();
800 
801  pDocShell->SetInUndo( true );
802  bDrawIsInUndo = true;
803  rDoc.DeleteTab( nDestTab );
804  bDrawIsInUndo = false;
805  pDocShell->SetInUndo( false );
806 
807  DoSdrUndoAction( pDrawUndo.get(), &rDoc );
808 
811 
813  if (pViewShell)
814  pViewShell->SetTabNo( nSrcTab, true );
815 
816  SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
817 
818  // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
819  pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) );
820 }
821 
823 {
825 
826  RedoSdrUndoAction( pDrawUndo.get() ); // Draw Redo first
827 
828  pDocShell->SetInUndo( true );
829  bDrawIsInUndo = true;
830 
832 
833  bDrawIsInUndo = false;
834  pDocShell->SetInUndo( false );
835 
837  if (pViewShell)
838  pViewShell->SetTabNo( nDestTab, true );
839 
840  SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
841 }
842 
844 {
845  if (auto pViewTarget = dynamic_cast<ScTabViewTarget*>( &rTarget))
846  {
847  pViewTarget->GetViewShell()->MakeScenario( aName, aComment, aColor, nFlags );
848  }
849 }
850 
852 {
853  return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr;
854 }
855 
857  SCTAB nNewTab, SCTAB nNewCount)
858  : ScSimpleUndo(pShell)
859  , nTab(nNewTab)
860  , nCount(nNewCount)
861 {
863 }
864 
866 {
867  pDrawUndo.reset();
868 }
869 
871 {
872  return ScResId( STR_UNDO_INSERT_TAB );
873 }
874 
876 {
878  ScDocument& rDoc = pDocShell->GetDocument();
879  SCTAB nTabCount = rDoc.GetTableCount();
880  if (pViewShell)
881  {
882  if(nTab<nTabCount)
883  {
884  pViewShell->SetTabNo(nTab,true);
885  }
886  else
887  {
888  pViewShell->SetTabNo(nTab-1,true);
889  }
890  }
891 
892  SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator
893  pDocShell->PostPaint( 0,0,0, rDoc.MaxCol(),rDoc.MaxRow(),MAXTAB,
895 }
896 
898 {
899  // Inserted range names, etc.
900 
901  SCTAB i;
902  ScDocument& rDoc = pDocShell->GetDocument();
903  bool bMakeRedo = !xRedoDoc;
904  if (bMakeRedo)
905  {
906  xRedoDoc.reset(new ScDocument(SCDOCMODE_UNDO));
907  xRedoDoc->InitUndo(rDoc, nTab,nTab+nCount-1, true, true);
908 
909  OUString aOldName;
910  for (i=0; i<nCount; i++)
911  {
912  SCTAB nTabPos=nTab+i;
913 
914  rDoc.CopyToDocument(0,0,nTabPos, rDoc.MaxCol(),rDoc.MaxRow(),nTabPos, InsertDeleteFlags::ALL,false, *xRedoDoc);
915  rDoc.GetName( nTabPos, aOldName );
916  xRedoDoc->RenameTab(nTabPos, aOldName);
917  xRedoDoc->SetTabBgColor(nTabPos, rDoc.GetTabBgColor(nTabPos));
918 
919  if ( rDoc.IsScenario(nTabPos) )
920  {
921  xRedoDoc->SetScenario(nTabPos, true);
922  OUString aComment;
923  Color aColor;
924  ScScenarioFlags nScenFlags;
925  rDoc.GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
926  xRedoDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags);
927  bool bActive = rDoc.IsActiveScenario(nTabPos);
928  xRedoDoc->SetActiveScenario(nTabPos, bActive);
929  bool bVisible = rDoc.IsVisible(nTabPos);
930  xRedoDoc->SetVisible(nTabPos, bVisible);
931  }
932 
933  if ( rDoc.IsTabProtected( nTabPos ) )
934  xRedoDoc->SetTabProtection(nTabPos, rDoc.GetTabProtection(nTabPos));
935  }
936 
937  }
938 
939  DoSdrUndoAction( pDrawUndo.get(), &rDoc ); // before the sheets are deleted
940 
941  bDrawIsInUndo = true;
942  for (i=0; i<nCount; i++)
943  rDoc.DeleteTab( nTab );
944  bDrawIsInUndo = false;
945 
946  DoChange();
947 }
948 
950 {
951  if (!xRedoDoc)
952  {
953  OSL_FAIL("Where is my Redo Document?");
954  return;
955  }
956 
957  ScDocument& rDoc = pDocShell->GetDocument();
958  OUString aName;
959  SCTAB i;
960  for (i=0; i<nCount; i++) // first insert all sheets (#63304#)
961  {
962  SCTAB nTabPos=nTab+i;
963  xRedoDoc->GetName(nTabPos, aName);
964  bDrawIsInUndo = true;
965  rDoc.InsertTab(nTabPos,aName);
966  bDrawIsInUndo = false;
967  }
968  for (i=0; i<nCount; i++) // then copy into inserted sheets
969  {
970  SCTAB nTabPos=nTab+i;
971  xRedoDoc->CopyToDocument(0,0,nTabPos, rDoc.MaxCol(),rDoc.MaxRow(),nTabPos, InsertDeleteFlags::ALL,false, rDoc);
972  rDoc.SetTabBgColor(nTabPos, xRedoDoc->GetTabBgColor(nTabPos));
973 
974  if (xRedoDoc->IsScenario(nTabPos))
975  {
976  rDoc.SetScenario(nTabPos, true );
977  OUString aComment;
978  Color aColor;
979  ScScenarioFlags nScenFlags;
980  xRedoDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
981  rDoc.SetScenarioData(nTabPos, aComment, aColor, nScenFlags );
982  bool bActive = xRedoDoc->IsActiveScenario(nTabPos);
983  rDoc.SetActiveScenario(nTabPos, bActive );
984  bool bVisible = xRedoDoc->IsVisible(nTabPos);
985  rDoc.SetVisible(nTabPos,bVisible );
986  }
987 
988  if (xRedoDoc->IsTabProtected(nTabPos))
989  rDoc.SetTabProtection(nTabPos, xRedoDoc->GetTabProtection(nTabPos));
990  }
991 
992  RedoSdrUndoAction( pDrawUndo.get() ); // after the sheets are inserted
993 
994  DoChange();
995 }
996 
998 {
999  if (auto pViewTarget = dynamic_cast<ScTabViewTarget*>( &rTarget))
1000  pViewTarget->GetViewShell()->GetViewData().GetDispatcher().
1001  Execute(FID_INS_TABLE, SfxCallMode::SLOT | SfxCallMode::RECORD);
1002 }
1003 
1005 {
1006  return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr;
1007 }
1008 
1009 ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const OUString& rDocName ) :
1010  ScSimpleUndo( pShell ),
1011  aDocName( rDocName ),
1012  nRefreshDelay( 0 ),
1013  nCount( 0 )
1014 {
1015  ScDocument& rDoc = pDocShell->GetDocument();
1016  SCTAB nTabCount = rDoc.GetTableCount();
1017  pTabs.reset( new SCTAB[nTabCount] );
1018  pModes.reset( new ScLinkMode[nTabCount] );
1019  pTabNames.reset( new OUString[nTabCount] );
1020 
1021  for (SCTAB i=0; i<nTabCount; i++)
1022  {
1023  ScLinkMode nMode = rDoc.GetLinkMode(i);
1024  if (nMode != ScLinkMode::NONE)
1025  if (rDoc.GetLinkDoc(i) == aDocName)
1026  {
1027  if (!nCount)
1028  {
1029  aFltName = rDoc.GetLinkFlt(i);
1030  aOptions = rDoc.GetLinkOpt(i);
1032  }
1033  else
1034  {
1035  OSL_ENSURE(aFltName == rDoc.GetLinkFlt(i) &&
1036  aOptions == rDoc.GetLinkOpt(i),
1037  "different Filter for a Document?");
1038  }
1039  pTabs[nCount] = i;
1040  pModes[nCount] = nMode;
1041  pTabNames[nCount] = rDoc.GetLinkTab(i);
1042  ++nCount;
1043  }
1044  }
1045 }
1046 
1048 {
1049 }
1050 
1052 {
1053  return ScResId( STR_UNDO_REMOVELINK );
1054 }
1055 
1056 void ScUndoRemoveLink::DoChange( bool bLink ) const
1057 {
1058  ScDocument& rDoc = pDocShell->GetDocument();
1059  for (sal_uInt16 i=0; i<nCount; i++)
1060  if (bLink) // establish link
1062  else // remove link
1063  rDoc.SetLink( pTabs[i], ScLinkMode::NONE, "", "", "", "", 0 );
1065 }
1066 
1068 {
1069  DoChange( true );
1070 }
1071 
1073 {
1074  DoChange( false );
1075 }
1076 
1078 {
1079  // makes no sense
1080 }
1081 
1083 {
1084  return false;
1085 }
1086 
1087 ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, const std::vector<SCTAB>& newUndoTabs, bool bNewShow ) :
1088  ScSimpleUndo( pShell ),
1089  undoTabs( newUndoTabs ),
1090  bShow( bNewShow )
1091 {
1092 }
1093 
1095 {
1096 }
1097 
1098 void ScUndoShowHideTab::DoChange( bool bShowP ) const
1099 {
1100  ScDocument& rDoc = pDocShell->GetDocument();
1102 
1103  for(const SCTAB& nTab : undoTabs)
1104  {
1105  rDoc.SetVisible( nTab, bShowP );
1106  if (pViewShell)
1107  pViewShell->SetTabNo(nTab,true);
1108  }
1109 
1110  SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
1112 }
1113 
1115 {
1116  DoChange(!bShow);
1117 }
1118 
1120 {
1121  DoChange(bShow);
1122 }
1123 
1125 {
1126  if (auto pViewTarget = dynamic_cast<ScTabViewTarget*>( &rTarget))
1127  pViewTarget->GetViewShell()->GetViewData().GetDispatcher().
1128  Execute( bShow ? FID_TABLE_SHOW : FID_TABLE_HIDE,
1129  SfxCallMode::SLOT | SfxCallMode::RECORD);
1130 }
1131 
1133 {
1134  return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr;
1135 }
1136 
1138 {
1139  const char* pId;
1140  if (undoTabs.size() > 1)
1141  {
1142  pId = bShow ? STR_UNDO_SHOWTABS : STR_UNDO_HIDETABS;
1143  }
1144  else
1145  {
1146  pId = bShow ? STR_UNDO_SHOWTAB : STR_UNDO_HIDETAB;
1147  }
1148 
1149  return ScResId(pId);
1150 }
1151 
1152 ScUndoDocProtect::ScUndoDocProtect(ScDocShell* pShell, unique_ptr<ScDocProtection> && pProtectSettings) :
1153  ScSimpleUndo(pShell),
1154  mpProtectSettings(std::move(pProtectSettings))
1155 {
1156 }
1157 
1159 {
1160 }
1161 
1162 void ScUndoDocProtect::DoProtect(bool bProtect)
1163 {
1164  ScDocument& rDoc = pDocShell->GetDocument();
1165 
1166  if (bProtect)
1167  {
1168  // set protection.
1169  unique_ptr<ScDocProtection> pCopy(new ScDocProtection(*mpProtectSettings));
1170  pCopy->setProtected(true);
1171  rDoc.SetDocProtection(pCopy.get());
1172  }
1173  else
1174  {
1175  // remove protection.
1176  rDoc.SetDocProtection(nullptr);
1177  }
1178 
1180  if (pViewShell)
1181  {
1182  pViewShell->UpdateLayerLocks();
1183  pViewShell->UpdateInputHandler(true); // so that input can be immediately entered again
1184  }
1185 
1187 }
1188 
1190 {
1191  BeginUndo();
1192  DoProtect(!mpProtectSettings->isProtected());
1193  EndUndo();
1194 }
1195 
1197 {
1198  BeginRedo();
1199  DoProtect(mpProtectSettings->isProtected());
1200  EndRedo();
1201 }
1202 
1204 {
1205  // makes no sense
1206 }
1207 
1209 {
1210  return false; // makes no sense
1211 }
1212 
1214 {
1215  const char* pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC;
1216  return ScResId(pId);
1217 }
1218 
1219 ScUndoTabProtect::ScUndoTabProtect(ScDocShell* pShell, SCTAB nTab, unique_ptr<ScTableProtection> && pProtectSettings) :
1220  ScSimpleUndo(pShell),
1221  mnTab(nTab),
1222  mpProtectSettings(std::move(pProtectSettings))
1223 {
1224 }
1225 
1227 {
1228 }
1229 
1230 void ScUndoTabProtect::DoProtect(bool bProtect)
1231 {
1232  ScDocument& rDoc = pDocShell->GetDocument();
1233 
1234  if (bProtect)
1235  {
1236  // set protection.
1237  unique_ptr<ScTableProtection> pCopy(new ScTableProtection(*mpProtectSettings));
1238  pCopy->setProtected(true);
1239  rDoc.SetTabProtection(mnTab, pCopy.get());
1240  }
1241  else
1242  {
1243  // remove protection.
1244  rDoc.SetTabProtection(mnTab, nullptr);
1245  }
1246 
1248  if (pViewShell)
1249  {
1250  if (ScTabView* pTabView = pViewShell->GetViewData().GetView())
1251  pTabView->SetTabProtectionSymbol( mnTab, bProtect);
1252  pViewShell->UpdateLayerLocks();
1253  pViewShell->UpdateInputHandler(true); // so that input can be immediately entered again
1254  }
1255 
1257 }
1258 
1260 {
1261  BeginUndo();
1262  DoProtect(!mpProtectSettings->isProtected());
1263  EndUndo();
1264 }
1265 
1267 {
1268  BeginRedo();
1269  DoProtect(mpProtectSettings->isProtected());
1270  EndRedo();
1271 }
1272 
1274 {
1275  // makes no sense
1276 }
1277 
1279 {
1280  return false; // makes no sense
1281 }
1282 
1284 {
1285  const char* pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB;
1286  return ScResId(pId);
1287 }
1288 
1290  std::unique_ptr<ScPrintRangeSaver> pOld, std::unique_ptr<ScPrintRangeSaver> pNew ) :
1291  ScSimpleUndo( pShell ),
1292  nTab( nNewTab ),
1293  pOldRanges( std::move(pOld) ),
1294  pNewRanges( std::move(pNew) )
1295 {
1296 }
1297 
1299 {
1300  pOldRanges.reset();
1301  pNewRanges.reset();
1302 }
1303 
1305 {
1306  ScDocument& rDoc = pDocShell->GetDocument();
1307  if (bUndo)
1308  rDoc.RestorePrintRanges( *pOldRanges );
1309  else
1310  rDoc.RestorePrintRanges( *pNewRanges );
1311 
1313  if (pViewShell)
1314  pViewShell->SetTabNo( nTab );
1315 
1316  ScPrintFunc( pDocShell, pDocShell->GetPrinter(), nTab ).UpdatePages();
1317 
1319 }
1320 
1322 {
1323  BeginUndo();
1324  DoChange( true );
1325  EndUndo();
1326 }
1327 
1329 {
1330  BeginRedo();
1331  DoChange( false );
1332  EndRedo();
1333 }
1334 
1336 {
1337  // makes no sense
1338 }
1339 
1341 {
1342  return false; // makes no sense
1343 }
1344 
1346 {
1347  return ScResId( STR_UNDO_PRINTRANGES );
1348 }
1349 
1351  const OUString& rON, const OUString& rNN, const OUString& rOC, const OUString& rNC,
1352  const Color& rOCol, const Color& rNCol, ScScenarioFlags nOF, ScScenarioFlags nNF) :
1353  ScSimpleUndo( pNewDocShell ),
1354  nTab ( nT ),
1355  aOldName ( rON ),
1356  aNewName ( rNN ),
1357  aOldComment ( rOC ),
1358  aNewComment ( rNC ),
1359  aOldColor ( rOCol ),
1360  aNewColor ( rNCol ),
1361  nOldFlags (nOF),
1362  nNewFlags (nNF)
1363 {
1364 }
1365 
1367 {
1368 }
1369 
1371 {
1372  return ScResId( STR_UNDO_EDITSCENARIO );
1373 }
1374 
1376 {
1377  ScDocument& rDoc = pDocShell->GetDocument();
1378 
1379  rDoc.RenameTab( nTab, aOldName );
1381 
1383  // The sheet name might be used in a formula ...
1385  if (pViewShell)
1386  pViewShell->UpdateInputHandler();
1387 
1388  if ( aOldName != aNewName )
1389  SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
1390 }
1391 
1393 {
1394  ScDocument& rDoc = pDocShell->GetDocument();
1395 
1396  rDoc.RenameTab( nTab, aNewName );
1398 
1400  // The sheet name might be used in a formula ...
1402  if (pViewShell)
1403  pViewShell->UpdateInputHandler();
1404 
1405  if ( aOldName != aNewName )
1406  SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );
1407 }
1408 
1410 {
1411  // Repeat makes no sense
1412 }
1413 
1415 {
1416  return false;
1417 }
1418 
1419 // (move to different file?)
1420 ScUndoRenameObject::ScUndoRenameObject( ScDocShell* pNewDocShell, const OUString& rPN,
1421  const OUString& rON, const OUString& rNN ) :
1422  ScSimpleUndo( pNewDocShell ),
1423  aPersistName( rPN ),
1424  aOldName ( rON ),
1425  aNewName ( rNN )
1426 {
1427 }
1428 
1430 {
1431 }
1432 
1434 {
1435  // string resource shared with title for dialog
1436  return ScResId(SCSTR_RENAMEOBJECT);
1437 }
1438 
1440 {
1441  ScDocument& rDoc = pDocShell->GetDocument();
1442  ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
1443  if ( pDrawLayer )
1444  {
1445  sal_uInt16 nCount = pDrawLayer->GetPageCount();
1446  for (sal_uInt16 nTab=0; nTab<nCount; nTab++)
1447  {
1448  SdrPage* pPage = pDrawLayer->GetPage(nTab);
1449  assert(pPage && "Page ?");
1450 
1451  SdrObjListIter aIter( pPage, SdrIterMode::DeepNoGroups );
1452  SdrObject* pObject = aIter.Next();
1453  while (pObject)
1454  {
1455  if ( pObject->GetObjIdentifier() == OBJ_OLE2 &&
1456  static_cast<SdrOle2Obj*>(pObject)->GetPersistName() == aPersistName )
1457  {
1458  return pObject;
1459  }
1460 
1461  pObject = aIter.Next();
1462  }
1463  }
1464  }
1465  OSL_FAIL("Object not found");
1466  return nullptr;
1467 }
1468 
1470 {
1471  BeginUndo();
1472  SdrObject* pObj = GetObject();
1473  if ( pObj )
1474  pObj->SetName( aOldName );
1475  EndUndo();
1476 }
1477 
1479 {
1480  BeginRedo();
1481  SdrObject* pObj = GetObject();
1482  if ( pObj )
1483  pObj->SetName( aNewName );
1484  EndRedo();
1485 }
1486 
1488 {
1489 }
1490 
1492 {
1493  return false;
1494 }
1495 
1496 ScUndoLayoutRTL::ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, bool bNewRTL ) :
1497  ScSimpleUndo( pShell ),
1498  nTab( nNewTab ),
1499  bRTL( bNewRTL )
1500 {
1501 }
1502 
1504 {
1505 }
1506 
1507 void ScUndoLayoutRTL::DoChange( bool bNew )
1508 {
1509  pDocShell->SetInUndo( true );
1510 
1511  ScDocument& rDoc = pDocShell->GetDocument();
1512  rDoc.SetLayoutRTL( nTab, bNew );
1513 
1515  if (pViewShell)
1516  pViewShell->SetTabNo(nTab,true);
1517 
1519 
1520  pDocShell->SetInUndo( false );
1521 }
1522 
1524 {
1525  DoChange(!bRTL);
1526 }
1527 
1529 {
1530  DoChange(bRTL);
1531 }
1532 
1534 {
1535  if (auto pViewTarget = dynamic_cast<ScTabViewTarget*>( &rTarget))
1536  pViewTarget->GetViewShell()->GetViewData().GetDispatcher().
1537  Execute( FID_TAB_RTL, SfxCallMode::SLOT | SfxCallMode::RECORD);
1538 }
1539 
1541 {
1542  return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr;
1543 }
1544 
1546 {
1547  return ScResId( STR_UNDO_TAB_RTL );
1548 }
1549 
1550 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SC_DLLPUBLIC OUString GetLinkDoc(SCTAB nTab) const
Definition: documen3.cxx:506
OUString GetLinkOpt(SCTAB nTab) const
Definition: documen3.cxx:520
ScUndoShowHideTab(ScDocShell *pShell, const std::vector< SCTAB > &newUndoTabs, bool bNewShow)
Definition: undotab.cxx:1087
void UpdateLinks() override
Definition: docsh6.cxx:319
virtual void Undo() override
Definition: undotab.cxx:546
bool InsertTable(const OUString &rName, SCTAB nTabNr, bool bRecord=true)
Definition: viewfun2.cxx:2300
void DoChange(bool bNew)
Definition: undotab.cxx:1507
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:1132
virtual void Redo() override
Definition: undotab.cxx:1266
virtual ~ScUndoMoveTab() override
Definition: undotab.cxx:479
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:1409
ScAddress aStart
Definition: address.hxx:500
bool bVisible
SC_DLLPUBLIC void SetScenario(SCTAB nTab, bool bFlag)
Definition: documen3.cxx:421
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
Definition: documen3.cxx:1890
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:43
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
Definition: docsh3.cxx:450
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
Definition: documen3.cxx:499
virtual OUString GetComment() const override
Definition: undotab.cxx:483
OBJ_OLE2
virtual void Redo() override
Definition: undotab.cxx:1196
void PostPaintGridAll()
Definition: docsh3.cxx:181
std::unique_ptr< SdrUndoAction > GetSdrUndoAction(ScDocument *pDoc)
Definition: undoolk.cxx:26
virtual void Undo() override
Definition: undotab.cxx:605
SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection *pProtect)
Definition: documen3.cxx:1907
bool AppendTable(const OUString &rName, bool bRecord=true)
Definition: viewfun2.cxx:2355
virtual OUString GetComment() const override
Definition: undotab.cxx:870
void SetSheetEvents(SCTAB nTab, std::unique_ptr< ScSheetEvents > pNew)
Definition: documen3.cxx:661
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:843
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:1487
virtual ~ScUndoTabProtect() override
Definition: undotab.cxx:1226
ScUndoMakeScenario(ScDocShell *pNewDocShell, SCTAB nSrc, SCTAB nDest, const OUString &rN, const OUString &rC, const Color &rCol, ScScenarioFlags nF, const ScMarkData &rMark)
Definition: undotab.cxx:770
virtual void Redo() override
Definition: undotab.cxx:1528
virtual OUString GetComment() const override
Definition: undotab.cxx:1545
SC_DLLPUBLIC bool IsActiveScenario(SCTAB nTab) const
Definition: documen3.cxx:872
sal_uLong nStartChangeAction
Definition: undotab.hxx:111
sheet protection state container
SC_DLLPUBLIC void SetTabBgColor(SCTAB nTab, const Color &rColor)
Definition: documen3.cxx:450
virtual ~ScUndoShowHideTab() override
Definition: undotab.cxx:1094
ScScenarioFlags
Definition: global.hxx:237
ScScenarioFlags nOldFlags
Definition: undotab.hxx:424
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:395
sal_uIntPtr sal_uLong
virtual void Undo() override
Definition: undotab.cxx:446
virtual OUString GetComment() const override
Definition: undotab.cxx:1433
sal_Int64 n
void DoProtect(bool bProtect)
Definition: undotab.cxx:1162
ScUndoLayoutRTL(ScDocShell *pShell, SCTAB nNewTab, bool bNewRTL)
Definition: undotab.cxx:1496
SdrObject * GetObject()
Definition: undotab.cxx:1439
void DeleteTable(SCTAB nTabNr, bool bRecord=true)
Definition: viewfun2.cxx:2386
sal_uLong GetCodeCount() const
Definition: document.cxx:6161
void SetDocumentModified()
Definition: docsh.cxx:2819
void PostPaintExtras()
Definition: docsh3.cxx:196
std::unique_ptr< SdrUndoAction > pDrawUndo
Definition: undobase.hxx:143
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
virtual ~ScUndoTabColor() override
Definition: undotab.cxx:722
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL)
Definition: document.cxx:950
ScUndoDeleteTab(ScDocShell *pNewDocShell, const std::vector< SCTAB > &theTabs, ScDocumentUniquePtr pUndoDocument, std::unique_ptr< ScRefUndoData > pRefData)
Definition: undotab.cxx:249
bool SetViewMarkData(const ScMarkData &rMarkData)
Definition: undobase.cxx:52
ScUndoInsertTables(ScDocShell *pNewDocShell, SCTAB nTabNum, const std::vector< OUString > &newNameList)
Definition: undotab.cxx:155
ScDocumentUniquePtr xRedoDoc
Definition: undotab.hxx:270
virtual void Undo() override
Definition: undotab.cxx:1469
void EndUndo()
Definition: undobase.cxx:122
#define SC_TAB_INSERTED
Definition: uiitems.hxx:76
virtual OUString GetComment() const override
Definition: undotab.cxx:792
void SetChangeTrack()
Definition: undotab.cxx:267
OUString sNewName
Definition: undotab.hxx:137
sal_uLong GetActionMax() const
Definition: chgtrack.hxx:961
EmbeddedObjectRef * pObject
ScUndoTabProtect(ScDocShell *pShell, SCTAB nTab, std::unique_ptr< ScTableProtection > &&pProtectSettings)
Definition: undotab.cxx:1219
std::vector< SCTAB > undoTabs
Definition: undotab.hxx:324
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:1004
std::unique_ptr< ::std::vector< OUString > > mpNewNames
Definition: undotab.hxx:165
SC_DLLPUBLIC void SetVisible(SCTAB nTab, bool bVisible)
Definition: document.cxx:901
sal_uLong nStartChangeAction
Definition: undotab.hxx:85
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:1278
virtual void Redo() override
Definition: undotab.cxx:755
void DoChange() const
Definition: undotab.cxx:875
virtual OUString GetComment() const override
Definition: undotab.cxx:262
ScScenarioFlags nNewFlags
Definition: undotab.hxx:425
virtual void Redo() override
Definition: undotab.cxx:376
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:556
void DoProtect(bool bProtect)
Definition: undotab.cxx:1230
::std::unique_ptr< ScDocProtection > mpProtectSettings
Definition: undotab.hxx:346
SfxApplication * SfxGetpApp()
std::unique_ptr< ScPrintRangeSaver > pOldRanges
Definition: undotab.hxx:391
OUString sOldName
Definition: undotab.hxx:136
void InsertTables(std::vector< OUString > &aNames, SCTAB nTab, SCTAB nCount, bool bRecord=true)
Definition: viewfun2.cxx:2313
void EndUndo()
Definition: undobase.cxx:442
void DoChange(SCTAB nTab, const OUString &rName) const
Definition: undotab.cxx:429
std::unique_ptr< ::std::vector< OUString > > mpNewNames
Definition: undotab.hxx:191
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:143
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:1491
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
Definition: document.cxx:853
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:244
virtual ~ScUndoInsertTables() override
Definition: undotab.cxx:167
ScUndoPrintRange(ScDocShell *pShell, SCTAB nNewTab, std::unique_ptr< ScPrintRangeSaver > pOld, std::unique_ptr< ScPrintRangeSaver > pNew)
Definition: undotab.cxx:1289
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:873
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
virtual ~ScUndoMakeScenario() override
Definition: undotab.cxx:787
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:314
virtual void Undo() override
Definition: undotab.cxx:1114
virtual ~ScUndoCopyTab() override
Definition: undotab.cxx:581
int nCount
virtual ~ScUndoDeleteTab() override
Definition: undotab.cxx:257
void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, InsertDeleteFlags nFlags, bool bMarked, ScDocument &rDestDoc, const ScMarkData *pMarks=nullptr, bool bColRowFlags=true)
Definition: document.cxx:2076
void RedoSdrUndoAction(SdrUndoAction *pUndoAction)
Definition: undoolk.cxx:61
std::unique_ptr< ::std::vector< SCTAB > > mpNewTabs
Definition: undotab.hxx:163
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
Definition: tabvwsha.cxx:638
ScLinkMode
Definition: global.hxx:226
#define SC_TAB_DELETED
Definition: uiitems.hxx:77
void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest)
Definition: documen3.cxx:1915
virtual ~ScUndoRenameObject() override
Definition: undotab.cxx:1429
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:699
void SetChangeTrack()
Definition: undotab.cxx:177
virtual void Redo() override
Definition: undotab.cxx:451
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:1124
ScViewData & GetViewData()
Definition: tabview.hxx:332
ScChangeTrack * GetChangeTrack() const
Definition: document.hxx:2392
SC_DLLPUBLIC void Undo(sal_uLong nStartAction, sal_uLong nEndAction, bool bMerge=false)
Definition: chgtrack.cxx:3088
virtual void Undo() override
Definition: undotab.cxx:1321
std::vector< SCTAB > theTabs
Definition: undotab.hxx:110
virtual OUString GetComment() const override
Definition: undotab.cxx:1345
ScUndoInsertTab(ScDocShell *pNewDocShell, SCTAB nTabNum, bool bApp, const OUString &rNewName)
Definition: undotab.cxx:61
void SetTab(SCTAB nTabP)
Definition: address.hxx:283
void BeginRedo()
Definition: undobase.cxx:142
bool bDrawIsInUndo
Definition: drwlayer.cxx:85
OUString aOldName
Definition: undotab.hxx:446
SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
Definition: documen3.cxx:432
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1059
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:872
virtual OUString GetComment() const override
Definition: undotab.cxx:172
bool CopyTab(SCTAB nOldPos, SCTAB nNewPos, const ScMarkData *pOnlyMarked=nullptr)
Definition: documen2.cxx:765
virtual OUString GetComment() const override
Definition: undotab.cxx:1137
std::unique_ptr< ScPrintRangeSaver > pNewRanges
Definition: undotab.hxx:392
virtual void Undo() override
Definition: undotab.cxx:101
virtual void Undo() override
Definition: undotab.cxx:797
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:1335
int i
void DoChange(bool bShow) const
Definition: undotab.cxx:1098
SC_DLLPUBLIC void SetActiveScenario(SCTAB nTab, bool bActive)
Definition: documen3.cxx:877
OUString aNewComment
Definition: undotab.hxx:421
::std::unique_ptr< ScTableProtection > mpProtectSettings
Definition: undotab.hxx:369
void DoChange(bool bUndo)
Definition: undotab.cxx:1304
sal_uLong nEndChangeAction
Definition: undotab.hxx:58
virtual OUString GetComment() const override
Definition: undotab.cxx:1370
virtual sal_uInt16 GetObjIdentifier() const
ScUndoTabColorInfo::List aTabColorList
Definition: undotab.hxx:218
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2613
virtual OUString GetComment() const override
Definition: undotab.cxx:424
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:765
void RestorePrintRanges(const ScPrintRangeSaver &rSaver)
Definition: document.cxx:6343
ScDocShell * pDocShell
Definition: undobase.hxx:48
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:760
ScUndoDocProtect(ScDocShell *pShell,::std::unique_ptr< ScDocProtection > &&pProtectSettings)
Definition: undotab.cxx:1152
std::unique_ptr< ScMarkData > mpMarkData
Definition: undotab.hxx:242
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
Definition: tabview3.cxx:1793
const SdrPage * GetPage(sal_uInt16 nPgNum) const
void SetChangeTrack()
Definition: undotab.cxx:87
virtual void Redo() override
Definition: undotab.cxx:1119
std::unique_ptr< SdrUndoAction > pDrawUndo
Definition: undotab.hxx:83
virtual void Redo() override
Definition: undotab.cxx:221
virtual void Redo() override
Definition: undotab.cxx:1328
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:404
void DoChange() const
Definition: undotab.cxx:591
sal_uLong nEndChangeAction
Definition: undotab.hxx:112
OUString ScResId(const char *pId)
Definition: scdll.cxx:95
void SetLink(SCTAB nTab, ScLinkMode nMode, const OUString &rDoc, const OUString &rFilter, const OUString &rOptions, const OUString &rTabName, sal_uLong nRefreshDelay)
Definition: documen3.cxx:541
void DoSdrUndoAction(SdrUndoAction *pUndoAction, ScDocument *pDoc)
Definition: undoolk.cxx:35
std::unique_ptr< ::std::vector< OUString > > mpOldNames
Definition: undotab.hxx:164
ScDocumentUniquePtr pRefUndoDoc
Definition: undobase.hxx:144
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
Definition: document.cxx:504
ScUndoTabColor(ScDocShell *pNewDocShell, SCTAB nT, const Color &aOTabBgColor, const Color &aNTabBgColor)
Definition: undotab.cxx:704
std::unique_ptr< SdrUndoAction > pDrawUndo
Definition: undotab.hxx:192
OUString GetLinkFlt(SCTAB nTab) const
Definition: documen3.cxx:513
virtual void Redo() override
Definition: undotab.cxx:949
SC_DLLPUBLIC void AppendDeleteRange(const ScRange &, ScDocument *pRefDoc, SCTAB nDz, sal_uLong nRejectingInsert)
Definition: chgtrack.cxx:2444
void DoChange(bool bUndo) const
Definition: undotab.cxx:488
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:1203
const SCTAB MAXTAB
Definition: address.hxx:71
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:150
virtual void Redo() override
Definition: undotab.cxx:122
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
Definition: docsh3.cxx:99
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:561
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:694
ScUndoRenameTab(ScDocShell *pNewDocShell, SCTAB nT, const OUString &rOldName, const OUString &rNewName)
Definition: undotab.cxx:409
void MoveTab(SCTAB nSrcTab, SCTAB nDestTab)
Definition: viewdata.cxx:957
void PostDataChanged()
Definition: docsh3.cxx:91
SfxViewShell * GetViewShell() const
virtual void Undo() override
Definition: undotab.cxx:750
ScDBFunc * GetView() const
Definition: viewdata.cxx:852
virtual OUString GetComment() const override
Definition: undotab.cxx:79
std::unique_ptr< ::std::vector< SCTAB > > mpOldTabs
Definition: undotab.hxx:189
void BeginUndo()
Definition: undobase.cxx:435
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:1540
SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString &rComment, Color &rColor, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:463
ScUndoRenameObject(ScDocShell *pNewDocShell, const OUString &rPN, const OUString &rON, const OUString &rNN)
Definition: undotab.cxx:1420
virtual void Undo() override
Definition: undotab.cxx:1375
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:1273
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:1340
std::unique_ptr< SdrUndoAction > pDrawUndo
Definition: undotab.hxx:271
virtual ~ScUndoInsertTab() override
Definition: undotab.cxx:74
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:443
SdrObject * Next()
void SetInUndo(bool bSet)
Definition: docsh.cxx:2914
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:461
virtual ~ScUndoLayoutRTL() override
Definition: undotab.cxx:1503
virtual void Undo() override
Definition: undotab.cxx:1259
virtual ~ScUndoPrintRange() override
Definition: undotab.cxx:1298
std::unique_ptr< ::std::vector< SCTAB > > mpOldTabs
Definition: undotab.hxx:162
static ScTabViewShell * GetActiveViewShell()
Definition: tabvwsh4.cxx:1023
bool MoveTab(SCTAB nOldPos, SCTAB nNewPos, ScProgress *pProgress=nullptr)
Definition: documen2.cxx:695
virtual OUString GetComment() const override
Definition: undotab.cxx:726
SC_DLLPUBLIC bool IsScenario(SCTAB nTab) const
Definition: documen3.cxx:427
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:456
virtual void Redo() override
Definition: undotab.cxx:551
virtual OUString GetComment() const override
Definition: undotab.cxx:586
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:851
SCTAB MakeScenario(SCTAB nTab, const OUString &rName, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags, ScMarkData &rMark, bool bRecord=true)
Definition: docsh5.cxx:785
virtual void Undo() override
Definition: undotab.cxx:198
virtual ~ScUndoScenarioFlags() override
Definition: undotab.cxx:1366
OUString aName
sal_uLong GetLinkRefreshDelay(SCTAB nTab) const
Definition: documen3.cxx:534
ScUndoMoveTab(ScDocShell *pNewDocShell, std::unique_ptr< std::vector< SCTAB >> pOldTabs, std::unique_ptr< std::vector< SCTAB >> pNewTabs, std::unique_ptr< std::vector< OUString >> pOldNames=nullptr, std::unique_ptr< std::vector< OUString >> pNewNames=nullptr)
Definition: undotab.cxx:466
virtual void Redo() override
Definition: undotab.cxx:822
sal_uLong nEndChangeAction
Definition: undotab.hxx:86
virtual void Redo() override
Definition: undotab.cxx:638
SC_DLLPUBLIC OUString GetLinkTab(SCTAB nTab) const
Definition: documen3.cxx:527
virtual void Undo() override
Definition: undotab.cxx:1189
const ScDocument & GetDocument() const
Definition: docsh.hxx:216
std::unique_ptr< SdrUndoAction > pDrawUndo
Definition: undotab.hxx:57
virtual ~ScUndoRenameTab() override
Definition: undotab.cxx:420
void DoChange(bool bUndoType) const
Definition: undotab.cxx:733
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:1208
static SCTAB lcl_GetVisibleTabBefore(const ScDocument &rDoc, SCTAB nTab)
Definition: undotab.cxx:289
SC_DLLPUBLIC bool DeleteTab(SCTAB nTab)
Definition: document.cxx:673
bool DeleteTables(const std::vector< SCTAB > &TheTabs, bool bRecord=true)
SC_DLLPUBLIC ScTableProtection * GetTabProtection(SCTAB nTab) const
Definition: documen3.cxx:1899
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:1533
void SetDocumentModified()
Definition: docsh.cxx:3158
std::unique_ptr< ::std::vector< SCTAB > > mpNewTabs
Definition: undotab.hxx:190
OUString aNewName
Definition: undotab.hxx:447
ScUndoCopyTab(ScDocShell *pNewDocShell, std::unique_ptr< std::vector< SCTAB >> pOldTabs, std::unique_ptr< std::vector< SCTAB >> pNewTabs, std::unique_ptr< std::vector< OUString >> pNewNames=nullptr)
Definition: undotab.cxx:566
SC_DLLPUBLIC bool IsVisible(SCTAB nTab) const
Definition: document.cxx:908
SC_DLLPUBLIC void SetDocProtection(const ScDocProtection *pProtect)
Definition: documen3.cxx:1871
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:237
std::vector< OUString > aNameList
Definition: undotab.hxx:84
ScUndoImportTab(ScDocShell *pShell, SCTAB nNewTab, SCTAB nNewCount)
Definition: undotab.cxx:856
OUString sNewName
Definition: undotab.hxx:56
SC_DLLPUBLIC void AppendInsert(const ScRange &rRange, bool bEndOfList=false)
Definition: chgtrack.cxx:2807
virtual void Redo() override
Definition: undotab.cxx:1392
virtual OUString GetComment() const override
Definition: undotab.cxx:1283
void UpdateLayerLocks()
Definition: tabview5.cxx:341
virtual OUString GetComment() const override
Definition: undotab.cxx:1213
ScUndoScenarioFlags(ScDocShell *pNewDocShell, SCTAB nT, const OUString &rON, const OUString &rNN, const OUString &rOC, const OUString &rNC, const Color &rOCol, const Color &rNCol, ScScenarioFlags nOF, ScScenarioFlags nNF)
Definition: undotab.cxx:1350
virtual void Redo() override
Definition: undotab.cxx:1478
void SetName(const OUString &rStr)
virtual ~ScUndoImportTab() override
Definition: undotab.cxx:865
std::unique_ptr< SdrUndoAction > pDrawUndo
Definition: undotab.hxx:249
virtual ~ScUndoDocProtect() override
Definition: undotab.cxx:1158
virtual void Undo() override
Definition: undotab.cxx:1523
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
Definition: document.cxx:213
void EndRedo()
Definition: undobase.cxx:151
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undotab.cxx:1414
Create before modifications of the document and destroy thereafter.
Definition: docsh.hxx:450
::std::vector< ScUndoTabColorInfo > List
Definition: tabbgcolor.hxx:37
OUString aComment
Definition: undotab.hxx:246
OUString aPersistName
Definition: undotab.hxx:445
OUString aOldComment
Definition: undotab.hxx:420
sal_uInt16 GetPageCount() const
sal_Int16 SCTAB
Definition: types.hxx:23
virtual void Undo() override
Definition: undotab.cxx:297
void BeginUndo()
Definition: undobase.cxx:87
ScScenarioFlags nFlags
Definition: undotab.hxx:248
virtual void Undo() override
Definition: undotab.cxx:897
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undotab.cxx:997