21#include <compiler.hxx>
23#include <document.hxx>
34#include <tokenarray.hxx>
38#include <osl/diagnose.h>
56 pLinkDeletedIn( nullptr ),
57 pLinkDeleted( nullptr ),
58 pLinkDependent( nullptr ),
71 OUString aTempUser, OUString aTempComment) :
72 aBigRange(
std::move( aRange )),
73 aDateTime( aTempDateTime ),
74 aUser(
std::move( aTempUser )),
75 aComment(
std::move( aTempComment )),
79 pLinkDeletedIn( nullptr ),
80 pLinkDeleted( nullptr ),
81 pLinkDependent( nullptr ),
82 nAction( nTempAction ),
83 nRejectAction( nTempRejectAction ),
92 aBigRange(
std::move( aRange )),
97 pLinkDeletedIn( nullptr ),
98 pLinkDeleted( nullptr ),
99 pLinkDependent( nullptr ),
100 nAction( nTempAction ),
187 if (
p &&
p->IsDeletedIn() )
208 if ( pNextContent ==
nullptr )
226 if ( pNextContent ==
nullptr )
249 return pPrevContent && pPrevContent->
IsVirgin();
263 if (
p &&
p->GetType() !=
eType )
303 bool bRemoved =
false;
369 if (
p !=
nullptr && (
p->GetType() == eDelType ||
p->GetType() == eInsType) )
394 pLink2 =
p->AddDeleted(
this );
416 sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
433 return ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) +
" ";
438 return ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) +
" ";
452 return ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) +
" ";
457 return ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) +
" ";
465 ScChangeActionMap::iterator itChangeAction = std::find_if(
aMap.begin(),
aMap.end(),
466 [&pReject](
const ScChangeActionMap::value_type& rEntry) {
467 return rEntry.second->GetType() == SC_CAT_MOVE || pReject->IsDeleteType(); });
468 if (itChangeAction ==
aMap.end())
471 if( itChangeAction->second->GetType() ==
SC_CAT_MOVE)
472 return ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) +
" ";
474 return ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) +
" ";
495 aBuf.append(aTmp +
".");
506 aBuf.append(aTmp +
".");
508 aBuf.append(OUString::number(
static_cast<sal_Int64
>(aTmpRange.
aStart.
Row()+1))
509 +
":" + OUString::number(
static_cast<sal_Int64
>(aTmpRange.
aEnd.
Row()+1)));
525 return aBuf.makeStringAndClear();
566 std::vector<ScChangeActionContent*> aContentsList;
577 OSL_ENSURE( !
pLinkDeleted,
"ScChangeAction::RejectRestoreContents: pLinkDeleted != NULL" );
583 if ( !pContent->IsDeletedIn() &&
584 pContent->GetBigRange().aStart.IsValid( rDoc ) )
585 pContent->PutNewValueToDoc( &rDoc, nDx, nDy );
596 OSL_ENSURE( pAct,
"ScChangeAction::SetDeletedInThis: missing Action" );
608 OSL_ENSURE( pAct,
"ScChangeAction::AddDependent: missing Action" );
620 mbEndOfList(bEndOfList)
643 OSL_FAIL(
"ScChangeActionIns: Block not supported!" );
650 const OUString& aUserP,
const DateTime& aDateTimeP,
653 ScChangeAction(eTypeP, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment),
654 mbEndOfList(bEndOfList)
670 pWhatId = STR_COLUMN;
679 OUString aRsc =
ScResId(STR_CHANGED_INSERT);
680 sal_Int32
nPos = aRsc.indexOf(
"#1");
685 OUString aRangeStr =
ScResId(pWhatId) +
689 aRsc = aRsc.replaceAt(
nPos, 2, aRangeStr);
738 pLinkMove( nullptr ),
763 OSL_FAIL(
"ScChangeActionDel: Block not supported!" );
770 const OUString& aUserP,
const DateTime& aDateTimeP,
const OUString &sComment,
772 ScChangeAction(eTypeP, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment),
776 pLinkMove( nullptr ),
850 sal_Int32 nDxP, sal_Int32 nDyP, sal_Int32 nDz )
867 p->GetBigRange().aStart.SetCol(
GetBigRange().aStart.Col() );
868 p->GetBigRange().aEnd.SetCol(
GetBigRange().aStart.Col() );
871 p->GetBigRange().aStart.SetRow(
GetBigRange().aStart.Row() );
872 p->GetBigRange().aEnd.SetRow(
GetBigRange().aStart.Row() );
875 p->GetBigRange().aStart.SetTab(
GetBigRange().aStart.Tab() );
876 p->GetBigRange().aEnd.SetTab(
GetBigRange().aStart.Tab() );
903 pWhatId = STR_COLUMN;
924 OUString aRsc =
ScResId(STR_CHANGED_DELETE);
925 sal_Int32
nPos = aRsc.indexOf(
"#1");
930 OUString aRangeStr =
ScResId(pWhatId) +
" " +
932 aRsc = aRsc.replaceAt(
nPos, 2, aRangeStr);
946 if ( !aTmpRange.
IsValid( rDoc ) )
1020 else if ( nFrom < 0 )
1030 else if ( nFrom < 0 )
1040 else if ( nFrom < 0 )
1093 const OUString& aUserP,
const DateTime& aDateTimeP,
1094 const OUString &sComment,
ScBigRange aFromBigRange,
1097 aFromRange(
std::move(aFromBigRange)),
1121 sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
1131 nDx = rToPos.
Col() - rFromPos.
Col();
1132 nDy = rToPos.
Row() - rFromPos.
Row();
1133 nDz = rToPos.
Tab() - rFromPos.
Tab();
1137 ScDocument& rDoc,
bool bSplitRange,
bool bWarning )
const
1143 OUString aRsc =
ScResId(STR_CHANGED_MOVE);
1146 sal_Int32
nPos = aRsc.indexOf(
"#1");
1149 aRsc = aRsc.replaceAt(
nPos, 2, aTmpStr);
1150 nPos += aTmpStr.getLength();
1157 aRsc = aRsc.replaceAt(
nPos, 2, aTmpStr);
1237 pNextContent(nullptr),
1238 pPrevContent(nullptr),
1239 pNextInSlot(nullptr),
1240 ppPrevInSlot(nullptr)
1245 const ScBigRange& aBigRangeP,
const OUString& aUserP,
1246 const DateTime& aDateTimeP,
const OUString& sComment,
1249 maOldCell(
std::move(aOldCell)),
1250 maOldValue(sOldValue),
1251 pNextContent(nullptr),
1252 pPrevContent(nullptr),
1253 pNextInSlot(nullptr),
1254 ppPrevInSlot(nullptr)
1259 if (!sOldValue.isEmpty())
1265 const ScDocument* pDoc,
const OUString& sNewValue ) :
1267 maNewCell(
std::move(aNewCell)),
1268 maNewValue(sNewValue),
1269 pNextContent(nullptr),
1270 pPrevContent(nullptr),
1271 pNextInSlot(nullptr),
1272 ppPrevInSlot(nullptr)
1277 if (!sNewValue.isEmpty())
1355 if (!rFormatted.isEmpty())
1363 if ( rStr.getLength() > 1 && rStr[0] ==
'=' )
1391 ScDocument& rDoc,
bool bSplitRange,
bool bWarning )
const
1395 OUString aRsc =
ScResId(STR_CHANGED_CELL);
1399 sal_Int32
nPos = aRsc.indexOf(
"#1", 0);
1402 aRsc = aRsc.replaceAt(
nPos, 2, aTmpStr);
1403 nPos += aTmpStr.getLength();
1407 if (aTmpStr.isEmpty())
1408 aTmpStr =
ScResId( STR_CHANGED_BLANK );
1413 aRsc = aRsc.replaceAt(
nPos, 2, aTmpStr);
1414 nPos += aTmpStr.getLength();
1418 if (aTmpStr.isEmpty())
1419 aTmpStr =
ScResId( STR_CHANGED_BLANK );
1424 aRsc = aRsc.replaceAt(
nPos, 2, aTmpStr);
1455 str =
"(" + str +
")";
1477 bool bOldest, ::std::stack<ScChangeActionContent*>* pRejectActions )
1484 while ( ( pContent = pContent->
pPrevContent ) !=
nullptr )
1491 while ( ( pContent = pContent->
pNextContent ) !=
nullptr )
1507 if ( bOldest || pEnd !=
this )
1513 aCell.
assign(rDoc, rPos);
1523 if ( pRejectActions )
1524 pRejectActions->push( pNew );
1527 aCell.
assign(rDoc, rPos);
1640 SetValue(rStr, rCell, nFormat, rOrgCell, pFromDoc, pToDoc);
1651 rCell.
assign(rOrgCell, *pToDoc);
1698 if (!rValue.isEmpty())
1729 OSL_FAIL(
"ScChangeActionContent::GetFormulaString: aPos != pCell->aPos" );
1757 if (!rValue.isEmpty())
1782 OSL_ENSURE( nC>0 && nR>0,
"ScChangeActionContent::PutValueToDoc: MatColsRows?" );
1800 rCell.
commit(*pDoc, aPos);
1839 sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz )
1844 if ( nNewSlot != nOldSlot )
1855 if ( !(bOldFormula || bNewFormula) )
1879 if ( nDx < 0 || nDy < 0 || nDz < 0 )
1978 const ScBigRange& aBigRangeP,
const OUString& aUserP,
1979 const DateTime& aDateTimeP,
const OUString& sComment) :
2000 if ( nRowsPerSlot * nMaxSlots < sal::static_int_cast<SCSIZE>(
rDoc.
GetMaxRowCount()) )
2002 return nRowsPerSlot;
2010 SC_MOD()->GetUserOptions().AddListener(
this);
2017 maUserCollection(
std::move(aTempUserCollection)),
2022 SC_MOD()->GetUserOptions().AddListener(
this);
2029 SC_MOD()->GetUserOptions().RemoveListener(
this);
2070 pNext =
p->GetNext();
2075 pNext =
p->GetNext();
2080 delete rEntry.second;
2112 ScChangeActionMap::const_iterator it =
aMap.find( nAction );
2113 if( it !=
aMap.end() )
2121 ScChangeActionMap::const_iterator it =
aGeneratedMap.find( nGenerated );
2147 if( it !=
aMap.end() )
2180 if (aFirstName.isEmpty() && aLastName.isEmpty())
2182 else if(!aFirstName.isEmpty() && aLastName.isEmpty())
2184 else if(aFirstName.isEmpty() && !aLastName.isEmpty())
2187 SetUser(aFirstName +
" " + aLastName);
2344 aMap.insert( ::std::make_pair( nAction, pAppend ) );
2410 rRange.
GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
2411 for (
SCTAB nTab = nTab1; nTab <= nTab2; nTab++ )
2413 if ( !pRefDoc || nTab < pRefDoc->GetTableCount() )
2421 for (
SCCOL nCol = nCol1; nCol <= nCol2; nCol++ )
2425 if ( nCol == nCol2 )
2428 nTab-nTab1 + nDz, nRejectingInsert );
2432 nTab-nTab1 + nDz, nRejectingInsert );
2437 for (
SCROW nRow = nRow1; nRow <= nRow2; nRow++ )
2441 if ( nRow == nRow2 )
2444 0, nRejectingInsert );
2448 else if ( nRow1 == 0 && nRow2 ==
rDoc.
MaxRow() )
2451 for (
SCCOL nCol = nCol1; nCol <= nCol2; nCol++ )
2455 if ( nCol == nCol2 )
2458 0, nRejectingInsert );
2463 OSL_FAIL(
"ScChangeTrack::AppendDeleteRange: Block not supported!" );
2475 ScRange aTrackRange( rOrgRange );
2497 if ( nRejectingInsert )
2514 for (
bool bHas = aIter.
first(); bHas; bHas = aIter.
next())
2557 return nC1 != nC2 || nR1 != nR2;
2586 aOldCell.
assign(*pRefDoc, rPos);
2647 rRange.
GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
2651 bDoContents =
false;
2660 nCol1 += nTmpCol + 1;
2667 nRow1 += nTmpRow + 1;
2674 nTab1 += nTmpTab + 1;
2699 for (
SCTAB nTab = nTab1; nTab <= nTab2; nTab++ )
2705 for (
SCCOL nCol = nCol1; nCol <= lastCol; nCol++ )
2710 for (
SCROW nRow = nRow1; nRow <= lastRow; nRow++ )
2743 while (aIter.
next());
2749 nStartAction = nEndAction = 0;
2774 pContent->RemoveDeletedIn( pDeletor );
2775 if (
IsGenerated( pContent->GetActionNumber() ) &&
2776 !pContent->IsDeletedIn() )
2790 rPos, rCell, pFromDoc, &
rDoc );
2809 if ( pContent->
pNext )
2811 if ( pContent->
pPrev )
2824 p =
p->GetNextInSlot() )
2826 if (
p != pButNotThis && !
p->IsDeletedIn() &&
2827 p->GetBigRange().aStart == rPos )
2884 OSL_FAIL(
"ScChangeTrack::Dependencies: MatOrg not found" );
2907 (bActNoInsert && !bActRowDel && !bActTabDel)) )
2921 (bActNoInsert && !bActColDel && !bActTabDel)) )
2935 (bActNoInsert && !bActColDel && !bActRowDel)) )
3001 if ( pRemove ==
pLast )
3010 if ( pRemove->
pNext )
3012 if ( pRemove->
pPrev )
3052 if ( nStartAction == 0 )
3056 if ( nEndAction && nStartAction <= nEndAction )
3062 for (
sal_uLong j = nEndAction; j >= nStartAction; --j )
3092 if ( nStart && nStart <= nEnd )
3097 for (
sal_uLong nCut = nStart; nCut <= nEnd; nCut++ )
3099 ScChangeActionMap::iterator itCut =
aPasteCutMap.find( nCut );
3103 OSL_ENSURE(
aMap.find( nCut ) ==
aMap.end(),
"ScChangeTrack::Undo: nCut dup" );
3104 Append( itCut->second, nCut );
3109 OSL_FAIL(
"ScChangeTrack::Undo: nCut not found" );
3166 GetOverAllRange().MakeRange(
rDoc ) );
3173 pAct = ( pAct == pFirstMerge ? nullptr : pAct->
GetPrev() );
3192 GetOverAllRange().MakeRange(
rDoc ) );
3248 bool bGeneratedDelContents =
3253 sal_Int32 nDx, nDy, nDz;
3254 nDx = nDy = nDz = 0;
3294 OSL_FAIL(
"ScChangeTrack::UpdateReference: unknown Type" );
3329 bool bUpdate =
true;
3333 if (
p->IsInsertType() )
3338 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3342 p->IsDeletedInDelType( eInsType ) )
3345 if ( aDelRange.
Contains(
p->GetBigRange().aStart ) )
3350 while (
pLink && bUpdate )
3353 if ( pDel && pDel->
GetType() == eInsType &&
3363 if ( aDelRange.
Contains(
p->GetBigRange() ) )
3369 if ( !
p->IsDeletedInDelType( eActType ) )
3371 p->SetDeletedIn( pActDel );
3373 if ( bGeneratedDelContents )
3390 switch (
p->GetType() )
3395 if ( aDelRange.
Contains(
p->GetBigRange().aStart ) )
3399 p->GetBigRange().aStart.IncCol();
3401 else if ( aDelRange.
Contains(
p->GetBigRange().aEnd ) )
3405 p->GetBigRange().aEnd.IncCol( -1 );
3412 if ( aDelRange.
Contains(
p->GetBigRange().aStart ) )
3416 p->GetBigRange().aStart.IncRow();
3418 else if ( aDelRange.
Contains(
p->GetBigRange().aEnd ) )
3422 p->GetBigRange().aEnd.IncRow( -1 );
3429 if ( aDelRange.
Contains(
p->GetBigRange().aStart ) )
3433 p->GetBigRange().aStart.IncTab();
3435 else if ( aDelRange.
Contains(
p->GetBigRange().aEnd ) )
3439 p->GetBigRange().aEnd.IncTab( -1 );
3528 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3529 if (
p->GetType() == eActType && !
p->IsRejected() &&
3531 p->GetBigRange().Contains( aDelRange ) )
3542 bool bUpdate =
true;
3543 if ( aDelRange.
Contains(
p->GetBigRange() ) )
3551 p->SetDeletedIn( pAct );
3554 if (
p->IsDeletedInDelType( eActType ) )
3556 if (
p->IsDeletedIn( pActDel ) )
3561 p->RemoveDeletedIn( pActDel );
3573 if (
p->GetType() == eActType && pActDel->
IsDeletedIn(
p ) )
3580 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3582 if ( !bGeneratedDelContents )
3592 bool bLastCutMove = ( pActMove ==
pLastCutMove.get() );
3606 if ( !
p->IsDeletedIn( pActMove ) )
3608 p->SetDeletedIn( pActMove );
3610 if ( bGeneratedDelContents )
3614 else if ( bLastCutMove &&
3640 p->UpdateReference(
this,
eMode, rFrom, nDx, nDy, nDz );
3654 if (
p->IsDeletedIn( pActMove ) )
3658 p->RemoveDeletedIn( pActMove );
3665 p->UpdateReference(
this,
eMode, rTo, nDx, nDy, nDz );
3666 if ( bActRejected &&
3672 p->AddLink( pActMove,
pLink );
3689 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3701 p->SetDeletedIn( pAct );
3715 p->SetDeletedIn( pAct );
3723 if ( !
p->IsDeletedIn( pAct )
3727 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3738 if ( !
p->IsDeletedIn( pAct )
3742 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3751 p->RemoveDeletedIn( pAct );
3765 p->RemoveDeletedIn( pAct );
3781 p->SetDeletedIn( pAct );
3791 if ( !
p->IsDeletedIn( pAct ) &&
p->GetActionNumber() <= pAct->
GetActionNumber() )
3793 p->UpdateReference(
this,
eMode, aRange, nDx, nDy, nDz );
3808 bool bIsMasterDelete = ( bListMasterDelete && pAct->
IsMasterDelete() );
3811 ::std::stack<ScChangeAction*> cStack;
3814 while ( !cStack.empty() )
3816 pCur = cStack.top();
3830 if ( !
IsGenerated(
n ) && rMap.insert( ::std::make_pair(
n,
p ) ).second )
3831 if (
p->HasDependent() )
3839 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3842 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3853 if ( !bAllFlat && bIsMasterDelete && pCur == pAct )
3862 if (!
p ||
p->GetType() !=
eType ||
3865 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3882 if ( !
IsGenerated(
n ) && rMap.insert( ::std::make_pair(
n,
p ) ).second )
3883 if (
p->HasDeleted() ||
3889 if (
p->IsDeleteType() )
3892 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3895 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3910 if (
p != pAct && rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) ).second )
3913 if ( bAllFlat && (
p->HasDeleted() ||
3930 if ( !
IsGenerated(
n ) && rMap.insert( ::std::make_pair(
n,
p ) ).second )
3931 if (
p->HasDependent() ||
p->HasDeleted() )
3939 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3942 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3955 rMap.insert( ::std::make_pair( pContent->
GetActionNumber(), pContent ) );
3962 rMap.insert( ::std::make_pair( pContent->
GetActionNumber(), pContent ) );
3974 if ( !
IsGenerated(
n ) && rMap.insert( ::std::make_pair(
n,
p ) ).second )
3975 if (
p->HasDependent() )
3979 rMap.insert( ::std::make_pair(
p->GetActionNumber(),
p ) );
3990 if (
p != pAct && rMap.find(
p->GetActionNumber() ) == rMap.end())
4009 if ( !pPrevContent || !pPrevContent->
IsVirgin() )
4011 pContent = pPrevContent;
4040 ::std::stack<ScChangeActionContent*> aRejectActions;
4045 if (
p != pContent )
4051 bOldest, &aRejectActions );
4055 OSL_FAIL(
"ScChangeTrack::SelectContent: content dependent no content" );
4061 bOk &= pContent->
Select(
rDoc,
this, bOldest,
nullptr );
4064 while ( !aRejectActions.empty() )
4067 aRejectActions.pop();
4077 return pContent->
Select(
rDoc,
this, bOldest,
nullptr );
4099 for(
auto& rEntry : aActionMap )
4101 rEntry.second->Accept();
4113 if (
p->IsInternalRejectable() )
4129 std::unique_ptr<ScChangeActionMap> pMap;
4135 bool bRejected =
Reject( pAct, pMap.get(),
false );
4146 bool bRejected =
false;
4151 OSL_ENSURE( pMap,
"ScChangeTrack::Reject: Insert without map" );
4152 ScChangeActionMap::reverse_iterator itChangeAction;
4153 for (itChangeAction = pMap->rbegin();
4154 itChangeAction != pMap->rend() && bOk; ++itChangeAction)
4158 itChangeAction->second->SetRejected();
4159 else if ( itChangeAction->second->IsDeleteType() )
4160 itChangeAction->second->Accept();
4162 bOk =
Reject( itChangeAction->second,
nullptr,
true );
4178 OSL_ENSURE( !pMap,
"ScChangeTrack::Reject: Delete with map" );
4181 bool bTabDel, bTabDelOk;
4195 bTabDel = bTabDelOk =
false;
4202 bool bOneOk =
false;
4256 }
while ( bOk && bLoop &&
p &&
p->GetType() == eActType &&
4260 if ( bOneOk || (bTabDel && bTabDelOk) )
4274 OSL_ENSURE( pMap,
"ScChangeTrack::Reject: Move without Map" );
4275 ScChangeActionMap::reverse_iterator itChangeAction;
4277 for( itChangeAction = pMap->rbegin(); itChangeAction != pMap->rend() && bOk; ++itChangeAction )
4279 bOk =
Reject( itChangeAction->second,
nullptr,
true );
4311 if ( bRejected && !bRecursion )
4325 OSL_FAIL(
"ScChangeTrack::Reject: say what?" );
4368 std::unique_ptr<ScChangeTrack> pClonedTrack(
new ScChangeTrack( *pDocument ));
4372 ::std::stack< const ScChangeAction* > aGeneratedStack;
4374 while ( pGenerated )
4376 aGeneratedStack.push( pGenerated );
4377 pGenerated = pGenerated->
GetNext();
4379 while ( !aGeneratedStack.empty() )
4381 pGenerated = aGeneratedStack.top();
4382 aGeneratedStack.pop();
4388 aClonedNewCell.
assign(rNewCell, *pDocument);
4389 OUString aNewValue = rContent.
GetNewString( pDocument );
4391 pClonedTrack->AddLoadedGenerated(aClonedNewCell, pGenerated->
GetBigRange(), aNewValue);
4407 bool bEndOfList =
static_cast<const ScChangeActionIns*
>(pAction)->IsEndOfList();
4447 pClonedTrack.get() );
4453 assert(pMove &&
"ScChangeTrack::Clone: pMove is null!");
4463 pMove->GetFromRange(),
4464 pClonedTrack.get() );
4472 aClonedOldCell.
assign(rOldCell, *pDocument);
4473 OUString aOldValue = rContent.
GetOldString( pDocument );
4483 std::move(aClonedOldCell),
4491 aClonedNewCell.
assign(rNewCell, *pDocument);
4492 pClonedContent->
SetNewValue(aClonedNewCell, pDocument);
4495 pClonedAction = pClonedContent;
4516 if ( pClonedAction )
4518 pClonedTrack->AppendCloned( pClonedAction );
4524 if ( pClonedTrack->GetLast() )
4526 pClonedTrack->SetActionMax( pClonedTrack->GetLast()->GetActionNumber() );
4535 ::std::stack< sal_uLong > aStack;
4547 if ( pClonedAction )
4549 while ( !aStack.empty() )
4551 ScChangeAction* pClonedDeleted = pClonedTrack->GetActionOrGenerated( aStack.top() );
4553 if ( pClonedDeleted )
4569 ::std::stack< sal_uLong > aStack;
4581 if ( pClonedAction )
4583 while ( !aStack.empty() )
4585 ScChangeAction* pClonedDependent = pClonedTrack->GetActionOrGenerated( aStack.top() );