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