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() );
4587 if ( pClonedDependent )
4600 while ( pClonedAction )
4602 pClonedTrack->MasterLinks( pClonedAction );
4603 pClonedAction = pClonedAction->
GetNext();
4611 if ( pClonedTrack->GetLast() )
4613 pClonedTrack->SetLastSavedActionNumber( pClonedTrack->GetLast()->GetActionNumber() );
4616 auto tmp = pClonedTrack.get();
4648 rRedlines.
put(
"index",
static_cast<sal_Int64
>(
nIndex));
4652 rRedlines.
put(
"type",
"Modify");
4657 rRedlines.
put(
"description", aDescription);
4660 rRedlines.
put(
"dateTime", sDateTime);
4665 auto redlinesNode = aRedlines.
startArray(
"redlines");
4673 while (pAction != pLastAction)
void ScColToAlpha(OUStringBuffer &rBuf, SCCOL nCol)
append alpha representation of column to buffer
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 ...
static void lcl_getTrackedChange(ScDocument &rDoc, int nIndex, const ScChangeAction *pAction, tools::JsonWriter &rRedlines)
Get info about a single ScChangeAction element.
static void lcl_InvalidateReference(const ScDocument &rDoc, formula::FormulaToken &rTok, const ScBigAddress &rPos)
std::map< sal_uLong, ScChangeAction * > ScChangeActionMap
std::vector< ScChangeTrackMsgInfo > ScChangeTrackMsgQueue
class SAL_DLLPUBLIC_RTTI ScChangeActionMove
#define SC_CHGTRACK_GENERATED_START
ScChangeActionContentCellType
void ConvertToLocalTime()
css::util::DateTime GetUNODateTime() const
void IncTab(SCTAB nDelta=1)
void Set(SCCOL nCol, SCROW nRow, SCTAB nTab)
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
void IncCol(SCCOL nDelta=1)
void IncRow(SCROW nDelta=1)
bool IsValid(const ScDocument &rDoc) const
void SetCol(sal_Int64 nColP)
ScAddress MakeAddress(const ScDocument &rDoc) const
void SetTab(sal_Int64 nTabP)
void IncRow(sal_Int64 n=1)
void IncCol(sal_Int64 n=1)
void SetRow(sal_Int64 nRowP)
void IncTab(sal_Int64 n=1)
void Set(sal_Int64 nColP, sal_Int64 nRowP, sal_Int64 nTabP)
bool Intersects(const ScBigRange &) const
do two ranges overlap?
static constexpr sal_Int64 nRangeMin
bool IsValid(const ScDocument &rDoc) const
static constexpr sal_Int64 nRangeMax
bool Contains(const ScBigAddress &) const
is Address& in range?
ScRange MakeRange(const ScDocument &rDoc) const
Walk through all cells in an area.
const ScAddress & GetPos() const
const ScRefCellValue & getRefCellValue() const
ScCellValue getCellValue() const
bool IsTopContent() const
void PutOldValueToDoc(ScDocument *, SCCOL nDx, SCROW nDy) const
static bool NeedsNumberFormat(const ScCellValue &rVal)
virtual ~ScChangeActionContent() override
ScChangeActionContent * GetNextContent() const
OUString GetFormulaString(const ScFormulaCell *pCell) const
void SetOldValue(const ScCellValue &rCell, const ScDocument *pFromDoc, ScDocument *pToDoc, sal_uLong nFormat)
void InsertInSlot(ScChangeActionContent **pp)
ScChangeActionContent * GetPrevContent() const
virtual OUString GetRefString(ScDocument &rDoc, bool bFlag3D=false) const override
ScChangeActionContent * pNextContent
bool IsMatrixOrigin() const
virtual void UpdateReference(const ScChangeTrack *, UpdateRefMode, const ScBigRange &, sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz) override
void PutValueToDoc(const ScCellValue &rCell, const OUString &rValue, ScDocument *pDoc, SCCOL nDx, SCROW nDy) const
static void SetValue(OUString &rStr, ScCellValue &rCell, const ScAddress &rPos, const ScCellValue &rOrgCell, const ScDocument *pFromDoc, ScDocument *pToDoc)
static ScChangeActionContentCellType GetContentCellType(const ScCellValue &rCell)
void SetValueString(OUString &rValue, ScCellValue &rCell, const OUString &rStr, ScDocument *pDoc)
void SetNewValue(const ScCellValue &rCell, ScDocument *pDoc)
virtual ScChangeActionLinkEntry * GetDeletedIn() const override
void SetPrevContent(ScChangeActionContent *p)
const ScCellValue & GetNewCell() const
virtual ScChangeActionLinkEntry ** GetDeletedInAddress() override
void SetOldNewCells(const ScCellValue &rOldCell, sal_uLong nOldFormat, const ScCellValue &rNewCell, sal_uLong nNewFormat, const ScDocument *pDoc)
virtual OUString GetDescription(ScDocument &rDoc, bool bSplitRange=false, bool bWarning=true) const override
bool IsOldMatrixReference() const
virtual bool Reject(ScDocument &rDoc) override
void SetNextContent(ScChangeActionContent *p)
static void SetCell(OUString &rStr, ScCellValue &rCell, sal_uLong nFormat, const ScDocument *pDoc)
void SetNewCell(const ScCellValue &rCell, const ScDocument *pDoc, const OUString &rFormatted)
const ScCellValue & GetOldCell() const
OUString GetValueString(const OUString &rValue, const ScCellValue &rCell, const ScDocument *pDoc) const
static OUString GetStringOfCell(const ScCellValue &rCell, const ScDocument *pDoc, const ScAddress &rPos)
ScChangeActionContent * GetTopContent() const
OUString GetOldString(const ScDocument *pDoc) const
void PutNewValueToDoc(ScDocument *, SCCOL nDx, SCROW nDy) const
OUString GetNewString(const ScDocument *pDoc) const
bool Select(ScDocument &, ScChangeTrack *, bool bOldest, ::std::stack< ScChangeActionContent * > *pRejectActions)
ScChangeActionContent * pPrevContent
short GetCutOffTo() const
short GetCutOffFrom() const
ScChangeActionMove * GetMove()
bool IsBaseDelete() const
bool IsMultiDelete() const
virtual void UpdateReference(const ScChangeTrack *, UpdateRefMode, const ScBigRange &, sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz) override
ScChangeActionDelMoveEntry * AddCutOffMove(ScChangeActionMove *pMove, short nFrom, short nTo)
virtual void AddContent(ScChangeActionContent *) override
std::vector< ScChangeActionContent * > mvCells
void SetCutOffInsert(ScChangeActionIns *p, short n)
virtual void DeleteCellEntries() override
bool IsTabDeleteCol() const
ScChangeActionDelMoveEntry * pLinkMove
virtual ~ScChangeActionDel() override
ScBigRange GetOverAllRange() const
virtual bool Reject(ScDocument &rDoc) override
virtual OUString GetDescription(ScDocument &rDoc, bool bSplitRange=false, bool bWarning=true) const override
ScChangeActionIns * pCutOff
virtual bool Reject(ScDocument &rDoc) override
virtual ~ScChangeActionIns() override
virtual OUString GetDescription(ScDocument &rDoc, bool bSplitRange=false, bool bWarning=true) const override
SC_DLLPUBLIC bool IsEndOfList() const
A link/connection/dependency between change actions.
const ScChangeAction * GetAction() const
const ScChangeActionLinkEntry * GetNext() const
void SetLink(ScChangeActionLinkEntry *pLinkP)
virtual ~ScChangeActionMove() override
virtual void UpdateReference(const ScChangeTrack *, UpdateRefMode, const ScBigRange &, sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz) override
std::vector< ScChangeActionContent * > mvCells
virtual void AddContent(ScChangeActionContent *) override
sal_uLong GetEndLastCut() const
ScBigRange & GetFromRange()
virtual bool Reject(ScDocument &rDoc) override
virtual OUString GetDescription(ScDocument &rDoc, bool bSplitRange=false, bool bWarning=true) const override
SC_DLLPUBLIC void GetDelta(sal_Int32 &nDx, sal_Int32 &nDy, sal_Int32 &nDz) const
sal_uLong GetStartLastCut() const
virtual OUString GetRefString(ScDocument &rDoc, bool bFlag3D=false) const override
virtual void DeleteCellEntries() override
virtual bool Reject(ScDocument &rDoc) override
ScChangeActionReject(const sal_uLong nActionNumber, const ScChangeActionState eState, const sal_uLong nRejectingNumber, const ScBigRange &aBigRange, const OUString &aUser, const DateTime &aDateTime, const OUString &sComment)
ScChangeActionLinkEntry * pLinkDeleted
void SetDeletedInThis(sal_uLong nActionNumber, const ScChangeTrack *pTrack)
void SetDeletedIn(ScChangeAction *)
ScChangeActionLinkEntry * pLinkDependent
ScChangeAction(const ScChangeAction &)=delete
void SetRejectAction(sal_uLong n)
const OUString & GetComment() const
virtual ScChangeActionLinkEntry ** GetDeletedInAddress()
void SetComment(const OUString &rStr)
ScBigRange & GetBigRange()
friend class ScChangeActionMove
void SetUser(const OUString &r)
virtual const ScChangeTrack * GetChangeTrack() const =0
bool IsMasterDelete() const
virtual void UpdateReference(const ScChangeTrack *, UpdateRefMode, const ScBigRange &, sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz)
void SetActionNumber(sal_uLong n)
bool IsDialogRoot() const
sal_uLong GetRejectAction() const
bool IsDialogParent() const
friend class ScChangeActionContent
sal_uLong GetActionNumber() const
void AddLink(ScChangeAction *p, ScChangeActionLinkEntry *pL)
const DateTime & GetDateTimeUTC() const
virtual ~ScChangeAction()
void SetDateTimeUTC(const DateTime &rDT)
void SetType(ScChangeActionType e)
ScChangeActionType GetType() const
ScChangeActionLinkEntry * pLinkAny
const ScChangeActionLinkEntry * GetFirstDependentEntry() const
virtual ScChangeActionLinkEntry * GetDeletedIn() const
bool RemoveDeletedIn(const ScChangeAction *)
friend class ScChangeActionIns
friend class ScChangeActionDel
bool HasDependent() const
void RejectRestoreContents(ScChangeTrack *, SCCOL nDx, SCROW nDy)
bool IsDeleteType() const
void SetState(ScChangeActionState e)
const ScChangeActionLinkEntry * GetFirstDeletedEntry() const
bool IsRejectable() const
virtual OUString GetDescription(ScDocument &rDoc, bool bSplitRange=false, bool bWarning=true) const
bool IsDeletedInDelType(ScChangeActionType) const
bool IsInsertType() const
ScChangeAction * GetNext() const
ScChangeAction * GetPrev() const
bool IsInternalRejectable() const
void RemoveAllDependent()
ScChangeActionState eState
SC_DLLPUBLIC DateTime GetDateTime() const
virtual bool Reject(ScDocument &rDoc)=0
OUString GetRefString(const ScBigRange &rRange, const ScDocument &rDoc, bool bFlag3D=false) const
virtual void DeleteCellEntries()=0
ScChangeActionState GetState() const
ScChangeActionLinkEntry * pLinkDeletedIn
const OUString & GetUser() const
SC_DLLPUBLIC bool IsAccepted() const
void RemoveAllDeletedIn()
ScChangeActionLinkEntry * AddDependent(ScChangeAction *p)
ScDocument & GetDocument() const
std::optional< ScChangeTrackMsgInfo > xBlockModifyMsg
ScChangeActionContent * SearchContentAt(const ScBigAddress &, const ScChangeAction *pButNotThis) const
ScChangeTrackMsgStack aMsgStackFinal
bool SelectContent(ScChangeAction *, bool bOldest=false)
void GetChangeTrackInfo(tools::JsonWriter &)
Get info about all ScChangeAction elements.
void EndBlockModify(sal_uLong nEndAction)
void AppendLoaded(std::unique_ptr< ScChangeAction > pAppend)
ScChangeAction * GetLast() const
void AppendCloned(ScChangeAction *pAppend)
SC_DLLPUBLIC void AppendInsert(const ScRange &rRange, bool bEndOfList=false)
ScChangeActionMap aPasteCutMap
void AppendOneDeleteRange(const ScRange &rOrgRange, ScDocument *pRefDoc, SCCOL nDx, SCROW nDy, SCTAB nDz, sal_uLong nRejectingInsert)
SCROW mnContentRowsPerSlot
SC_DLLPUBLIC ScChangeTrack * Clone(ScDocument *pDocument) const
void SetLastSavedActionNumber(sal_uLong nNew)
void MergePrepare(const ScChangeAction *pFirstMerge, bool bShared)
may only be used in a temporary opened document.
SC_DLLPUBLIC ScChangeAction * GetAction(sal_uLong nAction) const
void Append(ScChangeAction *pAppend, sal_uLong nAction)
ScChangeActionContent * GenerateDelContent(const ScAddress &rPos, const ScCellValue &rCell, const ScDocument *pFromDoc)
bool IsLastAction(sal_uLong nNum) const
void SetMergeState(ScChangeTrackMergeState eState)
virtual void ConfigurationChanged(utl::ConfigurationBroadcaster *, ConfigurationHints) override
void DeleteCellEntries(std::vector< ScChangeActionContent * > &, const ScChangeAction *pDeletor)
SC_DLLPUBLIC ScChangeActionContent * AppendContentOnTheFly(const ScAddress &rPos, const ScCellValue &rOldCell, const ScCellValue &rNewCell, sal_uLong nOldFormat=0, sal_uLong nNewFormat=0)
SC_DLLPUBLIC void SetUser(const OUString &rUser)
ScChangeAction * GetActionOrGenerated(sal_uLong nAction) const
ScChangeAction * GetLastSaved() const
ScChangeAction * GetGenerated(sal_uLong nGenerated) const
void AddDependentWithNotify(ScChangeAction *pParent, ScChangeAction *pDependent)
std::set< OUString > maUserCollection
void LookUpContents(const ScRange &rOrgRange, ScDocument *pRefDoc, SCCOL nDx, SCROW nDy, SCTAB nDz)
SC_DLLPUBLIC void AppendMove(const ScRange &rFromRange, const ScRange &rToRange, ScDocument *pRefDoc)
ScChangeActionLinkEntry * pLinkInsertTab
void SetInDeleteRange(const ScRange &rRange)
void AppendContentsIfInRefDoc(ScDocument &rRefDoc, sal_uLong &nStartAction, sal_uLong &nEndAction)
void SetInDeleteTop(bool bVal)
void UpdateReference(ScChangeAction *, bool bUndo)
void AppendContentRange(const ScRange &rRange, ScDocument *pRefDoc, sal_uLong &nStartAction, sal_uLong &nEndAction, ScChangeActionClipMode eMode=SC_CACM_NONE)
sal_uLong GetActionMax() const
ScChangeActionContent ** GetContentSlots() const
void MergeOwn(ScChangeAction *pAct, sal_uLong nFirstMerge, bool bShared)
bool IsInPasteCut() const
SC_DLLPUBLIC void GetDependents(ScChangeAction *, ScChangeActionMap &, bool bListMasterDelete=false, bool bAllFlat=false) const
ScChangeActionLinkEntry * pLinkInsertRow
void DeleteGeneratedDelContent(ScChangeActionContent *)
void NotifyModified(ScChangeTrackMsgType eMsgType, sal_uLong nStartAction, sal_uLong nEndAction)
static bool MergeIgnore(const ScChangeAction &, sal_uLong nFirstMerge)
sal_uLong AddLoadedGenerated(const ScCellValue &rNewCell, const ScBigRange &aBigRange, const OUString &sNewValue)
ScChangeTrackMsgQueue & GetMsgQueue()
SC_DLLPUBLIC bool Accept(ScChangeAction *)
SCSIZE ComputeContentSlot(sal_Int32 nRow) const
ScChangeTrack(const ScChangeTrack &)=delete
ScChangeTrackMsgQueue aMsgQueue
void SetLastMerge(sal_uLong nVal)
void StartBlockModify(ScChangeTrackMsgType, sal_uLong nStartAction)
static bool IsMatrixFormulaRangeDifferent(const ScCellValue &rOldCell, const ScCellValue &rNewCell)
SCROW InitContentRowsPerSlot()
bool IsGenerated(sal_uLong nAction) const
sal_uLong GetLastMerge() const
ScChangeTrackMergeState GetMergeState() const
void SetLastCutMoveRange(const ScRange &, ScDocument *)
SC_DLLPUBLIC void Undo(sal_uLong nStartAction, sal_uLong nEndAction, bool bMerge=false)
void MasterLinks(ScChangeAction *)
void SetInDelete(bool bVal)
ScChangeActionContent * pFirstGeneratedDelContent
void Remove(ScChangeAction *)
const css::uno::Sequence< sal_Int8 > & GetProtection() const
std::unique_ptr< ScChangeActionContent *[]> ppContentSlots
const ScRange & GetInDeleteRange() const
void Dependencies(ScChangeAction *)
ScChangeActionMap aGeneratedMap
bool Reject(ScChangeAction *, ScChangeActionMap *, bool bRecursion)
bool IsTimeNanoSeconds() const
SC_DLLPUBLIC void AppendDeleteRange(const ScRange &, ScDocument *pRefDoc, SCTAB nDz, sal_uLong nRejectingInsert)
Link< ScChangeTrack &, void > aModifiedLink
void AppendContent(const ScAddress &rPos, const ScDocument *pRefDoc)
sal_uLong GetLastSavedActionNumber() const
static void MergeActionState(ScChangeAction *pAct, const ScChangeAction *pOtherAct)
ScChangeActionContent * GetFirstGenerated() const
bool IsInDeleteTop() const
std::unique_ptr< ScChangeActionMove > pLastCutMove
ScChangeActionLinkEntry * pLinkMove
void SetInDeleteUndo(bool bVal)
ScChangeActionLinkEntry * pLinkInsertCol
void SetInPasteCut(bool bVal)
ScChangeTrackMergeState eMergeState
ScChangeAction * GetFirst() const
virtual SC_DLLPUBLIC ~ScChangeTrack() override
ScChangeTrackMsgStack aMsgStackTmp
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
void SetEmptyCell(const ScAddress &rPos)
ScSheetLimits & GetSheetLimits() const
SC_DLLPUBLIC sal_uInt32 GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC void SetChangeTrack(std::unique_ptr< ScChangeTrack > pTrack)
only for import filter, deletes any existing ChangeTrack via EndChangeTracking() and takes ownership ...
bool CanInsertCol(const ScRange &rRange) const
SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, const OUString &rFormula, const ScTokenArray *p=nullptr, const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT)
SC_DLLPUBLIC bool ValidNewTabName(const OUString &rName) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC SCROW GetMaxRowCount() const
void SetExpandRefs(bool bVal)
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
SC_DLLPUBLIC SCROW MaxRow() const
void UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, bool bIncludeDraw=true, bool bUpdateNoteCaptionPos=true)
SC_DLLPUBLIC SCROW GetLastDataRow(SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCROW nLastRow) const
Return the last non-empty row position in given columns that's no greater than the initial last row p...
bool GetNoListening() const
SC_DLLPUBLIC bool GetAutoCalc() const
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
void DeleteRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, bool *pUndoOutline=nullptr, const ScMarkData *pTabMark=nullptr)
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
bool CanInsertRow(const ScRange &rRange) const
SfxObjectShell * GetDocumentShell() const
SC_DLLPUBLIC SCCOL ClampToAllocatedColumns(SCTAB nTab, SCCOL nCol) const
void DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, bool *pUndoOutline=nullptr, const ScMarkData *pTabMark=nullptr)
bool IsExpandRefs() const
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
bool IsInDtorClear() const
SCTAB GetMaxTableNumber() const
SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, InsertDeleteFlags nDelFlag)
SC_DLLPUBLIC bool DeleteTab(SCTAB nTab)
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
void SetNoListening(bool bVal)
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
bool InsertCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
bool InsertRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
static SC_DLLPUBLIC OUString GetString(const EditTextObject &rEditText, const ScDocument *pDoc)
Retrieves string with paragraphs delimited by new lines (' ').
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
void SelectOneTable(SCTAB nTab)
void SetMarkArea(const ScRange &rRange)
sal_uInt32 GetNumberFormat(SvNumberFormatter *) const
void GetVars(SCCOL &nCol1, SCROW &nRow1, SCTAB &nTab1, SCCOL &nCol2, SCROW &nRow2, SCTAB &nTab2) const
OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
static ScRefUpdateRes Update(const ScDocument *pDoc, UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCCOL nDx, SCROW nDy, SCTAB nDz, SCCOL &theCol1, SCROW &theRow1, SCTAB &theTab1, SCCOL &theCol2, SCROW &theRow2, SCTAB &theTab2)
OUString GetFirstName() const
OUString GetLastName() const
const OUString & getString() const
OUString toISO8601(const css::util::DateTime &rDateTime)
HashMap_OWString_Interface aMap
OUString ScResId(TranslateId aId)
Store arbitrary cell value of any kind.
void assign(const ScDocument &rDoc, const ScAddress &rPos)
Take cell value from specified position in specified document.
const svl::SharedString * getSharedString() const
ScFormulaCell * getFormula() const
EditTextObject * getEditText() const
void commit(ScDocument &rDoc, const ScAddress &rPos) const
Set cell value at specified position in specified document.
This is very similar to ScCellValue, except that it references the original value instead of copying ...
ScFormulaCell * getFormula() const
const SCROW mnMaxRow
Maximum addressable column.
Single reference (one address) into the sheet.
void SetColDeleted(bool bVal)
void SetRowDeleted(bool bVal)
void SetTabDeleted(bool bVal)
Context for reference update during shifting, moving or copying of cell ranges.
SCROW mnRowDelta
Amount and direction of movement in the row direction.
UpdateRefMode meMode
update mode - insert/delete, copy, or move.
SCCOL mnColDelta
Amount and direction of movement in the column direction.
SCTAB mnTabDelta
Amount and direction of movement in the sheet direction.
ScRange maRange
Range of cells that are about to be moved for insert/delete/move modes.
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW