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