LibreOffice Module sc (master)  1
undobase.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 <vcl/virdev.hxx>
21 #include <svx/svdundo.hxx>
22 
23 #include <undobase.hxx>
24 #include <refundo.hxx>
25 #include <docsh.hxx>
26 #include <tabvwsh.hxx>
27 #include <undoolk.hxx>
28 #include <undodraw.hxx>
29 #include <dbdata.hxx>
30 #include <attrib.hxx>
31 #include <queryparam.hxx>
32 #include <subtotalparam.hxx>
33 #include <rowheightcontext.hxx>
34 #include <column.hxx>
35 #include <sortparam.hxx>
36 #include <columnspanset.hxx>
37 
38 
40  pDocShell( pDocSh ),
41  mnViewShellId(-1)
42 {
44  mnViewShellId = pViewShell->GetViewShellId();
45 }
46 
48 {
49  return mnViewShellId;
50 }
51 
52 bool ScSimpleUndo::SetViewMarkData( const ScMarkData& rMarkData )
53 {
54  if ( IsPaintLocked() )
55  return false;
56 
58  if ( !pViewShell )
59  return false;
60 
61  pViewShell->SetMarkData( rMarkData );
62  return true;
63 }
64 
65 bool ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
66 {
67  // A SdrUndoGroup for updating detective arrows can belong
68  // to each Undo-Action.
69  // DetectiveRefresh is always called next,
70  // the SdrUndoGroup is encapsulated in a ScUndoDraw action.
71  // AddUndoAction is only called with bTryMerg=sal_True
72  // for automatic update.
73 
74  if ( !pDetectiveUndo && dynamic_cast<const ScUndoDraw*>( pNextAction) != nullptr )
75  {
76  // Take SdrUndoAction from ScUndoDraw Action,
77  // ScUndoDraw is later deleted by the UndoManager
78 
79  ScUndoDraw* pCalcUndo = static_cast<ScUndoDraw*>(pNextAction);
80  pDetectiveUndo = pCalcUndo->ReleaseDrawUndo();
81  return true;
82  }
83 
84  return false;
85 }
86 
88 {
89  pDocShell->SetInUndo( true );
90 
92  if (pViewShell)
93  pViewShell->HideAllCursors(); // for example due to merged cells
94 
95  // detective updates happened last, must be undone first
96  if (pDetectiveUndo)
97  pDetectiveUndo->Undo();
98 }
99 
100 namespace
101 {
102  class DisableUndoGuard
103  {
104  private:
106  bool m_bUndoEnabled;
107  public:
108  explicit DisableUndoGuard(ScDocShell *pDocShell)
109  : m_rDoc(pDocShell->GetDocument())
110  , m_bUndoEnabled(m_rDoc.IsUndoEnabled())
111  {
112  m_rDoc.EnableUndo(false);
113  }
114 
115  ~DisableUndoGuard()
116  {
117  m_rDoc.EnableUndo(m_bUndoEnabled);
118  }
119  };
120 }
121 
123 {
124  {
125  // rhbz#1352881 Temporarily turn off undo generation during
126  // SetDocumentModified
127  DisableUndoGuard aGuard(pDocShell);
129  }
130 
132  if (pViewShell)
133  {
134  pViewShell->UpdateAutoFillMark();
135  pViewShell->UpdateInputHandler();
136  pViewShell->ShowAllCursors();
137  }
138 
139  pDocShell->SetInUndo( false );
140 }
141 
143 {
144  pDocShell->SetInUndo( true );
145 
147  if (pViewShell)
148  pViewShell->HideAllCursors(); // for example due to merged cells
149 }
150 
152 {
153  if (pDetectiveUndo)
154  pDetectiveUndo->Redo();
155 
156  {
157  // rhbz#1352881 Temporarily turn off undo generation during
158  // SetDocumentModified
159  DisableUndoGuard aGuard(pDocShell);
161  }
162 
164  if (pViewShell)
165  {
166  pViewShell->UpdateAutoFillMark();
167  pViewShell->UpdateInputHandler();
168  pViewShell->ShowAllCursors();
169  }
170 
171  pDocShell->SetInUndo( false );
172 }
173 
175 {
176  ScDocument& rDoc = pDocShell->GetDocument();
177  rDoc.BroadcastCells(rRange, SfxHintId::ScDataChanged);
178 }
179 
180 namespace {
181 
182 class SpanBroadcaster : public sc::ColumnSpanSet::ColumnAction
183 {
184  ScDocument& mrDoc;
185  SCTAB mnCurTab;
186  SCCOL mnCurCol;
187 
188 public:
189  explicit SpanBroadcaster( ScDocument& rDoc ) : mrDoc(rDoc), mnCurTab(-1), mnCurCol(-1) {}
190 
191  virtual void startColumn( ScColumn* pCol ) override
192  {
193  mnCurTab = pCol->GetTab();
194  mnCurCol = pCol->GetCol();
195  }
196 
197  virtual void execute( SCROW nRow1, SCROW nRow2, bool bVal ) override
198  {
199  if (!bVal)
200  return;
201 
202  ScRange aRange(mnCurCol, nRow1, mnCurTab, mnCurCol, nRow2, mnCurTab);
203  mrDoc.BroadcastCells(aRange, SfxHintId::ScDataChanged);
204  };
205 };
206 
207 }
208 
210 {
211  ScDocument& rDoc = pDocShell->GetDocument();
212  SpanBroadcaster aBroadcaster(rDoc);
213 
214  for (const auto& rEntry : rSpans)
215  {
216  const sc::ColumnSpanSet& rSet = *rEntry.second;
217  rSet.executeColumnAction(rDoc, aBroadcaster);
218  }
219 }
220 
222 {
224  if (pViewShell)
225  pViewShell->SetTabNo( nTab );
226 }
227 
228 void ScSimpleUndo::ShowTable( const ScRange& rRange )
229 {
231  if (pViewShell)
232  {
233  SCTAB nStart = rRange.aStart.Tab();
234  SCTAB nEnd = rRange.aEnd.Tab();
235  SCTAB nTab = pViewShell->GetViewData().GetTabNo();
236  if ( nTab < nStart || nTab > nEnd ) // if not in range:
237  pViewShell->SetTabNo( nStart ); // at beginning of the range
238  }
239 }
240 
242  ScBlockUndoMode eBlockMode ) :
243  ScSimpleUndo( pDocSh ),
244  aBlockRange( rRange ),
245  eMode( eBlockMode )
246 {
248 }
249 
251 {
252  pDrawUndo.reset();
253 }
254 
256 {
258  EnableDrawAdjust( &pDocShell->GetDocument(), false );
259 }
260 
262 {
263  if (eMode == SC_UNDO_AUTOHEIGHT)
264  AdjustHeight();
265 
268 
269  ShowBlock();
271 }
272 
274 {
275  if (eMode == SC_UNDO_AUTOHEIGHT)
276  AdjustHeight();
277 
278  ShowBlock();
280 }
281 
283 {
284  ScDocument& rDoc = pDocShell->GetDocument();
285 
287  Fraction aZoomX( 1, 1 );
288  Fraction aZoomY = aZoomX;
289  double nPPTX, nPPTY;
291  if (pViewShell)
292  {
293  ScViewData& rData = pViewShell->GetViewData();
294  nPPTX = rData.GetPPTX();
295  nPPTY = rData.GetPPTY();
296  aZoomX = rData.GetZoomX();
297  aZoomY = rData.GetZoomY();
298  }
299  else
300  {
301  // Leave zoom at 100
302  nPPTX = ScGlobal::nScreenPPTX;
303  nPPTY = ScGlobal::nScreenPPTY;
304  }
305 
306  sc::RowHeightContext aCxt(rDoc.MaxRow(), nPPTX, nPPTY, aZoomX, aZoomY, pVirtDev);
307  bool bRet = rDoc.SetOptimalHeight(
309 
310  if (bRet)
311  {
312  // tdf#76183: recalculate objects' positions
314 
316  rDoc.MaxCol(), rDoc.MaxRow(), aBlockRange.aEnd.Tab(),
318  }
319  return bRet;
320 }
321 
323 {
324  if ( IsPaintLocked() )
325  return;
326 
328  if (pViewShell)
329  {
330  ShowTable( aBlockRange ); // with multiple sheets in range each of them is good
332  SC_FOLLOW_JUMP, false, false );
333  SCTAB nTab = pViewShell->GetViewData().GetTabNo();
334  ScRange aRange = aBlockRange;
335  aRange.aStart.SetTab( nTab );
336  aRange.aEnd.SetTab( nTab );
337  pViewShell->MarkRange( aRange );
338 
339  // not through SetMarkArea to MarkData, due to possibly lacking paint
340  }
341 }
342 
344  ScDocShell* pDocSh, const ScRangeList& rRanges) :
345  ScSimpleUndo(pDocSh),
346  maBlockRanges(rRanges)
347 {
349 }
350 
352 {
353  mpDrawUndo.reset();
354 }
355 
357 {
360 }
361 
363 {
366 
367  ShowBlock();
369 }
370 
372 {
373  ShowBlock();
375 }
376 
378 {
379  if ( IsPaintLocked() )
380  return;
381 
383  if (!pViewShell)
384  return;
385 
386  if (maBlockRanges.empty())
387  return;
388 
389  // Move to the sheet of the first range.
390  ScRange aRange = maBlockRanges.front();
391  ShowTable(aRange);
392  pViewShell->MoveCursorAbs(
393  aRange.aStart.Col(), aRange.aStart.Row(), SC_FOLLOW_JUMP, false, false);
394  SCTAB nTab = pViewShell->GetViewData().GetTabNo();
395  aRange.aStart.SetTab(nTab);
396  aRange.aEnd.SetTab(nTab);
397  pViewShell->MarkRange(aRange, false);
398 
399  for (size_t i = 1, n = maBlockRanges.size(); i < n; ++i)
400  {
401  aRange = maBlockRanges[i];
402  aRange.aStart.SetTab(nTab);
403  aRange.aEnd.SetTab(nTab);
404  pViewShell->MarkRange(aRange, false, true);
405  }
406 }
407 
408 ScMoveUndo::ScMoveUndo( ScDocShell* pDocSh, ScDocumentUniquePtr pRefDoc, std::unique_ptr<ScRefUndoData> pRefData ) :
409  ScSimpleUndo( pDocSh ),
410  pRefUndoDoc( std::move(pRefDoc) ),
411  pRefUndoData( std::move(pRefData) )
412 {
413  ScDocument& rDoc = pDocShell->GetDocument();
414  if (pRefUndoData)
415  pRefUndoData->DeleteUnchanged(&rDoc);
416  pDrawUndo = GetSdrUndoAction( &rDoc );
417 }
418 
420 {
421  pRefUndoData.reset();
422  pRefUndoDoc.reset();
423  pDrawUndo.reset();
424 }
425 
427 {
428  ScDocument& rDoc = pDocShell->GetDocument();
429  ScRange aRange(0,0,0, rDoc.MaxCol(),rDoc.MaxRow(),pRefUndoDoc->GetTableCount()-1);
430  pRefUndoDoc->CopyToDocument(aRange, InsertDeleteFlags::FORMULA, false, rDoc, nullptr, false);
431  if (pRefUndoData)
432  pRefUndoData->DoUndo( &rDoc, false );
433 }
434 
436 {
438 
439  EnableDrawAdjust( &pDocShell->GetDocument(), false );
440 }
441 
443 {
444  DoSdrUndoAction( pDrawUndo.get(), &pDocShell->GetDocument() ); // must also be called when pointer is null
445 
446  if (pRefUndoDoc)
447  UndoRef();
448 
450 
452 }
453 
454 ScDBFuncUndo::ScDBFuncUndo( ScDocShell* pDocSh, const ScRange& rOriginal ) :
455  ScSimpleUndo( pDocSh ),
456  aOriginalRange( rOriginal )
457 {
458  pAutoDBRange = pDocSh->GetOldAutoDBRange();
459 }
460 
462 {
463  pAutoDBRange.reset();
464 }
465 
467 {
469  DoSdrUndoAction( nullptr, &pDocShell->GetDocument() );
470 }
471 
473 {
475 
476  if ( pAutoDBRange )
477  {
478  ScDocument& rDoc = pDocShell->GetDocument();
479  SCTAB nTab = rDoc.GetVisibleTab();
480  ScDBData* pNoNameData = rDoc.GetAnonymousDBData(nTab);
481  if (pNoNameData )
482  {
483  SCCOL nRangeX1;
484  SCROW nRangeY1;
485  SCCOL nRangeX2;
486  SCROW nRangeY2;
487  SCTAB nRangeTab;
488  pNoNameData->GetArea( nRangeTab, nRangeX1, nRangeY1, nRangeX2, nRangeY2 );
489  pDocShell->DBAreaDeleted( nRangeTab, nRangeX1, nRangeY1, nRangeX2 );
490 
491  *pNoNameData = *pAutoDBRange;
492 
493  if ( pAutoDBRange->HasAutoFilter() )
494  {
495  // restore AutoFilter buttons
496  pAutoDBRange->GetArea( nRangeTab, nRangeX1, nRangeY1, nRangeX2, nRangeY2 );
497  rDoc.ApplyFlagsTab( nRangeX1, nRangeY1, nRangeX2, nRangeY1, nRangeTab, ScMF::Auto );
498  pDocShell->PostPaint( nRangeX1, nRangeY1, nRangeTab, nRangeX2, nRangeY1, nRangeTab, PaintPartFlags::Grid );
499  }
500  }
501  }
502 }
503 
505 {
506  RedoSdrUndoAction( nullptr );
507  if ( pAutoDBRange )
508  {
509  // move the database range to this function's position again (see ScDocShell::GetDBData)
510 
511  ScDocument& rDoc = pDocShell->GetDocument();
512  ScDBData* pNoNameData = rDoc.GetAnonymousDBData(aOriginalRange.aStart.Tab());
513  if ( pNoNameData )
514  {
515 
516  SCCOL nRangeX1;
517  SCROW nRangeY1;
518  SCCOL nRangeX2;
519  SCROW nRangeY2;
520  SCTAB nRangeTab;
521  pNoNameData->GetArea( nRangeTab, nRangeX1, nRangeY1, nRangeX2, nRangeY2 );
522  pDocShell->DBAreaDeleted( nRangeTab, nRangeX1, nRangeY1, nRangeX2 );
523 
524  pNoNameData->SetSortParam( ScSortParam() );
525  pNoNameData->SetQueryParam( ScQueryParam() );
526  pNoNameData->SetSubTotalParam( ScSubTotalParam() );
527 
528  pNoNameData->SetArea( aOriginalRange.aStart.Tab(),
531 
532  pNoNameData->SetByRow( true );
533  pNoNameData->SetAutoFilter( false );
534  // header is always set with the operation in redo
535  }
536  }
537 
539 }
540 
542 {
544 }
545 
546 ScUndoWrapper::ScUndoWrapper( std::unique_ptr<SfxUndoAction> pUndo ) :
547  pWrappedUndo( std::move(pUndo) ),
548  mnViewShellId( -1 )
549 {
550  if (pWrappedUndo)
551  mnViewShellId = pWrappedUndo->GetViewShellId();
552 }
553 
555 {
556 }
557 
559 {
560  pWrappedUndo = nullptr; // don't delete in dtor - pointer must be stored outside
561 }
562 
564 {
565  if (pWrappedUndo)
566  return pWrappedUndo->GetComment();
567  return OUString();
568 }
569 
571 {
572  return mnViewShellId;
573 }
574 
576 {
577  if (pWrappedUndo)
578  return pWrappedUndo->GetRepeatComment(rTarget);
579  return OUString();
580 }
581 
583 {
584  if (pWrappedUndo)
585  return pWrappedUndo->Merge(pNextAction);
586  else
587  return false;
588 }
589 
591 {
592  if (pWrappedUndo)
593  pWrappedUndo->Undo();
594 }
595 
597 {
598  if (pWrappedUndo)
599  pWrappedUndo->Redo();
600 }
601 
603 {
604  if (pWrappedUndo)
605  pWrappedUndo->Repeat(rTarget);
606 }
607 
609 {
610  if (pWrappedUndo)
611  return pWrappedUndo->CanRepeat(rTarget);
612  else
613  return false;
614 }
615 
616 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SdrUndoAction > pDrawUndo
Definition: undobase.hxx:87
constexpr double nPPTY
ScRange aOriginalRange
Definition: undobase.hxx:123
void EndUndo()
Definition: undobase.cxx:472
ScSimpleUndo(const ScSimpleUndo &)=delete
ScAddress aStart
Definition: address.hxx:500
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< ScDBData > GetOldAutoDBRange()
Definition: docsh5.cxx:364
SC_DLLPUBLIC ScDBData * GetAnonymousDBData(SCTAB nTab)
Definition: document.cxx:306
void SetSortParam(const ScSortParam &rSortParam)
Definition: dbdata.cxx:399
SCROW Row() const
Definition: address.hxx:262
std::unique_ptr< SdrUndoAction > GetSdrUndoAction(ScDocument *pDoc)
Definition: undoolk.cxx:26
ViewShellId GetViewShellId() const override
See SfxUndoAction::GetViewShellId().
Definition: undobase.cxx:570
const Fraction & GetZoomX() const
Definition: viewdata.hxx:459
void MarkRange(const ScRange &rRange, bool bSetCursor=true, bool bContinue=false)
Definition: tabview3.cxx:1675
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
Definition: documen9.cxx:193
ViewShellId mnViewShellId
Definition: undobase.hxx:51
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5014
sal_Int64 n
void SetDocumentModified()
Definition: docsh.cxx:2819
virtual void Repeat(SfxRepeatTarget &rTarget) override
Definition: undobase.cxx:602
virtual bool Merge(SfxUndoAction *pNextAction) override
Definition: undobase.cxx:65
const ContentProperties & rData
double GetPPTX() const
Definition: viewdata.hxx:468
ScBlockUndo(ScDocShell *pDocSh, const ScRange &rRange, ScBlockUndoMode eBlockMode)
Definition: undobase.cxx:241
std::unique_ptr< SdrUndoAction > pDrawUndo
Definition: undobase.hxx:143
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
void BeginUndo()
Definition: undobase.cxx:255
ScAddress aEnd
Definition: address.hxx:501
std::unique_ptr< SfxUndoAction > ReleaseDrawUndo()
Definition: undodraw.hxx:40
bool SetViewMarkData(const ScMarkData &rMarkData)
Definition: undobase.cxx:52
void EndUndo()
Definition: undobase.cxx:122
virtual ~ScUndoWrapper() override
Definition: undobase.cxx:554
static void ShowTable(SCTAB nTab)
Definition: undobase.cxx:221
SC_DLLPUBLIC void MoveCursorAbs(SCCOL nCurX, SCROW nCurY, ScFollowMode eMode, bool bShift, bool bControl, bool bKeepOld=false, bool bKeepSel=false)
Definition: tabview3.cxx:1178
ScMultiBlockUndo(ScDocShell *pDocSh, const ScRangeList &rRanges)
Definition: undobase.cxx:343
ScRange aBlockRange
Definition: undobase.hxx:86
void UpdateAutoFillMark(bool bFromPaste=false)
Definition: tabview3.cxx:183
bool AdjustHeight()
Definition: undobase.cxx:282
void EndUndo()
Definition: undobase.cxx:442
std::unique_ptr< SfxUndoAction > pDetectiveUndo
Definition: undobase.hxx:50
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:876
void RedoSdrUndoAction(SdrUndoAction *pUndoAction)
Definition: undoolk.cxx:61
Mode eMode
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
Definition: tabvwsha.cxx:632
SCTAB Tab() const
Definition: address.hxx:271
SC_DLLPUBLIC void SetQueryParam(const ScQueryParam &rQueryParam)
Definition: dbdata.cxx:423
std::unique_ptr< SfxUndoAction > pWrappedUndo
Definition: undobase.hxx:158
const Fraction & GetZoomY() const
Definition: viewdata.hxx:460
ScViewData & GetViewData()
Definition: tabview.hxx:332
bool empty() const
Definition: rangelst.hxx:89
constexpr double nPPTX
void SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: dbdata.cxx:323
void executeColumnAction(ScDocument &rDoc, ColumnAction &ac) const
void BeginUndo()
Definition: undobase.cxx:466
void SetTab(SCTAB nTabP)
Definition: address.hxx:283
void BeginRedo()
Definition: undobase.cxx:142
virtual void Redo() override
Definition: undobase.cxx:596
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:875
ScBlockUndoMode
Definition: undobase.hxx:76
void DBAreaDeleted(SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2)
Definition: docsh5.cxx:104
int i
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2618
sal_Int16 SCCOL
Definition: types.hxx:22
static SC_DLLPUBLIC double nScreenPPTY
Vertical pixel per twips factor.
Definition: global.hxx:582
ScDocShell * pDocShell
Definition: undobase.hxx:48
SC_DLLPUBLIC bool SetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
Definition: document.cxx:4268
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
Definition: tabview3.cxx:1786
size_t size() const
Definition: rangelst.hxx:90
ViewShellId mnViewShellId
Definition: undobase.hxx:159
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
void DoSdrUndoAction(SdrUndoAction *pUndoAction, ScDocument *pDoc)
Definition: undoolk.cxx:35
ScDocumentUniquePtr pRefUndoDoc
Definition: undobase.hxx:144
ViewShellId GetViewShellId() const override
See SfxUndoAction::GetViewShellId().
Definition: undobase.cxx:47
void EndRedo()
Definition: undobase.cxx:541
PDFDocument & m_rDoc
ScBlockUndoMode eMode
Definition: undobase.hxx:88
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
Definition: docsh3.cxx:99
void GetArea(SCTAB &rTab, SCCOL &rCol1, SCROW &rRow1, SCCOL &rCol2, SCROW &rRow2) const
Definition: dbdata.cxx:301
ScMoveUndo(ScDocShell *pDocSh, ScDocumentUniquePtr pRefDoc, std::unique_ptr< ScRefUndoData > pRefData)
Definition: undobase.cxx:408
void BroadcastCells(const ScRange &rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters=true)
Definition: documen7.cxx:143
SCCOL Col() const
Definition: address.hxx:267
void SetByRow(bool bByR)
Definition: dbdata.hxx:129
ScDBFuncUndo(ScDocShell *pDocSh, const ScRange &rOriginal)
Definition: undobase.cxx:454
bool IsPaintLocked() const
Definition: undobase.hxx:53
void BeginUndo()
Definition: undobase.cxx:435
void ShowBlock()
Definition: undobase.cxx:322
void SetInUndo(bool bSet)
Definition: docsh.cxx:2914
sal_Int32 SCROW
Definition: types.hxx:18
virtual OUString GetComment() const override
Definition: undobase.cxx:563
double GetPPTY() const
Definition: viewdata.hxx:469
void HideAllCursors()
Definition: tabview3.cxx:215
virtual OUString GetRepeatComment(SfxRepeatTarget &) const override
Definition: undobase.cxx:575
static ScTabViewShell * GetActiveViewShell()
Definition: tabvwsh4.cxx:1023
std::map< SCTAB, std::unique_ptr< sc::ColumnSpanSet > > DataSpansType
Definition: undobase.hxx:39
SCCOL GetCol() const
Definition: column.hxx:184
virtual ~ScMultiBlockUndo() override
Definition: undobase.cxx:351
ScRangeList maBlockRanges
Definition: undobase.hxx:106
virtual bool Merge(SfxUndoAction *pNextAction) override
Definition: undobase.cxx:582
virtual ~ScDBFuncUndo() override
Definition: undobase.cxx:461
void EndUndo()
Definition: undobase.cxx:261
std::unique_ptr< SdrUndoAction > mpDrawUndo
Definition: undobase.hxx:107
static SC_DLLPUBLIC double nScreenPPTX
Horizontal pixel per twips factor.
Definition: global.hxx:580
std::unique_ptr< ScDBData > pAutoDBRange
Definition: undobase.hxx:122
const ScDocument & GetDocument() const
Definition: docsh.hxx:216
void EndRedo()
Definition: undobase.cxx:273
std::unique_ptr< ScRefUndoData > pRefUndoData
Definition: undobase.hxx:145
void UndoRef()
Definition: undobase.cxx:426
void BroadcastChanges(const ScRange &rRange)
Definition: undobase.cxx:174
void SetSubTotalParam(const ScSubTotalParam &rSubTotalParam)
Definition: dbdata.cxx:461
ScRange & front()
Definition: rangelst.hxx:93
SCTAB GetTab() const
Definition: column.hxx:183
void ForgetWrappedUndo()
Definition: undobase.cxx:558
virtual ~ScBlockUndo() override
Definition: undobase.cxx:250
void BeginRedo()
Definition: undobase.cxx:504
ScUndoWrapper(std::unique_ptr< SfxUndoAction > pUndo)
Definition: undobase.cxx:546
SCTAB GetVisibleTab() const
Definition: document.hxx:862
SC_DLLPUBLIC void EnableUndo(bool bVal)
Definition: document.cxx:6472
virtual void execute(SCROW nRow1, SCROW nRow2, bool bVal)=0
void EndRedo()
Definition: undobase.cxx:151
virtual ~ScMoveUndo() override
Definition: undobase.cxx:419
virtual void startColumn(ScColumn *pCol)=0
void EnableDrawAdjust(ScDocument *pDoc, bool bEnable)
Definition: undoolk.cxx:68
virtual void Undo() override
Definition: undobase.cxx:590
sal_Int16 SCTAB
Definition: types.hxx:23
void SetAutoFilter(bool bSet)
Definition: dbdata.hxx:205
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
Definition: undobase.cxx:608
void BeginUndo()
Definition: undobase.cxx:87
void ShowAllCursors()
Definition: tabview3.cxx:229
void SetMarkData(const ScMarkData &rNew)
Definition: tabview3.cxx:1725