21#include <compiler.hxx>
23#include <document.hxx>
34#include <tokenarray.hxx>
38#include <osl/diagnose.h>
55 pLinkDeletedIn( nullptr ),
56 pLinkDeleted( nullptr ),
57 pLinkDependent( nullptr ),
70 OUString aTempUser, OUString aTempComment) :
71 aBigRange(
std::move( aRange )),
72 aDateTime( aTempDateTime ),
73 aUser(
std::move( aTempUser )),
74 aComment(
std::move( aTempComment )),
78 pLinkDeletedIn( nullptr ),
79 pLinkDeleted( nullptr ),
80 pLinkDependent( nullptr ),
81 nAction( nTempAction ),
82 nRejectAction( nTempRejectAction ),
91 aBigRange(
std::move( aRange )),
96 pLinkDeletedIn( nullptr ),
97 pLinkDeleted( nullptr ),
98 pLinkDependent( nullptr ),
99 nAction( nTempAction ),
186 if (
p &&
p->IsDeletedIn() )
207 if ( pNextContent ==
nullptr )
225 if ( pNextContent ==
nullptr )
248 return pPrevContent && pPrevContent->
IsVirgin();
262 if (
p &&
p->GetType() !=
eType )
302 bool bRemoved =
false;
368 if (
p !=
nullptr && (
p->GetType() == eDelType ||
p->GetType() == eInsType) )
393 pLink2 =
p->AddDeleted(
this );
415 sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
432 return ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) +
" ";
437 return ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) +
" ";
451 return ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) +
" ";
456 return ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) +
" ";
464 ScChangeActionMap::iterator itChangeAction = std::find_if(
aMap.begin(),
aMap.end(),
465 [&pReject](
const ScChangeActionMap::value_type& rEntry) {
466 return rEntry.second->GetType() == SC_CAT_MOVE || pReject->IsDeleteType(); });
467 if (itChangeAction ==
aMap.end())
470 if( itChangeAction->second->GetType() ==
SC_CAT_MOVE)
471 return ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) +
" ";
473 return ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) +
" ";
510 aBuf.append(
static_cast<sal_Int64
>(aTmpRange.
aStart.
Row()+1));
512 aBuf.append(
static_cast<sal_Int64
>(aTmpRange.
aEnd.
Row()+1));
528 return aBuf.makeStringAndClear();
569 std::vector<ScChangeActionContent*> aContentsList;
580 OSL_ENSURE( !
pLinkDeleted,
"ScChangeAction::RejectRestoreContents: pLinkDeleted != NULL" );
586 if ( !pContent->IsDeletedIn() &&
587 pContent->GetBigRange().aStart.IsValid( rDoc ) )
588 pContent->PutNewValueToDoc( &rDoc, nDx, nDy );
599 OSL_ENSURE( pAct,
"ScChangeAction::SetDeletedInThis: missing Action" );
611 OSL_ENSURE( pAct,
"ScChangeAction::AddDependent: missing Action" );
623 mbEndOfList(bEndOfList)
646 OSL_FAIL(
"ScChangeActionIns: Block not supported!" );
653 const OUString& aUserP,
const DateTime& aDateTimeP,
656 ScChangeAction(eTypeP, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment),
657 mbEndOfList(bEndOfList)
673 pWhatId = STR_COLUMN;
682 OUString aRsc =
ScResId(STR_CHANGED_INSERT);
683 sal_Int32
nPos = aRsc.indexOf(
"#1");
688 OUString aRangeStr =
ScResId(pWhatId) +
692 aRsc = aRsc.replaceAt(
nPos, 2, aRangeStr);
741 pLinkMove( nullptr ),
766 OSL_FAIL(
"ScChangeActionDel: Block not supported!" );
773 const OUString& aUserP,
const DateTime& aDateTimeP,
const OUString &sComment,
775 ScChangeAction(eTypeP, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment),
779 pLinkMove( nullptr ),
853 sal_Int32 nDxP, sal_Int32 nDyP, sal_Int32 nDz )
870 p->GetBigRange().aStart.SetCol(
GetBigRange().aStart.Col() );
871 p->GetBigRange().aEnd.SetCol(
GetBigRange().aStart.Col() );
874 p->GetBigRange().aStart.SetRow(
GetBigRange().aStart.Row() );
875 p->GetBigRange().aEnd.SetRow(
GetBigRange().aStart.Row() );
878 p->GetBigRange().aStart.SetTab(
GetBigRange().aStart.Tab() );
879 p->GetBigRange().aEnd.SetTab(
GetBigRange().aStart.Tab() );
906 pWhatId = STR_COLUMN;
927 OUString aRsc =
ScResId(STR_CHANGED_DELETE);
928 sal_Int32
nPos = aRsc.indexOf(
"#1");
933 OUString aRangeStr =
ScResId(pWhatId) +
" " +
935 aRsc = aRsc.replaceAt(
nPos, 2, aRangeStr);
949 if ( !aTmpRange.
IsValid( rDoc ) )
1023 else if ( nFrom < 0 )
1033 else if ( nFrom < 0 )
1043 else if ( nFrom < 0 )
1096 const OUString& aUserP,
const DateTime& aDateTimeP,
1097 const OUString &sComment,
ScBigRange aFromBigRange,
1100 aFromRange(
std::move(aFromBigRange)),
1124 sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
1134 nDx = rToPos.
Col() - rFromPos.
Col();
1135 nDy = rToPos.
Row() - rFromPos.
Row();
1136 nDz = rToPos.
Tab() - rFromPos.
Tab();
1140 ScDocument& rDoc,
bool bSplitRange,
bool bWarning )
const
1146 OUString aRsc =
ScResId(STR_CHANGED_MOVE);
1149 sal_Int32
nPos = aRsc.indexOf(
"#1");
1152 aRsc = aRsc.replaceAt(
nPos, 2, aTmpStr);
1153 nPos += aTmpStr.getLength();
1160 aRsc = aRsc.replaceAt(
nPos, 2, aTmpStr);
1240 pNextContent(nullptr),
1241 pPrevContent(nullptr),
1242 pNextInSlot(nullptr),
1243 ppPrevInSlot(nullptr)
1248 const ScBigRange& aBigRangeP,
const OUString& aUserP,
1249 const DateTime& aDateTimeP,
const OUString& sComment,
1252 maOldCell(
std::move(aOldCell)),
1253 maOldValue(sOldValue),
1254 pNextContent(nullptr),
1255 pPrevContent(nullptr),
1256 pNextInSlot(nullptr),
1257 ppPrevInSlot(nullptr)
1262 if (!sOldValue.isEmpty())
1268 const ScDocument* pDoc,
const OUString& sNewValue ) :
1270 maNewCell(
std::move(aNewCell)),
1271 maNewValue(sNewValue),
1272 pNextContent(nullptr),
1273 pPrevContent(nullptr),
1274 pNextInSlot(nullptr),
1275 ppPrevInSlot(nullptr)
1280 if (!sNewValue.isEmpty())
1358 if (!rFormatted.isEmpty())
1366 if ( rStr.getLength() > 1 && rStr[0] ==
'=' )
1394 ScDocument& rDoc,
bool bSplitRange,
bool bWarning )
const
1398 OUString aRsc =
ScResId(STR_CHANGED_CELL);
1402 sal_Int32
nPos = aRsc.indexOf(
"#1", 0);
1405 aRsc = aRsc.replaceAt(
nPos, 2, aTmpStr);
1406 nPos += aTmpStr.getLength();
1410 if (aTmpStr.isEmpty())
1411 aTmpStr =
ScResId( STR_CHANGED_BLANK );
1416 aRsc = aRsc.replaceAt(
nPos, 2, aTmpStr);
1417 nPos += aTmpStr.getLength();
1421 if (aTmpStr.isEmpty())
1422 aTmpStr =
ScResId( STR_CHANGED_BLANK );
1427 aRsc = aRsc.replaceAt(
nPos, 2, aTmpStr);
1458 str =
"(" + str +
")";
1480 bool bOldest, ::std::stack<ScChangeActionContent*>* pRejectActions )
1487 while ( ( pContent = pContent->
pPrevContent ) !=
nullptr )
1494 while ( ( pContent = pContent->
pNextContent ) !=
nullptr )
1510 if ( bOldest || pEnd !=
this )
1516 aCell.
assign(rDoc, rPos);
1526 if ( pRejectActions )
1527 pRejectActions->push( pNew );
1530 aCell.
assign(rDoc, rPos);
1643 SetValue(rStr, rCell, nFormat, rOrgCell, pFromDoc, pToDoc);
1654 rCell.
assign(rOrgCell, *pToDoc);
1701 if (!rValue.isEmpty())
1732 OSL_FAIL(
"ScChangeActionContent::GetFormulaString: aPos != pCell->aPos" );
1760 if (!rValue.isEmpty())
1785 OSL_ENSURE( nC>0 && nR>0,
"ScChangeActionContent::PutValueToDoc: MatColsRows?" );
1803 rCell.
commit(*pDoc, aPos);
1842 sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
1847 if ( nNewSlot != nOldSlot )
1858 if ( !(bOldFormula || bNewFormula) )
1882 if ( nDx < 0 || nDy < 0 || nDz < 0 )
1981 const ScBigRange& aBigRangeP,
const OUString& aUserP,
1982 const DateTime& aDateTimeP,
const OUString& sComment) :
2003 if ( nRowsPerSlot * nMaxSlots < sal::static_int_cast<SCSIZE>(
rDoc.
GetMaxRowCount()) )
2005 return nRowsPerSlot;
2013 SC_MOD()->GetUserOptions().AddListener(
this);
2020 maUserCollection(
std::move(aTempUserCollection)),
2025 SC_MOD()->GetUserOptions().AddListener(
this);
2032 SC_MOD()->GetUserOptions().RemoveListener(
this);
2075 pNext =
p->GetNext();
2080 pNext =
p->GetNext();
2085 delete rEntry.second;
2117 ScChangeActionMap::const_iterator it =
aMap.find( nAction );
2118 if( it !=
aMap.end() )
2126 ScChangeActionMap::const_iterator it =
aGeneratedMap.find( nGenerated );
2152 if( it !=
aMap.end() )
2334 aMap.insert( ::std::make_pair( nAction, pAppend ) );
2400 rRange.
GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
2401 for (
SCTAB nTab = nTab1; nTab <= nTab2; nTab++ )
2403 if ( !pRefDoc || nTab < pRefDoc->GetTableCount() )
2411 for (
SCCOL nCol = nCol1; nCol <= nCol2; nCol++ )
2415 if ( nCol == nCol2 )
2418 nTab-nTab1 + nDz, nRejectingInsert );
2422 nTab-nTab1 + nDz, nRejectingInsert );
2427 for (
SCROW nRow = nRow1; nRow <= nRow2; nRow++ )
2431 if ( nRow == nRow2 )
2434 0, nRejectingInsert );
2438 else if ( nRow1 == 0 && nRow2 ==
rDoc.
MaxRow() )
2441 for (
SCCOL nCol = nCol1; nCol <= nCol2; nCol++ )
2445 if ( nCol == nCol2 )
2448 0, nRejectingInsert );
2453 OSL_FAIL(
"ScChangeTrack::AppendDeleteRange: Block not supported!" );
2465 ScRange aTrackRange( rOrgRange );
2487 if ( nRejectingInsert )
2504 for (
bool bHas = aIter.
first(); bHas; bHas = aIter.
next())
2547 return nC1 != nC2 || nR1 != nR2;
2576 aOldCell.
assign(*pRefDoc, rPos);
2637 rRange.
GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
2641 bDoContents =
false;
2650 nCol1 += nTmpCol + 1;
2657 nRow1 += nTmpRow + 1;
2664 nTab1 += nTmpTab + 1;
2689 for (
SCTAB nTab = nTab1; nTab <= nTab2; nTab++ )
2695 for (
SCCOL nCol = nCol1; nCol <= lastCol; nCol++ )
2700 for (
SCROW nRow = nRow1; nRow <= lastRow; nRow++ )
2733 while (aIter.
next());
2739 nStartAction = nEndAction = 0;
2764 pContent->RemoveDeletedIn( pDeletor );
2765 if (
IsGenerated( pContent->GetActionNumber() ) &&
2766 !pContent->IsDeletedIn() )
2780 rPos, rCell, pFromDoc, &
rDoc );
2799 if ( pContent->
pNext )
2801 if ( pContent->
pPrev )
2814 p =
p->GetNextInSlot() )
2816 if (
p != pButNotThis && !
p->IsDeletedIn() &&
2817 p->GetBigRange().aStart == rPos )
2874 OSL_FAIL(
"ScChangeTrack::Dependencies: MatOrg not found" );
2897 (bActNoInsert && !bActRowDel && !bActTabDel)) )
2911 (bActNoInsert && !bActColDel && !bActTabDel)) )
2925 (bActNoInsert && !bActColDel && !bActRowDel)) )
2991 if ( pRemove ==
pLast )
3000 if ( pRemove->
pNext )
3002 if ( pRemove->
pPrev )
3042 if ( nStartAction == 0 )
3046 if ( nEndAction && nStartAction <= nEndAction )
3052 for (
sal_uLong j = nEndAction; j >= nStartAction; --j )
3082 if ( nStart && nStart <= nEnd )
3087 for (
sal_uLong nCut = nStart; nCut <= nEnd; nCut++ )
3089 ScChangeActionMap::iterator itCut =
aPasteCutMap.find( nCut );
3093 OSL_ENSURE(
aMap.find( nCut ) ==
aMap.end(),
"ScChangeTrack::Undo: nCut dup" );
3094 Append( itCut->second, nCut );
3099 OSL_FAIL(
"ScChangeTrack::Undo: nCut not found" );
3156 GetOverAllRange().MakeRange(
rDoc ) );
3163 pAct = ( pAct == pFirstMerge ? nullptr : pAct->
GetPrev() );
3182 GetOverAllRange().MakeRange(
rDoc ) );
3238 bool bGeneratedDelContents =
3243 sal_Int32 nDx, nDy, nDz;
3244 nDx = nDy = nDz = 0;
3284 OSL_FAIL(
"ScChangeTrack::UpdateReference: unknown Type" );
3319 bool bUpdate =
true;
3323 if (
p->IsInsertType() )
3328 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3332 p->IsDeletedInDelType( eInsType ) )
3335 if ( aDelRange.
Contains(
p->GetBigRange().aStart ) )
3340 while (
pLink && bUpdate )
3343 if ( pDel && pDel->
GetType() == eInsType &&
3353 if ( aDelRange.
Contains(
p->GetBigRange() ) )
3359 if ( !
p->IsDeletedInDelType( eActType ) )
3361 p->SetDeletedIn( pActDel );
3363 if ( bGeneratedDelContents )
3380 switch (
p->GetType() )
3385 if ( aDelRange.
Contains(
p->GetBigRange().aStart ) )
3389 p->GetBigRange().aStart.IncCol();
3391 else if ( aDelRange.
Contains(
p->GetBigRange().aEnd ) )
3395 p->GetBigRange().aEnd.IncCol( -1 );
3402 if ( aDelRange.
Contains(
p->GetBigRange().aStart ) )
3406 p->GetBigRange().aStart.IncRow();
3408 else if ( aDelRange.
Contains(
p->GetBigRange().aEnd ) )
3412 p->GetBigRange().aEnd.IncRow( -1 );
3419 if ( aDelRange.
Contains(
p->GetBigRange().aStart ) )
3423 p->GetBigRange().aStart.IncTab();
3425 else if ( aDelRange.
Contains(
p->GetBigRange().aEnd ) )
3429 p->GetBigRange().aEnd.IncTab( -1 );
3518 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3519 if (
p->GetType() == eActType && !
p->IsRejected() &&
3521 p->GetBigRange().Contains( aDelRange ) )
3532 bool bUpdate =
true;
3533 if ( aDelRange.
Contains(
p->GetBigRange() ) )
3541 p->SetDeletedIn( pAct );
3544 if (
p->IsDeletedInDelType( eActType ) )
3546 if (
p->IsDeletedIn( pActDel ) )
3551 p->RemoveDeletedIn( pActDel );
3563 if (
p->GetType() == eActType && pActDel->
IsDeletedIn(
p ) )
3570 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3572 if ( !bGeneratedDelContents )
3582 bool bLastCutMove = ( pActMove ==
pLastCutMove.get() );
3596 if ( !
p->IsDeletedIn( pActMove ) )
3598 p->SetDeletedIn( pActMove );
3600 if ( bGeneratedDelContents )
3604 else if ( bLastCutMove &&
3630 p->UpdateReference(
this,
eMode, rFrom, nDx, nDy, nDz );
3644 if (
p->IsDeletedIn( pActMove ) )
3648 p->RemoveDeletedIn( pActMove );
3655 p->UpdateReference(
this,
eMode, rTo, nDx, nDy, nDz );
3656 if ( bActRejected &&
3662 p->AddLink( pActMove,
pLink );
3679 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3691 p->SetDeletedIn( pAct );
3705 p->SetDeletedIn( pAct );
3713 if ( !
p->IsDeletedIn( pAct )
3717 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3728 if ( !
p->IsDeletedIn( pAct )
3732 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3741 p->RemoveDeletedIn( pAct );
3755 p->RemoveDeletedIn( pAct );
3771 p->SetDeletedIn( pAct );
3781 if ( !
p->IsDeletedIn( pAct ) &&
p->GetActionNumber() <= pAct->
GetActionNumber() )
3783 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3798 bool bIsMasterDelete = ( bListMasterDelete && pAct->
IsMasterDelete() );
3801 ::std::stack<ScChangeAction*> cStack;
3804 while ( !cStack.empty() )
3806 pCur = cStack.top();
3820 if ( !
IsGenerated(
n ) && rMap.insert( ::std::make_pair(
n,
p ) ).second )
3821 if (
p->HasDependent() )
3829 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3832 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3843 if ( !bAllFlat && bIsMasterDelete && pCur == pAct )
3852 if (!
p ||
p->GetType() !=
eType ||
3855 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3872 if ( !
IsGenerated(
n ) && rMap.insert( ::std::make_pair(
n,
p ) ).second )
3873 if (
p->HasDeleted() ||
3879 if (
p->IsDeleteType() )
3882 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3885 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3900 if (
p != pAct && rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) ).second )
3903 if ( bAllFlat && (
p->HasDeleted() ||
3920 if ( !
IsGenerated(
n ) && rMap.insert( ::std::make_pair(
n,
p ) ).second )
3921 if (
p->HasDependent() ||
p->HasDeleted() )
3929 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3932 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3945 rMap.insert( ::std::make_pair( pContent->
GetActionNumber(), pContent ) );
3952 rMap.insert( ::std::make_pair( pContent->
GetActionNumber(), pContent ) );
3964 if ( !
IsGenerated(
n ) && rMap.insert( ::std::make_pair(
n,
p ) ).second )
3965 if (
p->HasDependent() )
3969 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3980 if (
p != pAct && rMap.find(
p->GetActionNumber() ) == rMap.end())
3999 if ( !pPrevContent || !pPrevContent->
IsVirgin() )
4001 pContent = pPrevContent;
4030 ::std::stack<ScChangeActionContent*> aRejectActions;
4035 if (
p != pContent )
4041 bOldest, &aRejectActions );
4045 OSL_FAIL(
"ScChangeTrack::SelectContent: content dependent no content" );
4051 bOk &= pContent->
Select(
rDoc,
this, bOldest,
nullptr );
4054 while ( !aRejectActions.empty() )
4057 aRejectActions.pop();
4067 return pContent->
Select(
rDoc,
this, bOldest,
nullptr );
4089 for(
auto& rEntry : aActionMap )
4091 rEntry.second->Accept();
4103 if (
p->IsInternalRejectable() )
4119 std::unique_ptr<ScChangeActionMap> pMap;
4125 bool bRejected =
Reject( pAct, pMap.get(),
false );
4136 bool bRejected =
false;
4141 OSL_ENSURE( pMap,
"ScChangeTrack::Reject: Insert without map" );
4142 ScChangeActionMap::reverse_iterator itChangeAction;
4143 for (itChangeAction = pMap->rbegin();
4144 itChangeAction != pMap->rend() && bOk; ++itChangeAction)
4148 itChangeAction->second->SetRejected();
4149 else if ( itChangeAction->second->IsDeleteType() )
4150 itChangeAction->second->Accept();
4152 bOk =
Reject( itChangeAction->second,
nullptr,
true );
4168 OSL_ENSURE( !pMap,
"ScChangeTrack::Reject: Delete with map" );
4171 bool bTabDel, bTabDelOk;
4185 bTabDel = bTabDelOk =
false;
4192 bool bOneOk =
false;
4246 }
while ( bOk && bLoop &&
p &&
p->GetType() == eActType &&
4250 if ( bOneOk || (bTabDel && bTabDelOk) )
4264 OSL_ENSURE( pMap,
"ScChangeTrack::Reject: Move without Map" );
4265 ScChangeActionMap::reverse_iterator itChangeAction;
4267 for( itChangeAction = pMap->rbegin(); itChangeAction != pMap->rend() && bOk; ++itChangeAction )
4269 bOk =
Reject( itChangeAction->second,
nullptr,
true );
4301 if ( bRejected && !bRecursion )
4315 OSL_FAIL(
"ScChangeTrack::Reject: say what?" );
4358 std::unique_ptr<ScChangeTrack> pClonedTrack(
new ScChangeTrack( *pDocument ));
4362 ::std::stack< const ScChangeAction* > aGeneratedStack;
4364 while ( pGenerated )
4366 aGeneratedStack.push( pGenerated );
4367 pGenerated = pGenerated->
GetNext();
4369 while ( !aGeneratedStack.empty() )
4371 pGenerated = aGeneratedStack.top();
4372 aGeneratedStack.pop();
4378 aClonedNewCell.
assign(rNewCell, *pDocument);
4379 OUString aNewValue = rContent.
GetNewString( pDocument );
4381 pClonedTrack->AddLoadedGenerated(aClonedNewCell, pGenerated->
GetBigRange(), aNewValue);
4397 bool bEndOfList =
static_cast<const ScChangeActionIns*
>(pAction)->IsEndOfList();
4437 pClonedTrack.get() );
4443 assert(pMove &&
"ScChangeTrack::Clone: pMove is null!");
4453 pMove->GetFromRange(),
4454 pClonedTrack.get() );
4462 aClonedOldCell.
assign(rOldCell, *pDocument);
4463 OUString aOldValue = rContent.
GetOldString( pDocument );
4473 std::move(aClonedOldCell),
4481 aClonedNewCell.
assign(rNewCell, *pDocument);
4482 pClonedContent->
SetNewValue(aClonedNewCell, pDocument);
4485 pClonedAction = pClonedContent;
4506 if ( pClonedAction )
4508 pClonedTrack->AppendCloned( pClonedAction );
4514 if ( pClonedTrack->GetLast() )
4516 pClonedTrack->SetActionMax( pClonedTrack->GetLast()->GetActionNumber() );
4525 ::std::stack< sal_uLong > aStack;
4537 if ( pClonedAction )
4539 while ( !aStack.empty() )
4541 ScChangeAction* pClonedDeleted = pClonedTrack->GetActionOrGenerated( aStack.top() );
4543 if ( pClonedDeleted )
4559 ::std::stack< sal_uLong > aStack;
4571 if ( pClonedAction )
4573 while ( !aStack.empty() )
4575 ScChangeAction* pClonedDependent = pClonedTrack->GetActionOrGenerated( aStack.top() );
4577 if ( pClonedDependent )