LibreOffice Module sc (master) 1
chgtrack.hxx
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#pragma once
21
22#include <map>
23#include <memory>
24#include <set>
25#include <stack>
26#include <vector>
27
28#include <com/sun/star/uno/Sequence.hxx>
29#include <tools/color.hxx>
30#include <tools/datetime.hxx>
31#include <tools/link.hxx>
32#include <tools/solar.h>
33#include <unotools/options.hxx>
34#include <optional>
35#include "global.hxx"
36#include "bigrange.hxx"
37#include "scdllapi.h"
38#include "cellvalue.hxx"
39
40class ScDocument;
41class ScFormulaCell;
42class ScChangeAction;
43class ScChangeTrack;
44class ScAppOptions;
45namespace tools { class JsonWriter; }
46
48{
49private:
51 const std::set<OUString>& rUsers;
52 OUString aLastUserName;
53 sal_uInt16 nLastUserIndex;
55
56public:
57 ScActionColorChanger( const ScChangeTrack& rTrack );
58 void Update( const ScChangeAction& rAction );
59 Color GetColor() const { return nColor; }
60};
61
63{
74};
75
77{
81};
82
84{
88};
89
103{
106
111
112public:
113
115 ScChangeActionLinkEntry** ppPrevP,
116 ScChangeAction* pActionP )
117 : pNext( *ppPrevP ),
118 ppPrev( ppPrevP ),
119 pAction( pActionP ),
120 pLink( nullptr )
121 {
122 if ( pNext )
123 pNext->ppPrev = &pNext;
124 *ppPrevP = this;
125 }
126
128 {
130 UnLink();
131 Remove();
132 if ( p )
133 delete p;
134 }
135
137 {
138 UnLink();
139 if ( pLinkP )
140 {
141 pLink = pLinkP;
142 pLinkP->pLink = this;
143 }
144 }
145
146 void UnLink()
147 {
148 if ( pLink )
149 {
150 pLink->pLink = nullptr;
151 pLink = nullptr;
152 }
153 }
154
155 void Remove()
156 {
157 if ( ppPrev )
158 {
159 if ( ( *ppPrev = pNext ) != nullptr )
161 ppPrev = nullptr; // not inserted
162 }
163 }
164
165 const ScChangeActionLinkEntry* GetNext() const { return pNext; }
167 const ScChangeAction* GetAction() const { return pAction; }
169};
170
171// ScChangeActionCellListEntry
172// this is only for the XML Export in the hxx
174
175class SAL_DLLPUBLIC_RTTI ScChangeAction
176{
177 friend class ScChangeTrack;
178 friend class ScChangeActionIns;
179 friend class ScChangeActionDel;
180 friend class ScChangeActionMove;
182
183 ScChangeAction( const ScChangeAction& ) = delete;
185
186protected:
187
188 ScBigRange aBigRange; // Ins/Del/MoveTo/ContentPos
190 OUString aUser; // who?
191 OUString aComment; // user comment
192 ScChangeAction* pNext; // next in linked list
193 ScChangeAction* pPrev; // previous in linked list
195 ScChangeActionLinkEntry* pLinkDeletedIn; // access to insert areas which were
196 // deleted or moved or rejected
203
205
206 // only to be used in the XML import
208 ScBigRange ,
209 const sal_uLong nAction,
212 const DateTime& aDateTime,
213 OUString aUser,
214 OUString aComment );
215
216 // only to be used in the XML import
218
219 OUString GetRefString(
220 const ScBigRange& rRange, const ScDocument& rDoc, bool bFlag3D = false) const;
221
224 void SetUser( const OUString& r );
227 void SetRejected();
228
230
232 {
235 &pLinkAny, p );
236 pLnk->SetLink( pL );
237 }
238
240 { return pLinkDeletedIn; }
242 { return &pLinkDeletedIn; }
243 bool RemoveDeletedIn( const ScChangeAction* );
245
247 {
249 }
250
252 {
254 }
255
256 void RemoveAllDependent();
257
258 void RemoveAllLinks();
259
260 virtual void AddContent( ScChangeActionContent* ) = 0;
261 virtual void DeleteCellEntries() = 0;
262
263 virtual void UpdateReference( const ScChangeTrack*,
265 sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz );
266
267 void Accept();
268 virtual bool Reject(ScDocument& rDoc) = 0;
270
271 // used in Reject() instead of IsRejectable()
272 bool IsInternalRejectable() const;
273
274 // Derived classes that hold a pointer to the
275 // ChangeTrack must return that. Otherwise NULL.
276 virtual const ScChangeTrack* GetChangeTrack() const = 0;
277
278public:
279 virtual ~ScChangeAction();
280
281 bool IsInsertType() const;
282 bool IsDeleteType() const;
283 bool IsVirgin() const;
284 SC_DLLPUBLIC bool IsAccepted() const;
285 bool IsRejected() const;
286
287 // Action rejects another Action
288 bool IsRejecting() const;
289
290 // if action is visible in the document
291 bool IsVisible() const;
292
293 // if action if touchable
294 bool IsTouchable() const;
295
296 // if action is an entry in dialog root
297 bool IsDialogRoot() const;
298
299 // if an entry in a dialog shall be a drop down entry
300 bool IsDialogParent() const;
301
302 // if action is a delete with subdeletes (aufgeklappt = open ?)
303 bool IsMasterDelete() const;
304
305 // if action is acceptable/selectable/rejectable
306 bool IsClickable() const;
307
308 // if action is rejectable
309 bool IsRejectable() const;
310
311 const ScBigRange& GetBigRange() const { return aBigRange; }
312 SC_DLLPUBLIC DateTime GetDateTime() const; // local time
313 const DateTime& GetDateTimeUTC() const // UTC time
314 { return aDateTime; }
315 ScChangeActionType GetType() const { return eType; }
319
320 ScChangeAction* GetNext() const { return pNext; }
321 ScChangeAction* GetPrev() const { return pPrev; }
322
323 bool IsDeletedIn() const;
324 bool IsDeletedIn( const ScChangeAction* ) const;
326 void RemoveAllDeletedIn();
327
329 { return pLinkDeleted; }
331 { return pLinkDependent; }
332 bool HasDependent() const;
333 bool HasDeleted() const;
334 // description will be appended to string
335 // with bSplitRange only one column/row will be considered for delete
336 // (for a listing of entries)
337 virtual OUString GetDescription(
338 ScDocument& rDoc, bool bSplitRange = false, bool bWarning = true ) const;
339
340 virtual OUString GetRefString( ScDocument& rDoc, bool bFlag3D = false ) const;
341
342 // for DocumentMerge set old date of the other
343 // action, fetched by GetDateTimeUTC
344 void SetDateTimeUTC( const DateTime& rDT )
345 { aDateTime = rDT; }
346
347 const OUString& GetUser() const { return aUser;}
348 const OUString& GetComment() const { return aComment;}
349
350 // set user comment
351 void SetComment( const OUString& rStr );
352
353 // only to be used in the XML import
354 void SetDeletedInThis( sal_uLong nActionNumber,
355 const ScChangeTrack* pTrack );
356 // only to be used in the XML import
357 void AddDependent( sal_uLong nActionNumber,
358 const ScChangeTrack* pTrack );
359};
360
361// ScChangeActionIns
362class SAL_DLLPUBLIC_RTTI ScChangeActionIns final : public ScChangeAction
363{
364 friend class ScChangeTrack;
365
367
368 ScChangeActionIns( const ScDocument* pDoc, const ScRange& rRange, bool bEndOfList = false );
369
370 virtual void AddContent( ScChangeActionContent* ) override {}
371 virtual void DeleteCellEntries() override {}
372
373 virtual bool Reject(ScDocument& rDoc) override;
374
375 virtual const ScChangeTrack* GetChangeTrack() const override { return nullptr; }
376
377public:
378 virtual ~ScChangeActionIns() override;
380 const sal_uLong nActionNumber,
381 const ScChangeActionState eState,
382 const sal_uLong nRejectingNumber,
383 const ScBigRange& aBigRange,
384 const OUString& aUser,
385 const DateTime& aDateTime,
386 const OUString &sComment,
387 const ScChangeActionType eType,
388 bool bEndOfList = false );
389
390 virtual OUString GetDescription(
391 ScDocument& rDoc, bool bSplitRange = false, bool bWarning = true) const override;
392
393 SC_DLLPUBLIC bool IsEndOfList() const;
394};
395
396// ScChangeActionDel
397class SAL_DLLPUBLIC_RTTI ScChangeActionMove;
398
400{
401 friend class ScChangeActionDel;
402 friend class ScChangeTrack;
403
406
409 ScChangeActionMove* pMove,
410 short nFrom, short nTo );
411
412 inline ScChangeActionMove* GetMove();
413
414public:
416 {
417 return static_cast<const ScChangeActionDelMoveEntry*>(
419 }
420 inline const ScChangeActionMove* GetMove() const;
421 short GetCutOffFrom() const { return nCutOffFrom; }
422 short GetCutOffTo() const { return nCutOffTo; }
423};
424
426{
427 friend class ScChangeTrack;
429
431 std::vector<ScChangeActionContent*> mvCells;
433 short nCutOff; // +: start -: end
437
438 ScChangeActionDel( const ScDocument* pDoc, const ScRange& rRange, SCCOL nDx, SCROW nDy, ScChangeTrack* );
439
440 virtual void AddContent( ScChangeActionContent* ) override;
441 virtual void DeleteCellEntries() override;
442
443 void UndoCutOffMoves();
444 void UndoCutOffInsert();
445
446 virtual void UpdateReference( const ScChangeTrack*,
448 sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz ) override;
449
450 virtual bool Reject(ScDocument& rDoc) override;
451
452 virtual const ScChangeTrack* GetChangeTrack() const override { return pTrack; }
453
454public:
456 const sal_uLong nActionNumber, const ScChangeActionState eState,
457 const sal_uLong nRejectingNumber, const ScBigRange& aBigRange,
458 const OUString& aUser, const DateTime& aDateTime,
459 const OUString &sComment, const ScChangeActionType eType,
460 const SCCOLROW nD, ScChangeTrack* pTrack); // only to use in the XML import
461 // which of nDx and nDy is set is dependent on the type
462 virtual ~ScChangeActionDel() override;
463
464 // is the last in a row (or single)
465 bool IsBaseDelete() const;
466
467 // is the first in a row (or single)
468 bool IsTopDelete() const;
469
470 // is part of a row
471 bool IsMultiDelete() const;
472
473 // is col, belonging to a TabDelete
474 bool IsTabDeleteCol() const;
475
476 SCCOL GetDx() const { return nDx; }
477 SCROW GetDy() const { return nDy; }
478 ScBigRange GetOverAllRange() const; // BigRange + (nDx, nDy)
479
481 { return pLinkMove; }
482 const ScChangeActionIns* GetCutOffInsert() const { return pCutOff; }
483 short GetCutOffCount() const { return nCutOff; }
484
485 virtual OUString GetDescription(
486 ScDocument& rDoc, bool bSplitRange = false, bool bWarning = true ) const override;
487
489 { pCutOff = p; nCutOff = n; } // only to use in the XML import
490 // this should be protected, but for the XML import it is public
491 // only to use in the XML import
492 // this should be protected, but for the XML import it is public
494 ScChangeActionMove* pMove, short nFrom, short nTo );
495};
496
497// ScChangeActionMove
499{
500 friend class ScChangeTrack;
501 friend struct std::default_delete<ScChangeActionMove>; // for std::unique_ptr
502 friend class ScChangeActionDel;
503
506 std::vector<ScChangeActionContent*> mvCells;
507 sal_uLong nStartLastCut; // for PasteCut undo
509
510 ScChangeActionMove( const ScRange& rFromRange,
511 const ScRange& rToRange,
512 ScChangeTrack* pTrackP )
513 : ScChangeAction( SC_CAT_MOVE, rToRange ),
514 aFromRange( rFromRange ),
515 pTrack( pTrackP ),
516 nStartLastCut(0),
517 nEndLastCut(0)
518 {}
519 virtual ~ScChangeActionMove() override;
520
521 virtual void AddContent( ScChangeActionContent* ) override;
522 virtual void DeleteCellEntries() override;
523
525
526 void SetStartLastCut( sal_uLong nVal ) { nStartLastCut = nVal; }
528 void SetEndLastCut( sal_uLong nVal ) { nEndLastCut = nVal; }
530
531 virtual void UpdateReference( const ScChangeTrack*,
533 sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz ) override;
534
535 virtual bool Reject(ScDocument& rDoc) override;
536
537 virtual const ScChangeTrack* GetChangeTrack() const override { return pTrack; }
538
539protected:
541
542public:
543 ScChangeActionMove(const sal_uLong nActionNumber,
545 const sal_uLong nRejectingNumber,
546 const ScBigRange& aToBigRange,
547 const OUString& aUser,
548 const DateTime& aDateTime,
549 const OUString &sComment,
550 ScBigRange aFromBigRange,
551 ScChangeTrack* pTrack); // only to use in the XML import
552
553 const ScBigRange& GetFromRange() const { return aFromRange; }
554 SC_DLLPUBLIC void GetDelta( sal_Int32& nDx, sal_Int32& nDy, sal_Int32& nDz ) const;
555
556 virtual OUString GetDescription(
557 ScDocument& rDoc, bool bSplitRange = false, bool bWarning = true ) const override;
558
559 virtual OUString GetRefString( ScDocument& rDoc, bool bFlag3D = false ) const override;
560};
561
564 ScChangeActionMove* pMove,
565 short nFrom, short nTo )
567 reinterpret_cast<ScChangeActionLinkEntry**>(
568 ppPrevP),
569 static_cast<ScChangeAction*>(pMove) ),
570 nCutOffFrom( nFrom ),
571 nCutOffTo( nTo )
572{}
573
575 {
576 return static_cast<ScChangeActionMove*>(
578 }
579
581 {
582 return static_cast<const ScChangeActionMove*>(
584 }
585// ScChangeActionContent
587{
593
594class SAL_DLLPUBLIC_RTTI ScChangeActionContent final : public ScChangeAction
595{
596 friend class ScChangeTrack;
597
600
601 OUString maOldValue;
602 OUString maNewValue;
603 ScChangeActionContent* pNextContent; // at the same position
605 ScChangeActionContent* pNextInSlot; // in the same slot
607
609 {
610 if ( !ppPrevInSlot )
611 {
612 ppPrevInSlot = pp;
613 if ( ( pNextInSlot = *pp ) != nullptr )
614 pNextInSlot->ppPrevInSlot = &pNextInSlot;
615 *pp = this;
616 }
617 }
618
620 {
621 if ( ppPrevInSlot )
622 {
623 if ( ( *ppPrevInSlot = pNextInSlot ) != nullptr )
624 pNextInSlot->ppPrevInSlot = ppPrevInSlot;
625 ppPrevInSlot = nullptr; // not inserted
626 }
627 }
628
629 ScChangeActionContent* GetNextInSlot() { return pNextInSlot; }
630
631 void ClearTrack();
632
633 static OUString GetStringOfCell(
634 const ScCellValue& rCell, const ScDocument* pDoc, const ScAddress& rPos );
635
636 static OUString GetStringOfCell(
637 const ScCellValue& rCell, const ScDocument* pDoc, sal_uLong nFormat );
638
639 static void SetValue( OUString& rStr, ScCellValue& rCell, const ScAddress& rPos,
640 const ScCellValue& rOrgCell, const ScDocument* pFromDoc,
641 ScDocument* pToDoc );
642
643 static void SetValue( OUString& rStr, ScCellValue& rCell, sal_uLong nFormat,
644 const ScCellValue& rOrgCell, const ScDocument* pFromDoc,
645 ScDocument* pToDoc );
646
647 static void SetCell( OUString& rStr, ScCellValue& rCell, sal_uLong nFormat, const ScDocument* pDoc );
648
649 static bool NeedsNumberFormat( const ScCellValue& rVal );
650
651 void SetValueString( OUString& rValue, ScCellValue& rCell, const OUString& rStr, ScDocument* pDoc );
652
653 OUString GetValueString( const OUString& rValue, const ScCellValue& rCell,
654 const ScDocument* pDoc ) const;
655
656 OUString GetFormulaString( const ScFormulaCell* pCell ) const;
657
658 virtual void AddContent( ScChangeActionContent* ) override {}
659 virtual void DeleteCellEntries() override {}
660
661 virtual void UpdateReference( const ScChangeTrack*,
663 sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz ) override;
664
665 virtual bool Reject(ScDocument& rDoc) override;
666
667 virtual const ScChangeTrack* GetChangeTrack() const override { return nullptr; }
668
669 // pRejectActions!=NULL: reject actions get
670 // stacked, no SetNewValue, no Append
672 bool bOldest, ::std::stack<ScChangeActionContent*>* pRejectActions );
673
674 void PutValueToDoc(
675 const ScCellValue& rCell, const OUString& rValue, ScDocument* pDoc, SCCOL nDx, SCROW nDy ) const;
676
677protected:
679
680public:
681 ScChangeActionContent( const ScRange& rRange );
682
684 const sal_uLong nActionNumber, const ScChangeActionState eState,
685 const sal_uLong nRejectingNumber, const ScBigRange& aBigRange,
686 const OUString& aUser, const DateTime& aDateTime,
687 const OUString &sComment, ScCellValue aOldCell,
688 const ScDocument* pDoc, const OUString& sOldValue ); // to use for XML Import
689
691 const sal_uLong nActionNumber, ScCellValue aNewCell,
692 const ScBigRange& aBigRange, const ScDocument* pDoc,
693 const OUString& sNewValue ); // to use for XML Import of Generated Actions
694
695 virtual ~ScChangeActionContent() override;
696
697 ScChangeActionContent* GetNextContent() const { return pNextContent; }
698 ScChangeActionContent* GetPrevContent() const { return pPrevContent; }
699 ScChangeActionContent* GetTopContent() const;
700 bool IsTopContent() const { return pNextContent == nullptr; }
701
702 virtual ScChangeActionLinkEntry* GetDeletedIn() const override;
703 virtual ScChangeActionLinkEntry** GetDeletedInAddress() override;
704
705 void PutOldValueToDoc( ScDocument*,
706 SCCOL nDx, SCROW nDy ) const;
707 void PutNewValueToDoc( ScDocument*,
708 SCCOL nDx, SCROW nDy ) const;
709
710 void SetOldValue( const ScCellValue& rCell, const ScDocument* pFromDoc, ScDocument* pToDoc, sal_uLong nFormat );
711
712 void SetOldValue( const ScCellValue& rCell, const ScDocument* pFromDoc, ScDocument* pToDoc );
713
714 void SetNewValue( const ScCellValue& rCell, ScDocument* pDoc );
715
716 // Used in import filter AppendContentOnTheFly,
717 void SetOldNewCells(
718 const ScCellValue& rOldCell, sal_uLong nOldFormat,
719 const ScCellValue& rNewCell, sal_uLong nNewFormat, const ScDocument* pDoc );
720
721 // Use this only in the XML import,
722 // takes ownership of cell.
723 void SetNewCell(
724 const ScCellValue& rCell, const ScDocument* pDoc, const OUString& rFormatted );
725
726 // These functions should be protected but for
727 // the XML import they are public.
729 { pNextContent = p; }
731 { pPrevContent = p; }
732
733 // don't use:
734 // assigns string / creates formula cell
735 void SetOldValue( const OUString& rOld, ScDocument* pDoc );
736
737 OUString GetOldString( const ScDocument* pDoc ) const;
738 OUString GetNewString( const ScDocument* pDoc ) const;
739 const ScCellValue& GetOldCell() const { return maOldCell;}
740 const ScCellValue& GetNewCell() const { return maNewCell;}
741 virtual OUString GetDescription(
742 ScDocument& rDoc, bool bSplitRange = false, bool bWarning = true ) const override;
743
744 virtual OUString GetRefString( ScDocument& rDoc, bool bFlag3D = false ) const override;
745
746 static ScChangeActionContentCellType GetContentCellType( const ScCellValue& rCell );
747 static ScChangeActionContentCellType GetContentCellType( const ScRefCellValue& rIter );
748
749 // NewCell
750 bool IsMatrixOrigin() const;
751 // OldCell
752 bool IsOldMatrixReference() const;
753};
754
755// ScChangeActionReject
757{
758 friend class ScChangeTrack;
760
761 virtual void AddContent( ScChangeActionContent* ) override {}
762 virtual void DeleteCellEntries() override {}
763
764 virtual bool Reject(ScDocument& rDoc) override;
765
766 virtual const ScChangeTrack* GetChangeTrack() const override { return nullptr; }
767
768public:
769 ScChangeActionReject(const sal_uLong nActionNumber,
771 const sal_uLong nRejectingNumber,
772 const ScBigRange& aBigRange,
773 const OUString& aUser,
774 const DateTime& aDateTime,
775 const OUString &sComment); // only to use in the XML import
776};
777
778// ScChangeTrack
780{
781 NONE,
782 Append, // Actions appended
783 Remove, // Actions removed
784 Change, // Actions changed
785 Parent // became a parent (and wasn't before)
786};
787
789{
793};
794
795// MsgQueue for notification via ModifiedLink
796typedef std::vector<ScChangeTrackMsgInfo> ScChangeTrackMsgQueue;
797typedef std::vector<ScChangeTrackMsgInfo> ScChangeTrackMsgStack;
798typedef std::map<sal_uLong, ScChangeAction*> ScChangeActionMap;
799
801{
808
809// Internally generated actions start at this value (nearly all bits set)
810// and are decremented, to keep values in a table separated from "normal" actions.
811#define SC_CHGTRACK_GENERATED_START (sal_uInt32(0xfffffff0))
812
813class SAL_DLLPUBLIC_RTTI ScChangeTrack final : public utl::ConfigurationListener
814{
820
823
824 css::uno::Sequence< sal_Int8 > aProtectPass;
831 std::set<OUString> maUserCollection;
832 OUString maUser;
839 std::unique_ptr<ScChangeActionContent*[]> ppContentSlots;
840 std::unique_ptr<ScChangeActionMove> pLastCutMove;
845 std::optional<ScChangeTrackMsgInfo> xBlockModifyMsg;
854 bool bInDelete:1;
860
861 ScChangeTrack( const ScChangeTrack& ) = delete;
863
864 SCROW InitContentRowsPerSlot();
865
866 // true if one is ScMatrixMode::Formula and the other is
867 // not, or if both are and range differs
868 static bool IsMatrixFormulaRangeDifferent(
869 const ScCellValue& rOldCell, const ScCellValue& rNewCell );
870
871 void Init();
872 void DtorClear();
873 void SetInDeleteRange( const ScRange& rRange )
874 { aInDeleteRange = rRange; }
875 void SetInDelete( bool bVal )
876 { bInDelete = bVal; }
877 void SetInDeleteTop( bool bVal )
878 { bInDeleteTop = bVal; }
879 void SetInDeleteUndo( bool bVal )
880 { bInDeleteUndo = bVal; }
881 void SetInPasteCut( bool bVal )
882 { bInPasteCut = bVal; }
884 { eMergeState = eState; }
885 ScChangeTrackMergeState GetMergeState() const { return eMergeState; }
886 void SetLastMerge( sal_uLong nVal ) { nLastMerge = nVal; }
887 sal_uLong GetLastMerge() const { return nLastMerge; }
888
889 void SetLastCutMoveRange( const ScRange&, ScDocument* );
890
891 // create block of ModifyMsg
892 void StartBlockModify( ScChangeTrackMsgType,
893 sal_uLong nStartAction );
894 void EndBlockModify( sal_uLong nEndAction );
895
896 void AddDependentWithNotify( ScChangeAction* pParent,
897 ScChangeAction* pDependent );
898
899 void Dependencies( ScChangeAction* );
900 void UpdateReference( ScChangeAction*, bool bUndo );
901 void UpdateReference( ScChangeAction** ppFirstAction, ScChangeAction* pAct, bool bUndo );
902 void Append( ScChangeAction* pAppend, sal_uLong nAction );
903 SC_DLLPUBLIC void AppendDeleteRange( const ScRange&,
904 ScDocument* pRefDoc, SCTAB nDz,
905 sal_uLong nRejectingInsert );
906 void AppendOneDeleteRange( const ScRange& rOrgRange,
907 ScDocument* pRefDoc,
908 SCCOL nDx, SCROW nDy, SCTAB nDz,
909 sal_uLong nRejectingInsert );
910 void LookUpContents( const ScRange& rOrgRange,
911 ScDocument* pRefDoc,
912 SCCOL nDx, SCROW nDy, SCTAB nDz );
913 void Remove( ScChangeAction* );
914 void MasterLinks( ScChangeAction* );
915
916 // Content on top at Position
917 ScChangeActionContent* SearchContentAt( const ScBigAddress&,
918 const ScChangeAction* pButNotThis ) const;
919 void DeleteGeneratedDelContent(
921
922 ScChangeActionContent* GenerateDelContent(
923 const ScAddress& rPos, const ScCellValue& rCell, const ScDocument* pFromDoc );
924
925 void DeleteCellEntries(
926 std::vector<ScChangeActionContent*>&,
927 const ScChangeAction* pDeletor );
928
929 // Reject action and all dependent actions,
930 // Table stems from previous GetDependents,
931 // only needed for Insert and Move (MasterType),
932 // is NULL otherwise.
933 // bRecursion == called from reject with table
934 bool Reject( ScChangeAction*, ScChangeActionMap*, bool bRecursion );
935
936 bool IsLastAction( sal_uLong nNum ) const;
937
938 void ClearMsgQueue();
939 virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
940
941public:
942
943 SCSIZE ComputeContentSlot( sal_Int32 nRow ) const;
944
946 ScChangeTrack(ScDocument& rDocP, std::set<OUString>&& aTempUserCollection); // only to use in the XML import
947 SC_DLLPUBLIC virtual ~ScChangeTrack() override;
948 void Clear();
949
950 ScChangeActionContent* GetFirstGenerated() const { return pFirstGeneratedDelContent; }
951 ScChangeAction* GetFirst() const { return pFirst; }
952 ScChangeAction* GetLast() const { return pLast; }
953 sal_uLong GetActionMax() const { return nActionMax; }
954 bool IsGenerated( sal_uLong nAction ) const;
955 SC_DLLPUBLIC ScChangeAction* GetAction( sal_uLong nAction ) const;
956 ScChangeAction* GetGenerated( sal_uLong nGenerated ) const;
957 ScChangeAction* GetActionOrGenerated( sal_uLong nAction ) const;
958 sal_uLong GetLastSavedActionNumber() const;
959 void SetLastSavedActionNumber(sal_uLong nNew);
960 ScChangeAction* GetLastSaved() const;
961 ScChangeActionContent** GetContentSlots() const { return ppContentSlots.get(); }
962
964 { return aInDeleteRange; }
965 bool IsInDelete() const { return bInDelete; }
966 bool IsInDeleteTop() const { return bInDeleteTop; }
967 bool IsInDeleteUndo() const { return bInDeleteUndo; }
968 bool IsInPasteCut() const { return bInPasteCut; }
969 SC_DLLPUBLIC void SetUser( const OUString& rUser );
970 const OUString& GetUser() const { return maUser;}
971 const std::set<OUString>& GetUserCollection() const { return maUserCollection;}
972 ScDocument& GetDocument() const { return rDoc; }
973 // for import filter
974 const DateTime& GetFixDateTime() const { return aFixDateTime; }
975
976 // set this if the date/time set with
977 // SetFixDateTime...() shall be applied to
978 // appended actions
979 void SetUseFixDateTime( bool bVal )
980 { bUseFixDateTime = bVal; }
981 // for MergeDocument, apply original date/time as UTC
982 void SetFixDateTimeUTC( const DateTime& rDT )
983 { aFixDateTime = rDT; }
984 // for import filter, apply original date/time as local time
985 void SetFixDateTimeLocal( const DateTime& rDT )
986 { aFixDateTime = rDT; aFixDateTime.ConvertToUTC(); }
987
988 void Append( ScChangeAction* );
989
990 // pRefDoc may be NULL => no lookup of contents
991 // => no generation of deleted contents
992 SC_DLLPUBLIC void AppendDeleteRange( const ScRange&,
993 ScDocument* pRefDoc,
994 sal_uLong& nStartAction, sal_uLong& nEndAction,
995 SCTAB nDz = 0 );
996 // nDz: multi TabDel, LookUpContent must be searched
997 // with an offset of -nDz
998
999 // after new value was set in the document,
1000 // old value from RefDoc/UndoDoc
1001 void AppendContent( const ScAddress& rPos,
1002 const ScDocument* pRefDoc );
1003 // after new values were set in the document,
1004 // old values from RefDoc/UndoDoc
1005 void AppendContentRange( const ScRange& rRange,
1006 ScDocument* pRefDoc,
1007 sal_uLong& nStartAction, sal_uLong& nEndAction,
1009 // after new value was set in the document,
1010 // old value from pOldCell, nOldFormat,
1011 // RefDoc==NULL => Doc
1012 void AppendContent( const ScAddress& rPos, const ScCellValue& rOldCell,
1013 sal_uLong nOldFormat, ScDocument* pRefDoc = nullptr );
1014 // after new value was set in the document,
1015 // old value from pOldCell, format from Doc
1016 SC_DLLPUBLIC void AppendContent( const ScAddress& rPos, const ScCellValue& rOldCell );
1017 // after new values were set in the document,
1018 // old values from RefDoc/UndoDoc.
1019 // All contents with a cell in RefDoc
1020 void AppendContentsIfInRefDoc( ScDocument& rRefDoc,
1021 sal_uLong& nStartAction, sal_uLong& nEndAction );
1022
1023 // Meant for import filter, creates and inserts
1024 // an unconditional content action of the two
1025 // cells without querying the document, not
1026 // even for number formats (though the number
1027 // formatter of the document may be used).
1028 // The action is returned and may be used to
1029 // set user name, description, date/time et al.
1030 // Takes ownership of the cells!
1031 SC_DLLPUBLIC ScChangeActionContent* AppendContentOnTheFly(
1032 const ScAddress& rPos, const ScCellValue& rOldCell, const ScCellValue& rNewCell,
1033 sal_uLong nOldFormat = 0, sal_uLong nNewFormat = 0 );
1034
1035 // Only use the following two if there is no different solution! (Assign
1036 // string for NewValue or creation of a formula respectively)
1037
1038 SC_DLLPUBLIC void AppendInsert( const ScRange& rRange, bool bEndOfList = false );
1039
1040 // pRefDoc may be NULL => no lookup of contents
1041 // => no generation of deleted contents
1042 SC_DLLPUBLIC void AppendMove( const ScRange& rFromRange, const ScRange& rToRange,
1043 ScDocument* pRefDoc );
1044
1045 // Cut to Clipboard
1047 {
1048 nStartLastCut = nEndLastCut = 0;
1049 pLastCutMove.reset();
1050 }
1051 bool HasLastCut() const
1052 {
1053 return nEndLastCut > 0 &&
1054 nStartLastCut <= nEndLastCut &&
1055 pLastCutMove;
1056 }
1057
1058 SC_DLLPUBLIC void Undo( sal_uLong nStartAction, sal_uLong nEndAction, bool bMerge = false );
1059
1060 // adjust references for MergeDocument
1063 void MergePrepare( const ScChangeAction* pFirstMerge, bool bShared );
1064 void MergeOwn( ScChangeAction* pAct, sal_uLong nFirstMerge, bool bShared );
1065 static bool MergeIgnore( const ScChangeAction&, sal_uLong nFirstMerge );
1066
1067 // This comment was already really strange in German.
1068 // Tried to structure it a little. Hope no information got lost...
1069 //
1070 // Insert dependents into table.
1071 // ScChangeAction is
1072 // - "Insert": really dependents
1073 // - "Move": dependent contents in FromRange /
1074 // deleted contents in ToRange
1075 // OR inserts in FromRange or ToRange
1076 // - "Delete": a list of deleted (what?)
1077 // OR for content, different contents at the same position
1078 // OR MatrixReferences belonging to MatrixOrigin
1079
1080 // With bListMasterDelete (==TRUE ?) all Deletes of a row belonging
1081 // to a MasterDelete are listed (possibly it is
1082 // "all Deletes belonging...are listed in a row?)
1083
1084 // With bAllFlat (==TRUE ?) all dependents of dependents
1085 // will be inserted flatly.
1086
1087 SC_DLLPUBLIC void GetDependents(
1088 ScChangeAction*, ScChangeActionMap&, bool bListMasterDelete = false, bool bAllFlat = false ) const;
1089
1090 // Reject visible action (and dependents)
1091 bool Reject( ScChangeAction*, bool bShared = false );
1092
1093 // Accept visible action (and dependents)
1094 SC_DLLPUBLIC bool Accept( ScChangeAction* );
1095
1096 void AcceptAll(); // all Virgins
1097 bool RejectAll(); // all Virgins
1098
1099 // Selects a content of several contents at the same
1100 // position and accepts this one and
1101 // the older ones, rejects the more recent ones.
1102 // If bOldest==TRUE then the first OldValue
1103 // of a Virgin-Content-List will be restored.
1104 bool SelectContent( ScChangeAction*, bool bOldest = false );
1105
1106 // If ModifiedLink is set, changes go to
1107 // ScChangeTrackMsgQueue
1109 { aModifiedLink = r; ClearMsgQueue(); }
1110 ScChangeTrackMsgQueue& GetMsgQueue();
1111
1112 void NotifyModified( ScChangeTrackMsgType eMsgType,
1113 sal_uLong nStartAction, sal_uLong nEndAction );
1114
1115 sal_uLong AddLoadedGenerated( const ScCellValue& rNewCell,
1116 const ScBigRange& aBigRange, const OUString& sNewValue ); // only to use in the XML import
1117 void AppendLoaded( std::unique_ptr<ScChangeAction> pAppend ); // this is only for the XML import public, it should be protected
1118 void SetActionMax(sal_uLong nTempActionMax)
1119 { nActionMax = nTempActionMax; } // only to use in the XML import
1120
1121 void SetProtection( const css::uno::Sequence< sal_Int8 >& rPass )
1122 { aProtectPass = rPass; }
1123 const css::uno::Sequence< sal_Int8 >& GetProtection() const
1124 { return aProtectPass; }
1125 bool IsProtected() const { return aProtectPass.hasElements(); }
1126
1127 // If time stamps of actions of this
1128 // ChangeTrack and a second one are to be
1129 // compared including nanoseconds.
1130 void SetTimeNanoSeconds( bool bVal ) { bTimeNanoSeconds = bVal; }
1131 bool IsTimeNanoSeconds() const { return bTimeNanoSeconds; }
1132
1133 void AppendCloned( ScChangeAction* pAppend );
1134 SC_DLLPUBLIC ScChangeTrack* Clone( ScDocument* pDocument ) const;
1135 static void MergeActionState( ScChangeAction* pAct, const ScChangeAction* pOtherAct );
1137 void GetChangeTrackInfo(tools::JsonWriter&);
1138};
1139
1140/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
Definition: address.hxx:44
ScChangeActionClipMode
Definition: chgtrack.hxx:84
@ SC_CACM_PASTE
Definition: chgtrack.hxx:87
@ SC_CACM_NONE
Definition: chgtrack.hxx:85
@ SC_CACM_CUT
Definition: chgtrack.hxx:86
std::vector< ScChangeTrackMsgInfo > ScChangeTrackMsgStack
Definition: chgtrack.hxx:797
std::map< sal_uLong, ScChangeAction * > ScChangeActionMap
Definition: chgtrack.hxx:798
std::vector< ScChangeTrackMsgInfo > ScChangeTrackMsgQueue
Definition: chgtrack.hxx:796
ScChangeTrackMsgType
Definition: chgtrack.hxx:780
ScChangeActionType
Definition: chgtrack.hxx:63
@ SC_CAT_NONE
Definition: chgtrack.hxx:64
@ SC_CAT_MOVE
Definition: chgtrack.hxx:71
@ SC_CAT_DELETE_TABS
Definition: chgtrack.hxx:70
@ SC_CAT_INSERT_TABS
Definition: chgtrack.hxx:67
@ SC_CAT_DELETE_ROWS
Definition: chgtrack.hxx:69
@ SC_CAT_CONTENT
Definition: chgtrack.hxx:72
@ SC_CAT_REJECT
Definition: chgtrack.hxx:73
@ SC_CAT_DELETE_COLS
Definition: chgtrack.hxx:68
@ SC_CAT_INSERT_ROWS
Definition: chgtrack.hxx:66
@ SC_CAT_INSERT_COLS
Definition: chgtrack.hxx:65
ScChangeTrackMergeState
Definition: chgtrack.hxx:801
@ SC_CTMS_OTHER
Definition: chgtrack.hxx:806
@ SC_CTMS_UNDO
Definition: chgtrack.hxx:805
@ SC_CTMS_OWN
Definition: chgtrack.hxx:804
@ SC_CTMS_PREPARE
Definition: chgtrack.hxx:803
@ SC_CTMS_NONE
Definition: chgtrack.hxx:802
ScChangeActionState
Definition: chgtrack.hxx:77
@ SC_CAS_REJECTED
Definition: chgtrack.hxx:80
@ SC_CAS_VIRGIN
Definition: chgtrack.hxx:78
@ SC_CAS_ACCEPTED
Definition: chgtrack.hxx:79
ScChangeActionContentCellType
Definition: chgtrack.hxx:587
@ SC_CACCT_MATORG
Definition: chgtrack.hxx:590
@ SC_CACCT_NONE
Definition: chgtrack.hxx:588
@ SC_CACCT_MATREF
Definition: chgtrack.hxx:591
@ SC_CACCT_NORMAL
Definition: chgtrack.hxx:589
void ConvertToUTC()
Color GetColor() const
Definition: chgtrack.hxx:59
const ScAppOptions & rOpt
Definition: chgtrack.hxx:50
void Update(const ScChangeAction &rAction)
Definition: output.cxx:94
ScActionColorChanger(const ScChangeTrack &rTrack)
Definition: output.cxx:86
OUString aLastUserName
Definition: chgtrack.hxx:52
const std::set< OUString > & rUsers
Definition: chgtrack.hxx:51
sal_uInt16 nLastUserIndex
Definition: chgtrack.hxx:53
bool IsTopContent() const
Definition: chgtrack.hxx:700
ScChangeActionContent * GetNextContent() const
Definition: chgtrack.hxx:697
void InsertInSlot(ScChangeActionContent **pp)
Definition: chgtrack.hxx:608
ScChangeActionContent * GetPrevContent() const
Definition: chgtrack.hxx:698
virtual OUString GetRefString(ScDocument &rDoc, bool bFlag3D=false) const override
Definition: chgtrack.cxx:1433
ScChangeActionContent * pNextContent
Definition: chgtrack.hxx:603
ScChangeActionContent ** ppPrevInSlot
Definition: chgtrack.hxx:606
virtual const ScChangeTrack * GetChangeTrack() const override
Definition: chgtrack.hxx:667
virtual void UpdateReference(const ScChangeTrack *, UpdateRefMode, const ScBigRange &, sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz) override
Definition: chgtrack.cxx:1840
virtual void AddContent(ScChangeActionContent *) override
Definition: chgtrack.hxx:658
void SetPrevContent(ScChangeActionContent *p)
Definition: chgtrack.hxx:730
const ScCellValue & GetNewCell() const
Definition: chgtrack.hxx:740
virtual OUString GetDescription(ScDocument &rDoc, bool bSplitRange=false, bool bWarning=true) const override
Definition: chgtrack.cxx:1393
void SetNextContent(ScChangeActionContent *p)
Definition: chgtrack.hxx:728
virtual void DeleteCellEntries() override
Definition: chgtrack.hxx:659
const ScCellValue & GetOldCell() const
Definition: chgtrack.hxx:739
ScCellValue maOldCell
Definition: chgtrack.hxx:598
ScCellValue maNewCell
Definition: chgtrack.hxx:599
ScChangeActionContent * pNextInSlot
Definition: chgtrack.hxx:605
ScChangeActionContent * GetNextInSlot()
Definition: chgtrack.hxx:629
ScChangeActionContent * pPrevContent
Definition: chgtrack.hxx:604
const ScChangeActionDelMoveEntry * GetNext() const
Definition: chgtrack.hxx:415
short GetCutOffTo() const
Definition: chgtrack.hxx:422
short GetCutOffFrom() const
Definition: chgtrack.hxx:421
ScChangeActionMove * GetMove()
Definition: chgtrack.hxx:574
ScChangeActionDelMoveEntry(ScChangeActionDelMoveEntry **ppPrevP, ScChangeActionMove *pMove, short nFrom, short nTo)
Definition: chgtrack.hxx:562
bool IsBaseDelete() const
Definition: chgtrack.cxx:809
bool IsMultiDelete() const
Definition: chgtrack.cxx:822
virtual void UpdateReference(const ScChangeTrack *, UpdateRefMode, const ScBigRange &, sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz) override
Definition: chgtrack.cxx:851
ScChangeTrack * pTrack
Definition: chgtrack.hxx:430
ScChangeActionDelMoveEntry * AddCutOffMove(ScChangeActionMove *pMove, short nFrom, short nTo)
Definition: chgtrack.cxx:845
SCROW GetDy() const
Definition: chgtrack.hxx:477
virtual void AddContent(ScChangeActionContent *) override
Definition: chgtrack.cxx:799
std::vector< ScChangeActionContent * > mvCells
Definition: chgtrack.hxx:431
void SetCutOffInsert(ScChangeActionIns *p, short n)
Definition: chgtrack.hxx:488
virtual void DeleteCellEntries() override
Definition: chgtrack.cxx:804
const ScChangeActionDelMoveEntry * GetFirstMoveEntry() const
Definition: chgtrack.hxx:480
bool IsTabDeleteCol() const
Definition: chgtrack.cxx:834
ScChangeActionDelMoveEntry * pLinkMove
Definition: chgtrack.hxx:434
virtual const ScChangeTrack * GetChangeTrack() const override
Definition: chgtrack.hxx:452
SCCOL GetDx() const
Definition: chgtrack.hxx:476
virtual ~ScChangeActionDel() override
Definition: chgtrack.cxx:789
short GetCutOffCount() const
Definition: chgtrack.hxx:483
void UndoCutOffInsert()
Definition: chgtrack.cxx:1059
ScBigRange GetOverAllRange() const
Definition: chgtrack.cxx:890
bool IsTopDelete() const
Definition: chgtrack.cxx:814
void UndoCutOffMoves()
Definition: chgtrack.cxx:1010
const ScChangeActionIns * GetCutOffInsert() const
Definition: chgtrack.hxx:482
virtual bool Reject(ScDocument &rDoc) override
Definition: chgtrack.cxx:940
virtual OUString GetDescription(ScDocument &rDoc, bool bSplitRange=false, bool bWarning=true) const override
Definition: chgtrack.cxx:898
ScChangeActionIns * pCutOff
Definition: chgtrack.hxx:432
virtual const ScChangeTrack * GetChangeTrack() const override
Definition: chgtrack.hxx:375
virtual void DeleteCellEntries() override
Definition: chgtrack.hxx:371
virtual void AddContent(ScChangeActionContent *) override
Definition: chgtrack.hxx:370
A link/connection/dependency between change actions.
Definition: chgtrack.hxx:103
const ScChangeAction * GetAction() const
Definition: chgtrack.hxx:167
virtual ~ScChangeActionLinkEntry()
Definition: chgtrack.hxx:127
ScChangeActionLinkEntry * GetNext()
Definition: chgtrack.hxx:166
ScChangeActionLinkEntry & operator=(const ScChangeActionLinkEntry &)=delete
ScChangeActionLinkEntry * pLink
Definition: chgtrack.hxx:110
ScChangeActionLinkEntry * pNext
Definition: chgtrack.hxx:107
ScChangeActionLinkEntry(const ScChangeActionLinkEntry &)=delete
ScChangeAction * GetAction()
Definition: chgtrack.hxx:168
const ScChangeActionLinkEntry * GetNext() const
Definition: chgtrack.hxx:165
ScChangeAction * pAction
Definition: chgtrack.hxx:109
ScChangeActionLinkEntry ** ppPrev
Definition: chgtrack.hxx:108
ScChangeActionLinkEntry(ScChangeActionLinkEntry **ppPrevP, ScChangeAction *pActionP)
Definition: chgtrack.hxx:114
void SetLink(ScChangeActionLinkEntry *pLinkP)
Definition: chgtrack.hxx:136
const ScBigRange & GetFromRange() const
Definition: chgtrack.hxx:553
virtual ~ScChangeActionMove() override
Definition: chgtrack.cxx:1107
virtual void UpdateReference(const ScChangeTrack *, UpdateRefMode, const ScBigRange &, sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz) override
Definition: chgtrack.cxx:1122
ScChangeTrack * pTrack
Definition: chgtrack.hxx:505
sal_uLong nEndLastCut
Definition: chgtrack.hxx:508
std::vector< ScChangeActionContent * > mvCells
Definition: chgtrack.hxx:506
virtual void AddContent(ScChangeActionContent *) override
Definition: chgtrack.cxx:1112
sal_uLong nStartLastCut
Definition: chgtrack.hxx:507
void SetEndLastCut(sal_uLong nVal)
Definition: chgtrack.hxx:528
sal_uLong GetEndLastCut() const
Definition: chgtrack.hxx:529
void SetStartLastCut(sal_uLong nVal)
Definition: chgtrack.hxx:526
ScBigRange & GetFromRange()
Definition: chgtrack.hxx:524
virtual bool Reject(ScDocument &rDoc) override
Definition: chgtrack.cxx:1176
virtual OUString GetDescription(ScDocument &rDoc, bool bSplitRange=false, bool bWarning=true) const override
Definition: chgtrack.cxx:1139
ScChangeActionMove(const ScRange &rFromRange, const ScRange &rToRange, ScChangeTrack *pTrackP)
Definition: chgtrack.hxx:510
virtual const ScChangeTrack * GetChangeTrack() const override
Definition: chgtrack.hxx:537
SC_DLLPUBLIC void GetDelta(sal_Int32 &nDx, sal_Int32 &nDy, sal_Int32 &nDz) const
Definition: chgtrack.cxx:1130
sal_uLong GetStartLastCut() const
Definition: chgtrack.hxx:527
ScBigRange aFromRange
Definition: chgtrack.hxx:504
virtual OUString GetRefString(ScDocument &rDoc, bool bFlag3D=false) const override
Definition: chgtrack.cxx:1166
virtual void DeleteCellEntries() override
Definition: chgtrack.cxx:1117
virtual void DeleteCellEntries() override
Definition: chgtrack.hxx:762
virtual void AddContent(ScChangeActionContent *) override
Definition: chgtrack.hxx:761
virtual const ScChangeTrack * GetChangeTrack() const override
Definition: chgtrack.hxx:766
virtual bool Reject(ScDocument &rDoc) override
Definition: chgtrack.cxx:1987
ScChangeActionReject(const sal_uLong nActionNumber, const ScChangeActionState eState, const sal_uLong nRejectingNumber, const ScBigRange &aBigRange, const OUString &aUser, const DateTime &aDateTime, const OUString &sComment)
Definition: chgtrack.cxx:1978
DateTime aDateTime
Definition: chgtrack.hxx:189
ScChangeActionLinkEntry * pLinkDeleted
Definition: chgtrack.hxx:197
void SetDeletedInThis(sal_uLong nActionNumber, const ScChangeTrack *pTrack)
Definition: chgtrack.cxx:593
void SetDeletedIn(ScChangeAction *)
Definition: chgtrack.cxx:386
ScChangeActionLinkEntry * pLinkDependent
Definition: chgtrack.hxx:198
ScChangeAction * pPrev
Definition: chgtrack.hxx:193
sal_uLong nRejectAction
Definition: chgtrack.hxx:200
ScChangeAction(const ScChangeAction &)=delete
void SetRejectAction(sal_uLong n)
Definition: chgtrack.hxx:223
const OUString & GetComment() const
Definition: chgtrack.hxx:348
virtual ScChangeActionLinkEntry ** GetDeletedInAddress()
Definition: chgtrack.hxx:241
void SetComment(const OUString &rStr)
Definition: chgtrack.cxx:536
ScBigRange & GetBigRange()
Definition: chgtrack.hxx:229
friend class ScChangeActionMove
Definition: chgtrack.hxx:180
void SetUser(const OUString &r)
Definition: chgtrack.cxx:531
bool IsDeletedIn() const
Definition: chgtrack.cxx:317
bool IsRejected() const
Definition: chgtrack.cxx:132
ScChangeActionLinkEntry * AddDeleted(ScChangeAction *p)
Definition: chgtrack.hxx:246
ScChangeAction & operator=(const ScChangeAction &)=delete
virtual const ScChangeTrack * GetChangeTrack() const =0
bool IsClickable() const
Definition: chgtrack.cxx:165
bool IsVisible() const
Definition: chgtrack.cxx:142
bool IsMasterDelete() const
Definition: chgtrack.cxx:273
void RemoveAllLinks()
Definition: chgtrack.cxx:281
void SetActionNumber(sal_uLong n)
Definition: chgtrack.hxx:222
bool IsDialogRoot() const
Definition: chgtrack.cxx:232
sal_uLong GetRejectAction() const
Definition: chgtrack.hxx:318
ScChangeAction * pNext
Definition: chgtrack.hxx:192
OUString aUser
UTC.
Definition: chgtrack.hxx:190
bool IsTouchable() const
Definition: chgtrack.cxx:152
ScBigRange aBigRange
Definition: chgtrack.hxx:188
bool IsDialogParent() const
Definition: chgtrack.cxx:237
bool IsRejecting() const
Definition: chgtrack.cxx:137
sal_uLong GetActionNumber() const
Definition: chgtrack.hxx:317
void AddLink(ScChangeAction *p, ScChangeActionLinkEntry *pL)
Definition: chgtrack.hxx:231
const DateTime & GetDateTimeUTC() const
Definition: chgtrack.hxx:313
virtual ~ScChangeAction()
Definition: chgtrack.cxx:107
const ScBigRange & GetBigRange() const
Definition: chgtrack.hxx:311
void SetDateTimeUTC(const DateTime &rDT)
Definition: chgtrack.hxx:344
void SetType(ScChangeActionType e)
Definition: chgtrack.hxx:225
ScChangeActionType GetType() const
Definition: chgtrack.hxx:315
ScChangeActionLinkEntry * pLinkAny
Definition: chgtrack.hxx:194
const ScChangeActionLinkEntry * GetFirstDependentEntry() const
Definition: chgtrack.hxx:330
bool HasDeleted() const
Definition: chgtrack.cxx:381
void SetRejected()
Definition: chgtrack.cxx:555
virtual ScChangeActionLinkEntry * GetDeletedIn() const
Definition: chgtrack.hxx:239
bool RemoveDeletedIn(const ScChangeAction *)
Definition: chgtrack.cxx:300
friend class ScChangeActionDel
Definition: chgtrack.hxx:179
bool HasDependent() const
Definition: chgtrack.cxx:376
void RejectRestoreContents(ScChangeTrack *, SCCOL nDx, SCROW nDy)
Definition: chgtrack.cxx:565
virtual void AddContent(ScChangeActionContent *)=0
bool IsDeleteType() const
Definition: chgtrack.cxx:117
void SetState(ScChangeActionState e)
Definition: chgtrack.hxx:226
sal_uLong nAction
Definition: chgtrack.hxx:199
const ScChangeActionLinkEntry * GetFirstDeletedEntry() const
Definition: chgtrack.hxx:328
bool IsRejectable() const
Definition: chgtrack.cxx:196
bool IsDeletedInDelType(ScChangeActionType) const
Definition: chgtrack.cxx:344
bool IsInsertType() const
Definition: chgtrack.cxx:112
ScChangeAction * GetNext() const
Definition: chgtrack.hxx:320
ScChangeAction * GetPrev() const
Definition: chgtrack.hxx:321
bool IsInternalRejectable() const
Definition: chgtrack.cxx:214
void RemoveAllDependent()
Definition: chgtrack.cxx:397
bool IsVirgin() const
Definition: chgtrack.cxx:122
ScChangeActionState eState
Definition: chgtrack.hxx:202
ScChangeActionType eType
Definition: chgtrack.hxx:201
SC_DLLPUBLIC DateTime GetDateTime() const
Definition: chgtrack.cxx:406
virtual bool Reject(ScDocument &rDoc)=0
OUString GetRefString(const ScBigRange &rRange, const ScDocument &rDoc, bool bFlag3D=false) const
Definition: chgtrack.cxx:476
virtual void DeleteCellEntries()=0
ScChangeActionState GetState() const
Definition: chgtrack.hxx:316
ScChangeActionLinkEntry * pLinkDeletedIn
Definition: chgtrack.hxx:195
const OUString & GetUser() const
Definition: chgtrack.hxx:347
SC_DLLPUBLIC bool IsAccepted() const
Definition: chgtrack.cxx:127
void RemoveAllDeletedIn()
Definition: chgtrack.cxx:334
OUString aComment
Definition: chgtrack.hxx:191
ScChangeActionLinkEntry * AddDependent(ScChangeAction *p)
Definition: chgtrack.hxx:251
DateTime aFixDateTime
Definition: chgtrack.hxx:835
const std::set< OUString > & GetUserCollection() const
Definition: chgtrack.hxx:971
sal_uLong nEndLastCut
Definition: chgtrack.hxx:851
ScDocument & GetDocument() const
Definition: chgtrack.hxx:972
std::optional< ScChangeTrackMsgInfo > xBlockModifyMsg
Definition: chgtrack.hxx:845
ScChangeTrackMsgStack aMsgStackFinal
Definition: chgtrack.hxx:830
ScChangeAction * GetLast() const
Definition: chgtrack.hxx:952
bool bUseFixDateTime
Definition: chgtrack.hxx:858
ScChangeActionMap aPasteCutMap
Definition: chgtrack.hxx:827
SCROW mnContentRowsPerSlot
Definition: chgtrack.hxx:821
sal_uLong nActionMax
Definition: chgtrack.hxx:847
bool IsInDelete() const
Definition: chgtrack.hxx:965
void SetMergeState(ScChangeTrackMergeState eState)
Definition: chgtrack.hxx:883
const DateTime & GetFixDateTime() const
Definition: chgtrack.hxx:974
ScChangeAction * pFirst
Definition: chgtrack.hxx:836
ScChangeAction * pLast
Definition: chgtrack.hxx:837
bool bTimeNanoSeconds
Definition: chgtrack.hxx:859
std::set< OUString > maUserCollection
Definition: chgtrack.hxx:831
ScChangeActionLinkEntry * pLinkInsertTab
Definition: chgtrack.hxx:843
OUString maUser
Definition: chgtrack.hxx:832
void SetInDeleteRange(const ScRange &rRange)
Definition: chgtrack.hxx:873
void SetModifiedLink(const Link< ScChangeTrack &, void > &r)
Definition: chgtrack.hxx:1108
void SetInDeleteTop(bool bVal)
Definition: chgtrack.hxx:877
css::uno::Sequence< sal_Int8 > aProtectPass
Definition: chgtrack.hxx:824
sal_uLong nLastMerge
Definition: chgtrack.hxx:852
void UpdateReference(ScChangeAction *, bool bUndo)
Definition: chgtrack.cxx:3190
sal_uLong GetActionMax() const
Definition: chgtrack.hxx:953
ScChangeActionContent ** GetContentSlots() const
Definition: chgtrack.hxx:961
bool IsProtected() const
Definition: chgtrack.hxx:1125
SCSIZE mnContentSlots
Definition: chgtrack.hxx:822
bool IsInPasteCut() const
Definition: chgtrack.hxx:968
ScChangeActionLinkEntry * pLinkInsertRow
Definition: chgtrack.hxx:842
void SetProtection(const css::uno::Sequence< sal_Int8 > &rPass)
Definition: chgtrack.hxx:1121
ScRange aInDeleteRange
Definition: chgtrack.hxx:834
ScChangeTrack(const ScChangeTrack &)=delete
bool bInDeleteUndo
Definition: chgtrack.hxx:855
ScChangeTrackMsgQueue aMsgQueue
Definition: chgtrack.hxx:828
void SetLastMerge(sal_uLong nVal)
Definition: chgtrack.hxx:886
ScDocument & rDoc
Definition: chgtrack.hxx:846
void SetFixDateTimeUTC(const DateTime &rDT)
Definition: chgtrack.hxx:982
bool HasLastCut() const
Definition: chgtrack.hxx:1051
void ResetLastCut()
Definition: chgtrack.hxx:1046
sal_uLong GetLastMerge() const
Definition: chgtrack.hxx:887
bool bInPasteCut
Definition: chgtrack.hxx:857
bool IsInDeleteUndo() const
Definition: chgtrack.hxx:967
ScChangeTrackMergeState GetMergeState() const
Definition: chgtrack.hxx:885
void SetInDelete(bool bVal)
Definition: chgtrack.hxx:875
sal_uLong nMarkLastSaved
Definition: chgtrack.hxx:849
void SetTimeNanoSeconds(bool bVal)
Definition: chgtrack.hxx:1130
ScChangeActionContent * pFirstGeneratedDelContent
Definition: chgtrack.hxx:838
const css::uno::Sequence< sal_Int8 > & GetProtection() const
Definition: chgtrack.hxx:1123
std::unique_ptr< ScChangeActionContent *[]> ppContentSlots
Definition: chgtrack.hxx:839
const ScRange & GetInDeleteRange() const
Definition: chgtrack.hxx:963
ScChangeTrack & operator=(const ScChangeTrack &)=delete
ScChangeActionMap aGeneratedMap
Definition: chgtrack.hxx:826
void SetFixDateTimeLocal(const DateTime &rDT)
Definition: chgtrack.hxx:985
bool Reject(ScChangeAction *, ScChangeActionMap *, bool bRecursion)
Definition: chgtrack.cxx:4129
bool IsTimeNanoSeconds() const
Definition: chgtrack.hxx:1131
Link< ScChangeTrack &, void > aModifiedLink
Definition: chgtrack.hxx:833
void SetUseFixDateTime(bool bVal)
Definition: chgtrack.hxx:979
ScChangeActionContent * GetFirstGenerated() const
Definition: chgtrack.hxx:950
bool IsInDeleteTop() const
Definition: chgtrack.hxx:966
const OUString & GetUser() const
Definition: chgtrack.hxx:970
void SetActionMax(sal_uLong nTempActionMax)
Definition: chgtrack.hxx:1118
std::unique_ptr< ScChangeActionMove > pLastCutMove
Definition: chgtrack.hxx:840
ScChangeActionLinkEntry * pLinkMove
Definition: chgtrack.hxx:844
sal_uLong nStartLastCut
Definition: chgtrack.hxx:850
void SetInDeleteUndo(bool bVal)
Definition: chgtrack.hxx:879
ScChangeActionMap aMap
Definition: chgtrack.hxx:825
ScChangeActionLinkEntry * pLinkInsertCol
Definition: chgtrack.hxx:841
void SetInPasteCut(bool bVal)
Definition: chgtrack.hxx:881
bool bInDeleteTop
Definition: chgtrack.hxx:856
ScChangeTrackMergeState eMergeState
Definition: chgtrack.hxx:853
ScChangeAction * GetFirst() const
Definition: chgtrack.hxx:951
ScChangeTrackMsgStack aMsgStackTmp
Definition: chgtrack.hxx:829
sal_uLong nGeneratedMin
Definition: chgtrack.hxx:848
void Init()
virtual void GetDescription(OUString &rName) override
virtual void SetValue(tools::Long nNew) override
UpdateRefMode
Definition: global.hxx:300
void * p
sal_Int64 n
void Clear(EHistoryType eHistory)
NONE
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
ConfigurationHints
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
sal_uIntPtr sal_uLong
Store arbitrary cell value of any kind.
Definition: cellvalue.hxx:32
ScChangeTrackMsgType eMsgType
Definition: chgtrack.hxx:790
sal_uLong nStartAction
Definition: chgtrack.hxx:791
sal_uLong nEndAction
Definition: chgtrack.hxx:792
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:108
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17