diff options
Diffstat (limited to 'sc/source/core/tool/chgtrack.cxx')
-rw-r--r-- | sc/source/core/tool/chgtrack.cxx | 554 |
1 files changed, 277 insertions, 277 deletions
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index ba3f3e47bfb7..3cabca7b7647 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -61,10 +61,10 @@ DECLARE_STACK( ScChangeActionStack, ScChangeAction* ) -const USHORT nMemPoolChangeActionCellListEntry = (0x2000 - 64) / sizeof(ScChangeActionCellListEntry); +const sal_uInt16 nMemPoolChangeActionCellListEntry = (0x2000 - 64) / sizeof(ScChangeActionCellListEntry); IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionCellListEntry, nMemPoolChangeActionCellListEntry, nMemPoolChangeActionCellListEntry ) -const USHORT nMemPoolChangeActionLinkEntry = (0x8000 - 64) / sizeof(ScChangeActionLinkEntry); +const sal_uInt16 nMemPoolChangeActionLinkEntry = (0x8000 - 64) / sizeof(ScChangeActionLinkEntry); IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionLinkEntry, nMemPoolChangeActionLinkEntry, nMemPoolChangeActionLinkEntry ) // loaded MSB > eigenes => inkompatibel @@ -115,7 +115,7 @@ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScRange& rRange } ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRange, - const ULONG nTempAction, const ULONG nTempRejectAction, + const sal_uLong nTempAction, const sal_uLong nTempRejectAction, const ScChangeActionState eTempState, const DateTime& aTempDateTime, const String& aTempUser, const String& aTempComment) : @@ -137,7 +137,7 @@ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRa } ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& rRange, - const ULONG nTempAction) + const sal_uLong nTempAction) : aBigRange( rRange ), pNext( NULL ), @@ -161,45 +161,45 @@ ScChangeAction::~ScChangeAction() } -BOOL ScChangeAction::IsVisible() const +sal_Bool ScChangeAction::IsVisible() const { //! sequence order of execution is significant if ( IsRejected() || GetType() == SC_CAT_DELETE_TABS || IsDeletedIn() ) - return FALSE; + return sal_False; if ( GetType() == SC_CAT_CONTENT ) return ((ScChangeActionContent*)this)->IsTopContent(); - return TRUE; + return sal_True; } -BOOL ScChangeAction::IsTouchable() const +sal_Bool ScChangeAction::IsTouchable() const { //! sequence order of execution is significant if ( IsRejected() || GetType() == SC_CAT_REJECT || IsDeletedIn() ) - return FALSE; + return sal_False; // content may reject and be touchable if on top if ( GetType() == SC_CAT_CONTENT ) return ((ScChangeActionContent*)this)->IsTopContent(); if ( IsRejecting() ) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } -BOOL ScChangeAction::IsClickable() const +sal_Bool ScChangeAction::IsClickable() const { //! sequence order of execution is significant if ( !IsVirgin() ) - return FALSE; + return sal_False; if ( IsDeletedIn() ) - return FALSE; + return sal_False; if ( GetType() == SC_CAT_CONTENT ) { ScChangeActionContentCellType eCCT = ScChangeActionContent::GetContentCellType( ((ScChangeActionContent*)this)->GetNewCell() ); if ( eCCT == SC_CACCT_MATREF ) - return FALSE; + return sal_False; if ( eCCT == SC_CACCT_MATORG ) { // no Accept-Select if one of the references is in a deleted col/row const ScChangeActionLinkEntry* pL = @@ -208,101 +208,101 @@ BOOL ScChangeAction::IsClickable() const { ScChangeAction* p = (ScChangeAction*) pL->GetAction(); if ( p && p->IsDeletedIn() ) - return FALSE; + return sal_False; pL = pL->GetNext(); } } - return TRUE; // for Select() a content doesn't have to be touchable + return sal_True; // for Select() a content doesn't have to be touchable } return IsTouchable(); // Accept()/Reject() only on touchables } -BOOL ScChangeAction::IsRejectable() const +sal_Bool ScChangeAction::IsRejectable() const { //! sequence order of execution is significant if ( !IsClickable() ) - return FALSE; + return sal_False; if ( GetType() == SC_CAT_CONTENT ) { if ( ((ScChangeActionContent*)this)->IsOldMatrixReference() ) - return FALSE; + return sal_False; ScChangeActionContent* pNextContent = ((ScChangeActionContent*)this)->GetNextContent(); if ( pNextContent == NULL ) - return TRUE; // *this is TopContent + return sal_True; // *this is TopContent return pNextContent->IsRejected(); // *this is next rejectable } return IsTouchable(); } -BOOL ScChangeAction::IsInternalRejectable() const +sal_Bool ScChangeAction::IsInternalRejectable() const { //! sequence order of execution is significant if ( !IsVirgin() ) - return FALSE; + return sal_False; if ( IsDeletedIn() ) - return FALSE; + return sal_False; if ( GetType() == SC_CAT_CONTENT ) { ScChangeActionContent* pNextContent = ((ScChangeActionContent*)this)->GetNextContent(); if ( pNextContent == NULL ) - return TRUE; // *this is TopContent + return sal_True; // *this is TopContent return pNextContent->IsRejected(); // *this is next rejectable } return IsTouchable(); } -BOOL ScChangeAction::IsDialogRoot() const +sal_Bool ScChangeAction::IsDialogRoot() const { return IsInternalRejectable(); // only rejectables in root } -BOOL ScChangeAction::IsDialogParent() const +sal_Bool ScChangeAction::IsDialogParent() const { //! sequence order of execution is significant if ( GetType() == SC_CAT_CONTENT ) { if ( !IsDialogRoot() ) - return FALSE; + return sal_False; if ( ((ScChangeActionContent*)this)->IsMatrixOrigin() && HasDependent() ) - return TRUE; + return sal_True; ScChangeActionContent* pPrevContent = ((ScChangeActionContent*)this)->GetPrevContent(); return pPrevContent && pPrevContent->IsVirgin(); } if ( HasDependent() ) - return IsDeleteType() ? TRUE : !IsDeletedIn(); + return IsDeleteType() ? sal_True : !IsDeletedIn(); if ( HasDeleted() ) { if ( IsDeleteType() ) { if ( IsDialogRoot() ) - return TRUE; + return sal_True; ScChangeActionLinkEntry* pL = pLinkDeleted; while ( pL ) { ScChangeAction* p = pL->GetAction(); if ( p && p->GetType() != eType ) - return TRUE; + return sal_True; pL = pL->GetNext(); } } else - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ScChangeAction::IsMasterDelete() const +sal_Bool ScChangeAction::IsMasterDelete() const { if ( !IsDeleteType() ) - return FALSE; + return sal_False; ScChangeActionDel* pDel = (ScChangeActionDel*) this; return pDel->IsMultiDelete() && (pDel->IsTopDelete() || pDel->IsRejectable()); } @@ -324,9 +324,9 @@ void ScChangeAction::RemoveAllAnyLinks() } -BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p ) +sal_Bool ScChangeAction::RemoveDeletedIn( const ScChangeAction* p ) { - BOOL bRemoved = FALSE; + sal_Bool bRemoved = sal_False; ScChangeActionLinkEntry* pL = GetDeletedIn(); while ( pL ) { @@ -334,7 +334,7 @@ BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p ) if ( pL->GetAction() == p ) { delete pL; - bRemoved = TRUE; + bRemoved = sal_True; } pL = pNextLink; } @@ -342,16 +342,16 @@ BOOL ScChangeAction::RemoveDeletedIn( const ScChangeAction* p ) } -BOOL ScChangeAction::IsDeletedIn( const ScChangeAction* p ) const +sal_Bool ScChangeAction::IsDeletedIn( const ScChangeAction* p ) const { ScChangeActionLinkEntry* pL = GetDeletedIn(); while ( pL ) { if ( pL->GetAction() == p ) - return TRUE; + return sal_True; pL = pL->GetNext(); } - return FALSE; + return sal_False; } @@ -363,7 +363,7 @@ void ScChangeAction::RemoveAllDeletedIn() } -BOOL ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const +sal_Bool ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const { ScChangeAction* p; ScChangeActionLinkEntry* pL = GetDeletedIn(); @@ -389,11 +389,11 @@ BOOL ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const { if ( (p = pL->GetAction()) != NULL && (p->GetType() == eDelType || p->GetType() == eInsType) ) - return TRUE; + return sal_True; pL = pL->GetNext(); } } - return FALSE; + return sal_False; } @@ -433,14 +433,14 @@ DateTime ScChangeAction::GetDateTime() const void ScChangeAction::UpdateReference( const ScChangeTrack* /* pTrack */, UpdateRefMode eMode, const ScBigRange& rRange, - INT32 nDx, INT32 nDy, INT32 nDz ) + sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz ) { ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, GetBigRange() ); } void ScChangeAction::GetDescription( String& rStr, ScDocument* /* pDoc */, - BOOL /* bSplitRange */, bool bWarning ) const + sal_Bool /* bSplitRange */, bool bWarning ) const { if ( IsRejecting() && bWarning ) { @@ -483,7 +483,7 @@ void ScChangeAction::GetDescription( String& rStr, ScDocument* /* pDoc */, else if (pReject->HasDependent()) { ScChangeActionTable aTable; - pCT->GetDependents( pReject, aTable, FALSE, TRUE ); + pCT->GetDependents( pReject, aTable, sal_False, sal_True ); for ( const ScChangeAction* p = aTable.First(); p; p = aTable.Next() ) { @@ -511,10 +511,10 @@ void ScChangeAction::GetDescription( String& rStr, ScDocument* /* pDoc */, String ScChangeAction::GetRefString( const ScBigRange& rRange, - ScDocument* pDoc, BOOL bFlag3D ) const + ScDocument* pDoc, sal_Bool bFlag3D ) const { String aStr; - USHORT nFlags = ( rRange.IsValid( pDoc ) ? SCA_VALID : 0 ); + sal_uInt16 nFlags = ( rRange.IsValid( pDoc ) ? SCA_VALID : 0 ); if ( !nFlags ) aStr = ScGlobal::GetRscString( STR_NOREF_STR ); else @@ -560,7 +560,7 @@ String ScChangeAction::GetRefString( const ScBigRange& rRange, void ScChangeAction::GetRefString( String& rStr, ScDocument* pDoc, - BOOL bFlag3D ) const + sal_Bool bFlag3D ) const { rStr = GetRefString( GetBigRange(), pDoc, bFlag3D ); } @@ -603,7 +603,7 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack, } } SetState( SC_CAS_REJECTED ); // vor UpdateReference fuer Move - pTrack->UpdateReference( this, TRUE ); // LinkDeleted freigeben + pTrack->UpdateReference( this, sal_True ); // LinkDeleted freigeben DBG_ASSERT( !pLinkDeleted, "ScChangeAction::RejectRestoreContents: pLinkDeleted != NULL" ); // Liste der Contents abarbeiten und loeschen ScDocument* pDoc = pTrack->GetDocument(); @@ -622,7 +622,7 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack, } -void ScChangeAction::SetDeletedInThis( ULONG nActionNumber, +void ScChangeAction::SetDeletedInThis( sal_uLong nActionNumber, const ScChangeTrack* pTrack ) { if ( nActionNumber ) @@ -635,7 +635,7 @@ void ScChangeAction::SetDeletedInThis( ULONG nActionNumber, } -void ScChangeAction::AddDependent( ULONG nActionNumber, +void ScChangeAction::AddDependent( sal_uLong nActionNumber, const ScChangeTrack* pTrack ) { if ( nActionNumber ) @@ -687,14 +687,14 @@ String ScChangeAction::ToString( ScDocument* pDoc ) const } String aReference; - GetRefString( aReference, pDoc, TRUE ); + GetRefString( aReference, pDoc, sal_True ); String aAuthor = GetUser(); DateTime aDT = GetDateTime(); String aDate = ScGlobal::pLocaleData->getDate( aDT ); aDate += ' '; - aDate += ScGlobal::pLocaleData->getTime( aDT, FALSE, FALSE ); + aDate += ScGlobal::pLocaleData->getTime( aDT, sal_False, sal_False ); String aDescription; GetDescription( aDescription, pDoc ); @@ -823,7 +823,7 @@ ScChangeActionIns::ScChangeActionIns( const ScRange& rRange ) } -ScChangeActionIns::ScChangeActionIns(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber, +ScChangeActionIns::ScChangeActionIns(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber, const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String& sComment, const ScChangeActionType eTypeP) : @@ -837,11 +837,11 @@ ScChangeActionIns::~ScChangeActionIns() void ScChangeActionIns::GetDescription( String& rStr, ScDocument* pDoc, - BOOL bSplitRange, bool bWarning ) const + sal_Bool bSplitRange, bool bWarning ) const { ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning ); - USHORT nWhatId; + sal_uInt16 nWhatId; switch ( GetType() ) { case SC_CAT_INSERT_COLS : @@ -864,15 +864,15 @@ void ScChangeActionIns::GetDescription( String& rStr, ScDocument* pDoc, } -BOOL ScChangeActionIns::Reject( ScDocument* pDoc ) +sal_Bool ScChangeActionIns::Reject( ScDocument* pDoc ) { if ( !aBigRange.IsValid( pDoc ) ) - return FALSE; + return sal_False; ScRange aRange( aBigRange.MakeRange() ); if ( !pDoc->IsBlockEditable( aRange.aStart.Tab(), aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row() ) ) - return FALSE; + return sal_False; switch ( GetType() ) { @@ -892,7 +892,7 @@ BOOL ScChangeActionIns::Reject( ScDocument* pDoc ) } SetState( SC_CAS_REJECTED ); RemoveAllLinks(); - return TRUE; + return sal_True; } @@ -936,7 +936,7 @@ ScChangeActionDel::ScChangeActionDel( const ScRange& rRange, } -ScChangeActionDel::ScChangeActionDel(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber, +ScChangeActionDel::ScChangeActionDel(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber, const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String &sComment, const ScChangeActionType eTypeP, const SCsCOLROW nD, ScChangeTrack* pTrackP) // wich of nDx and nDy is set is depend on the type : @@ -976,40 +976,40 @@ void ScChangeActionDel::DeleteCellEntries() } -BOOL ScChangeActionDel::IsBaseDelete() const +sal_Bool ScChangeActionDel::IsBaseDelete() const { return !GetDx() && !GetDy(); } -BOOL ScChangeActionDel::IsTopDelete() const +sal_Bool ScChangeActionDel::IsTopDelete() const { const ScChangeAction* p = GetNext(); if ( !p || p->GetType() != GetType() ) - return TRUE; + return sal_True; return ((ScChangeActionDel*)p)->IsBaseDelete(); } -BOOL ScChangeActionDel::IsMultiDelete() const +sal_Bool ScChangeActionDel::IsMultiDelete() const { if ( GetDx() || GetDy() ) - return TRUE; + return sal_True; const ScChangeAction* p = GetNext(); if ( !p || p->GetType() != GetType() ) - return FALSE; + return sal_False; const ScChangeActionDel* pDel = (const ScChangeActionDel*) p; if ( (pDel->GetDx() > GetDx() || pDel->GetDy() > GetDy()) && pDel->GetBigRange() == aBigRange ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } -BOOL ScChangeActionDel::IsTabDeleteCol() const +sal_Bool ScChangeActionDel::IsTabDeleteCol() const { if ( GetType() != SC_CAT_DELETE_COLS ) - return FALSE; + return sal_False; const ScChangeAction* p = this; while ( p && p->GetType() == SC_CAT_DELETE_COLS && !((const ScChangeActionDel*)p)->IsTopDelete() ) @@ -1020,7 +1020,7 @@ BOOL ScChangeActionDel::IsTabDeleteCol() const void ScChangeActionDel::UpdateReference( const ScChangeTrack* /* pTrack */, UpdateRefMode eMode, const ScBigRange& rRange, - INT32 nDxP, INT32 nDyP, INT32 nDz ) + sal_Int32 nDxP, sal_Int32 nDyP, sal_Int32 nDz ) { ScRefUpdate::Update( eMode, rRange, nDxP, nDyP, nDz, GetBigRange() ); if ( !IsDeletedIn() ) @@ -1066,11 +1066,11 @@ ScBigRange ScChangeActionDel::GetOverAllRange() const void ScChangeActionDel::GetDescription( String& rStr, ScDocument* pDoc, - BOOL bSplitRange, bool bWarning ) const + sal_Bool bSplitRange, bool bWarning ) const { ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning ); - USHORT nWhatId; + sal_uInt16 nWhatId; switch ( GetType() ) { case SC_CAT_DELETE_COLS : @@ -1105,12 +1105,12 @@ void ScChangeActionDel::GetDescription( String& rStr, ScDocument* pDoc, } -BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) +sal_Bool ScChangeActionDel::Reject( ScDocument* pDoc ) { if ( !aBigRange.IsValid( pDoc ) && GetType() != SC_CAT_DELETE_TABS ) - return FALSE; + return sal_False; - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; if ( IsTopDelete() ) { // den kompletten Bereich in einem Rutsch restaurieren @@ -1120,30 +1120,30 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) if ( GetType() == SC_CAT_DELETE_TABS ) { // wird Tab angehaengt? if ( aTmpRange.aStart.Tab() > pDoc->GetMaxTableNumber() ) - bOk = FALSE; + bOk = sal_False; } else - bOk = FALSE; + bOk = sal_False; } if ( bOk ) { ScRange aRange( aTmpRange.MakeRange() ); // InDelete... fuer Formel UpdateReference in Document pTrack->SetInDeleteRange( aRange ); - pTrack->SetInDeleteTop( TRUE ); - pTrack->SetInDeleteUndo( TRUE ); - pTrack->SetInDelete( TRUE ); + pTrack->SetInDeleteTop( sal_True ); + pTrack->SetInDeleteUndo( sal_True ); + pTrack->SetInDelete( sal_True ); switch ( GetType() ) { case SC_CAT_DELETE_COLS : if ( !(aRange.aStart.Col() == 0 && aRange.aEnd.Col() == MAXCOL) ) { // nur wenn nicht TabDelete - if ( ( bOk = pDoc->CanInsertCol( aRange ) ) != FALSE ) + if ( ( bOk = pDoc->CanInsertCol( aRange ) ) != sal_False ) bOk = pDoc->InsertCol( aRange ); } break; case SC_CAT_DELETE_ROWS : - if ( ( bOk = pDoc->CanInsertRow( aRange ) ) != FALSE ) + if ( ( bOk = pDoc->CanInsertRow( aRange ) ) != sal_False ) bOk = pDoc->InsertRow( aRange ); break; case SC_CAT_DELETE_TABS : @@ -1151,7 +1151,7 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) //2do: Tabellennamen merken? String aName; pDoc->CreateValidTabName( aName ); - if ( ( bOk = pDoc->ValidNewTabName( aName ) ) != FALSE ) + if ( ( bOk = pDoc->ValidNewTabName( aName ) ) != sal_False ) bOk = pDoc->InsertTab( aRange.aStart.Tab(), aName ); } break; @@ -1160,13 +1160,13 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) // added to avoid warnings } } - pTrack->SetInDelete( FALSE ); - pTrack->SetInDeleteUndo( FALSE ); + pTrack->SetInDelete( sal_False ); + pTrack->SetInDeleteUndo( sal_False ); } if ( !bOk ) { - pTrack->SetInDeleteTop( FALSE ); - return FALSE; + pTrack->SetInDeleteTop( sal_False ); + return sal_False; } // InDeleteTop fuer UpdateReference-Undo behalten } @@ -1174,9 +1174,9 @@ BOOL ScChangeActionDel::Reject( ScDocument* pDoc ) // setzt rejected und ruft UpdateReference-Undo und DeleteCellEntries RejectRestoreContents( pTrack, GetDx(), GetDy() ); - pTrack->SetInDeleteTop( FALSE ); + pTrack->SetInDeleteTop( sal_False ); RemoveAllLinks(); - return TRUE; + return sal_True; } @@ -1264,7 +1264,7 @@ void ScChangeActionDel::UndoCutOffInsert() // --- ScChangeActionMove -------------------------------------------------- -ScChangeActionMove::ScChangeActionMove(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber, +ScChangeActionMove::ScChangeActionMove(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber, const ScBigRange& aToBigRange, const String& aUserP, const DateTime& aDateTimeP, const String &sComment, const ScBigRange& aFromBigRange, ScChangeTrack* pTrackP) // wich of nDx and nDy is set is depend on the type : @@ -1299,14 +1299,14 @@ void ScChangeActionMove::DeleteCellEntries() void ScChangeActionMove::UpdateReference( const ScChangeTrack* /* pTrack */, UpdateRefMode eMode, const ScBigRange& rRange, - INT32 nDx, INT32 nDy, INT32 nDz ) + sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz ) { ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, aFromRange ); ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, GetBigRange() ); } -void ScChangeActionMove::GetDelta( INT32& nDx, INT32& nDy, INT32& nDz ) const +void ScChangeActionMove::GetDelta( sal_Int32& nDx, sal_Int32& nDy, sal_Int32& nDz ) const { const ScBigAddress& rToPos = GetBigRange().aStart; const ScBigAddress& rFromPos = GetFromRange().aStart; @@ -1317,11 +1317,11 @@ void ScChangeActionMove::GetDelta( INT32& nDx, INT32& nDy, INT32& nDz ) const void ScChangeActionMove::GetDescription( String& rStr, ScDocument* pDoc, - BOOL bSplitRange, bool bWarning ) const + sal_Bool bSplitRange, bool bWarning ) const { ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning ); - BOOL bFlag3D = ( GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab() ); + sal_Bool bFlag3D = ( GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab() ); String aRsc( ScGlobal::GetRscString( STR_CHANGED_MOVE ) ); @@ -1343,7 +1343,7 @@ void ScChangeActionMove::GetDescription( String& rStr, ScDocument* pDoc, void ScChangeActionMove::GetRefString( String& rStr, ScDocument* pDoc, - BOOL bFlag3D ) const + sal_Bool bFlag3D ) const { if ( !bFlag3D ) bFlag3D = ( GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab() ); @@ -1354,15 +1354,15 @@ void ScChangeActionMove::GetRefString( String& rStr, ScDocument* pDoc, } -BOOL ScChangeActionMove::Reject( ScDocument* pDoc ) +sal_Bool ScChangeActionMove::Reject( ScDocument* pDoc ) { if ( !(aBigRange.IsValid( pDoc ) && aFromRange.IsValid( pDoc )) ) - return FALSE; + return sal_False; ScRange aToRange( aBigRange.MakeRange() ); ScRange aFrmRange( aFromRange.MakeRange() ); - BOOL bOk = pDoc->IsBlockEditable( aToRange.aStart.Tab(), + sal_Bool bOk = pDoc->IsBlockEditable( aToRange.aStart.Tab(), aToRange.aStart.Col(), aToRange.aStart.Row(), aToRange.aEnd.Col(), aToRange.aEnd.Row() ); if ( bOk ) @@ -1370,7 +1370,7 @@ BOOL ScChangeActionMove::Reject( ScDocument* pDoc ) aFrmRange.aStart.Col(), aFrmRange.aStart.Row(), aFrmRange.aEnd.Col(), aFrmRange.aEnd.Row() ); if ( !bOk ) - return FALSE; + return sal_False; pTrack->LookUpContents( aToRange, pDoc, 0, 0, 0 ); // zu movende Contents @@ -1412,17 +1412,17 @@ BOOL ScChangeActionMove::Reject( ScDocument* pDoc ) } RemoveAllLinks(); - return TRUE; + return sal_True; } // --- ScChangeActionContent ----------------------------------------------- -const USHORT nMemPoolChangeActionContent = (0x8000 - 64) / sizeof(ScChangeActionContent); +const sal_uInt16 nMemPoolChangeActionContent = (0x8000 - 64) / sizeof(ScChangeActionContent); IMPL_FIXEDMEMPOOL_NEWDEL( ScChangeActionContent, nMemPoolChangeActionContent, nMemPoolChangeActionContent ) -ScChangeActionContent::ScChangeActionContent( const ULONG nActionNumber, - const ScChangeActionState eStateP, const ULONG nRejectingNumber, +ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber, + const ScChangeActionState eStateP, const sal_uLong nRejectingNumber, const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String& sComment, ScBaseCell* pTempOldCell, ScDocument* pDoc, const String& sOldValue ) @@ -1443,7 +1443,7 @@ ScChangeActionContent::ScChangeActionContent( const ULONG nActionNumber, aOldValue = sOldValue; // set again, because SetCell removes it } -ScChangeActionContent::ScChangeActionContent( const ULONG nActionNumber, +ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber, ScBaseCell* pTempNewCell, const ScBigRange& aBigRangeP, ScDocument* pDoc, const String& sNewValue ) : @@ -1508,7 +1508,7 @@ ScChangeActionLinkEntry** ScChangeActionContent::GetDeletedInAddress() void ScChangeActionContent::SetOldValue( const ScBaseCell* pCell, - const ScDocument* pFromDoc, ScDocument* pToDoc, ULONG nFormat ) + const ScDocument* pFromDoc, ScDocument* pToDoc, sal_uLong nFormat ) { ScChangeActionContent::SetValue( aOldValue, pOldCell, nFormat, pCell, pFromDoc, pToDoc ); @@ -1532,8 +1532,8 @@ void ScChangeActionContent::SetNewValue( const ScBaseCell* pCell, void ScChangeActionContent::SetOldNewCells( ScBaseCell* pOldCellP, - ULONG nOldFormat, ScBaseCell* pNewCellP, - ULONG nNewFormat, ScDocument* pDoc ) + sal_uLong nOldFormat, ScBaseCell* pNewCellP, + sal_uLong nNewFormat, ScDocument* pDoc ) { pOldCell = pOldCellP; pNewCell = pNewCellP; @@ -1565,7 +1565,7 @@ void ScChangeActionContent::SetValueString( String& rValue, ScBaseCell*& pCell, rValue.Erase(); pCell = new ScFormulaCell( pDoc, aBigRange.aStart.MakeAddress(), rStr, formula::FormulaGrammar::GRAM_DEFAULT, formula::FormulaGrammar::CONV_OOO ); - ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE ); + ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True ); } else rValue = rStr; @@ -1597,7 +1597,7 @@ void ScChangeActionContent::GetNewString( String& rStr ) const void ScChangeActionContent::GetDescription( String& rStr, ScDocument* pDoc, - BOOL bSplitRange, bool bWarning ) const + sal_Bool bSplitRange, bool bWarning ) const { ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning ); @@ -1632,9 +1632,9 @@ void ScChangeActionContent::GetDescription( String& rStr, ScDocument* pDoc, void ScChangeActionContent::GetRefString( String& rStr, ScDocument* pDoc, - BOOL bFlag3D ) const + sal_Bool bFlag3D ) const { - USHORT nFlags = ( GetBigRange().IsValid( pDoc ) ? SCA_VALID : 0 ); + sal_uInt16 nFlags = ( GetBigRange().IsValid( pDoc ) ? SCA_VALID : 0 ); if ( nFlags ) { const ScBaseCell* pCell = GetNewCell(); @@ -1666,25 +1666,25 @@ void ScChangeActionContent::GetRefString( String& rStr, ScDocument* pDoc, } -BOOL ScChangeActionContent::Reject( ScDocument* pDoc ) +sal_Bool ScChangeActionContent::Reject( ScDocument* pDoc ) { if ( !aBigRange.IsValid( pDoc ) ) - return FALSE; + return sal_False; PutOldValueToDoc( pDoc, 0, 0 ); SetState( SC_CAS_REJECTED ); RemoveAllLinks(); - return TRUE; + return sal_True; } -BOOL ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack, - BOOL bOldest, Stack* pRejectActions ) +sal_Bool ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack, + sal_Bool bOldest, Stack* pRejectActions ) { if ( !aBigRange.IsValid( pDoc ) ) - return FALSE; + return sal_False; ScChangeActionContent* pContent = this; // accept previous contents @@ -1739,7 +1739,7 @@ BOOL ScChangeActionContent::Select( ScDocument* pDoc, ScChangeTrack* pTrack, else SetState( SC_CAS_ACCEPTED ); - return TRUE; + return sal_True; } @@ -1761,7 +1761,7 @@ void ScChangeActionContent::GetStringOfCell( String& rStr, // static void ScChangeActionContent::GetStringOfCell( String& rStr, - const ScBaseCell* pCell, const ScDocument* pDoc, ULONG nFormat ) + const ScBaseCell* pCell, const ScDocument* pDoc, sal_uLong nFormat ) { if ( ScChangeActionContent::GetContentCellType( pCell ) ) { @@ -1829,7 +1829,7 @@ ScChangeActionContentCellType ScChangeActionContent::GetContentCellType( const S // static -BOOL ScChangeActionContent::NeedsNumberFormat( const ScBaseCell* pCell ) +sal_Bool ScChangeActionContent::NeedsNumberFormat( const ScBaseCell* pCell ) { return pCell && pCell->GetCellType() == CELLTYPE_VALUE; } @@ -1840,14 +1840,14 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell, const ScAddress& rPos, const ScBaseCell* pOrgCell, const ScDocument* pFromDoc, ScDocument* pToDoc ) { - ULONG nFormat = NeedsNumberFormat( pOrgCell ) ? pFromDoc->GetNumberFormat( rPos ) : 0; + sal_uLong nFormat = NeedsNumberFormat( pOrgCell ) ? pFromDoc->GetNumberFormat( rPos ) : 0; SetValue( rStr, pCell, nFormat, pOrgCell, pFromDoc, pToDoc ); } // static void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell, - ULONG nFormat, const ScBaseCell* pOrgCell, + sal_uLong nFormat, const ScBaseCell* pOrgCell, const ScDocument* pFromDoc, ScDocument* pToDoc ) { rStr.Erase(); @@ -1866,7 +1866,7 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell, } break; case CELLTYPE_FORMULA : - ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE ); + ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True ); break; default: { @@ -1881,7 +1881,7 @@ void ScChangeActionContent::SetValue( String& rStr, ScBaseCell*& pCell, // static void ScChangeActionContent::SetCell( String& rStr, ScBaseCell* pCell, - ULONG nFormat, const ScDocument* pDoc ) + sal_uLong nFormat, const ScDocument* pDoc ) { rStr.Erase(); if ( pCell ) @@ -1896,7 +1896,7 @@ void ScChangeActionContent::SetCell( String& rStr, ScBaseCell* pCell, } break; case CELLTYPE_FORMULA : - ((ScFormulaCell*)pCell)->SetInChangeTrack( TRUE ); + ((ScFormulaCell*)pCell)->SetInChangeTrack( sal_True ); break; default: { @@ -2035,19 +2035,19 @@ void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos ) { rRef1.nCol = SCCOL_MAX; rRef1.nRelCol = SCCOL_MAX; - rRef1.SetColDeleted( TRUE ); + rRef1.SetColDeleted( sal_True ); } if ( rPos.Row() < 0 || MAXROW < rPos.Row() ) { rRef1.nRow = SCROW_MAX; rRef1.nRelRow = SCROW_MAX; - rRef1.SetRowDeleted( TRUE ); + rRef1.SetRowDeleted( sal_True ); } if ( rPos.Tab() < 0 || MAXTAB < rPos.Tab() ) { rRef1.nTab = SCTAB_MAX; rRef1.nRelTab = SCTAB_MAX; - rRef1.SetTabDeleted( TRUE ); + rRef1.SetTabDeleted( sal_True ); } if ( rTok.GetType() == formula::svDoubleRef ) { @@ -2056,19 +2056,19 @@ void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos ) { rRef2.nCol = SCCOL_MAX; rRef2.nRelCol = SCCOL_MAX; - rRef2.SetColDeleted( TRUE ); + rRef2.SetColDeleted( sal_True ); } if ( rPos.Row() < 0 || MAXROW < rPos.Row() ) { rRef2.nRow = SCROW_MAX; rRef2.nRelRow = SCROW_MAX; - rRef2.SetRowDeleted( TRUE ); + rRef2.SetRowDeleted( sal_True ); } if ( rPos.Tab() < 0 || MAXTAB < rPos.Tab() ) { rRef2.nTab = SCTAB_MAX; rRef2.nRelTab = SCTAB_MAX; - rRef2.SetTabDeleted( TRUE ); + rRef2.SetTabDeleted( sal_True ); } } } @@ -2076,7 +2076,7 @@ void lcl_InvalidateReference( ScToken& rTok, const ScBigAddress& rPos ) void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack, UpdateRefMode eMode, const ScBigRange& rRange, - INT32 nDx, INT32 nDy, INT32 nDz ) + sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz ) { SCSIZE nOldSlot = ScChangeTrack::ComputeContentSlot( aBigRange.aStart.Row() ); ScRefUpdate::Update( eMode, rRange, nDx, nDy, nDz, aBigRange ); @@ -2090,8 +2090,8 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack, if ( pTrack->IsInDelete() && !pTrack->IsInDeleteTop() ) return ; // Formeln nur kompletten Bereich updaten - BOOL bOldFormula = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_FORMULA ); - BOOL bNewFormula = ( pNewCell && pNewCell->GetCellType() == CELLTYPE_FORMULA ); + sal_Bool bOldFormula = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_FORMULA ); + sal_Bool bNewFormula = ( pNewCell && pNewCell->GetCellType() == CELLTYPE_FORMULA ); if ( bOldFormula || bNewFormula ) { // via ScFormulaCell UpdateReference anpassen (dort) if ( pTrack->IsInDelete() ) @@ -2195,7 +2195,7 @@ void ScChangeActionContent::UpdateReference( const ScChangeTrack* pTrack, // --- ScChangeActionReject ------------------------------------------------ -ScChangeActionReject::ScChangeActionReject(const ULONG nActionNumber, const ScChangeActionState eStateP, const ULONG nRejectingNumber, +ScChangeActionReject::ScChangeActionReject(const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber, const ScBigRange& aBigRangeP, const String& aUserP, const DateTime& aDateTimeP, const String& sComment) : ScChangeAction(SC_CAT_CONTENT, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment) @@ -2269,13 +2269,13 @@ void ScChangeTrack::Init() nLastMerge = 0; eMergeState = SC_CTMS_NONE; nLoadedFileFormatVersion = SC_CHGTRACK_FILEFORMAT; - bLoadSave = FALSE; - bInDelete = FALSE; - bInDeleteTop = FALSE; - bInDeleteUndo = FALSE; - bInPasteCut = FALSE; - bUseFixDateTime = FALSE; - bTime100thSeconds = TRUE; + bLoadSave = sal_False; + bInDelete = sal_False; + bInDeleteTop = sal_False; + bInDeleteUndo = sal_False; + bInPasteCut = sal_False; + bUseFixDateTime = sal_False; + bTime100thSeconds = sal_True; const SvtUserOptions& rUserOpt = SC_MOD()->GetUserOptions(); aUser = rUserOpt.GetFirstName(); @@ -2342,7 +2342,7 @@ void __EXPORT ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster if ( !pDoc->IsInDtorClear() ) { const SvtUserOptions& rUserOptions = SC_MOD()->GetUserOptions(); - USHORT nOldCount = aUserCollection.GetCount(); + sal_uInt16 nOldCount = aUserCollection.GetCount(); String aStr( rUserOptions.GetFirstName() ); aStr += ' '; @@ -2377,7 +2377,7 @@ void ScChangeTrack::SetUser( const String& rUser ) void ScChangeTrack::StartBlockModify( ScChangeTrackMsgType eMsgType, - ULONG nStartAction ) + sal_uLong nStartAction ) { if ( aModifiedLink.IsSet() ) { @@ -2390,7 +2390,7 @@ void ScChangeTrack::StartBlockModify( ScChangeTrackMsgType eMsgType, } -void ScChangeTrack::EndBlockModify( ULONG nEndAction ) +void ScChangeTrack::EndBlockModify( sal_uLong nEndAction ) { if ( aModifiedLink.IsSet() ) { @@ -2408,12 +2408,12 @@ void ScChangeTrack::EndBlockModify( ULONG nEndAction ) } if ( !pBlockModifyMsg ) { - BOOL bNew = FALSE; + sal_Bool bNew = sal_False; ScChangeTrackMsgInfo* pMsg; while ( ( pMsg = aMsgStackFinal.Pop() ) != NULL ) { aMsgQueue.Put( pMsg ); - bNew = TRUE; + bNew = sal_True; } if ( bNew ) aModifiedLink.Call( this ); @@ -2423,7 +2423,7 @@ void ScChangeTrack::EndBlockModify( ULONG nEndAction ) void ScChangeTrack::NotifyModified( ScChangeTrackMsgType eMsgType, - ULONG nStartAction, ULONG nEndAction ) + sal_uLong nStartAction, sal_uLong nEndAction ) { if ( aModifiedLink.IsSet() ) { @@ -2510,7 +2510,7 @@ void ScChangeTrack::AppendLoaded( ScChangeAction* pAppend ) } -void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction ) +void ScChangeTrack::Append( ScChangeAction* pAppend, sal_uLong nAction ) { if ( nActionMax < nAction ) nActionMax = nAction; @@ -2524,7 +2524,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction ) // UpdateReference auch wenn pLast==NULL, weil pAppend ein Delete sein // kann, dass DelContents generiert haben kann if ( pAppend->IsInsertType() && !pAppend->IsRejecting() ) - UpdateReference( pAppend, FALSE ); + UpdateReference( pAppend, sal_False ); if ( !pLast ) pFirst = pLast = pAppend; else @@ -2539,7 +2539,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction ) // ToRange nicht deleten. if ( !pAppend->IsInsertType() && !(pAppend->GetType() == SC_CAT_MOVE && pAppend->IsRejecting()) ) - UpdateReference( pAppend, FALSE ); + UpdateReference( pAppend, sal_False ); MasterLinks( pAppend ); if ( aModifiedLink.IsSet() ) @@ -2550,7 +2550,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, ULONG nAction ) ScChangeActionContent* pContent = (ScChangeActionContent*) pAppend; if ( ( pContent = pContent->GetPrevContent() ) != NULL ) { - ULONG nMod = pContent->GetActionNumber(); + sal_uLong nMod = pContent->GetActionNumber(); NotifyModified( SC_CTM_CHANGE, nMod, nMod ); } } @@ -2568,7 +2568,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend ) void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, - ScDocument* pRefDoc, ULONG& nStartAction, ULONG& nEndAction, SCsTAB nDz ) + ScDocument* pRefDoc, sal_uLong& nStartAction, sal_uLong& nEndAction, SCsTAB nDz ) { nStartAction = GetActionMax() + 1; AppendDeleteRange( rRange, pRefDoc, nDz, 0 ); @@ -2577,7 +2577,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, - ScDocument* pRefDoc, SCsTAB nDz, ULONG nRejectingInsert ) + ScDocument* pRefDoc, SCsTAB nDz, sal_uLong nRejectingInsert ) { SetInDeleteRange( rRange ); StartBlockModify( SC_CTM_APPEND, GetActionMax() + 1 ); @@ -2603,7 +2603,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, aRange.aStart.SetCol( nCol ); aRange.aEnd.SetCol( nCol ); if ( nCol == nCol2 ) - SetInDeleteTop( TRUE ); + SetInDeleteTop( sal_True ); AppendOneDeleteRange( aRange, pRefDoc, nCol-nCol1, 0, nTab-nTab1 + nDz, nRejectingInsert ); } @@ -2619,7 +2619,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, aRange.aStart.SetRow( nRow ); aRange.aEnd.SetRow( nRow ); if ( nRow == nRow2 ) - SetInDeleteTop( TRUE ); + SetInDeleteTop( sal_True ); AppendOneDeleteRange( aRange, pRefDoc, 0, nRow-nRow1, 0, nRejectingInsert ); } @@ -2633,7 +2633,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, aRange.aStart.SetCol( nCol ); aRange.aEnd.SetCol( nCol ); if ( nCol == nCol2 ) - SetInDeleteTop( TRUE ); + SetInDeleteTop( sal_True ); AppendOneDeleteRange( aRange, pRefDoc, nCol-nCol1, 0, 0, nRejectingInsert ); } @@ -2642,7 +2642,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, { DBG_ERROR( "ScChangeTrack::AppendDeleteRange: Block not supported!" ); } - SetInDeleteTop( FALSE ); + SetInDeleteTop( sal_False ); } } EndBlockModify( GetActionMax() ); @@ -2651,7 +2651,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, void ScChangeTrack::AppendOneDeleteRange( const ScRange& rOrgRange, ScDocument* pRefDoc, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, - ULONG nRejectingInsert ) + sal_uLong nRejectingInsert ) { ScRange aTrackRange( rOrgRange ); if ( nDx ) @@ -2726,7 +2726,7 @@ void ScChangeTrack::AppendMove( const ScRange& rFromRange, // static -BOOL ScChangeTrack::IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell, +sal_Bool ScChangeTrack::IsMatrixFormulaRangeDifferent( const ScBaseCell* pOldCell, const ScBaseCell* pNewCell ) { SCCOL nC1, nC2; @@ -2761,7 +2761,7 @@ void ScChangeTrack::AppendContent( const ScAddress& rPos, void ScChangeTrack::AppendContent( const ScAddress& rPos, - const ScBaseCell* pOldCell, ULONG nOldFormat, ScDocument* pRefDoc ) + const ScBaseCell* pOldCell, sal_uLong nOldFormat, ScDocument* pRefDoc ) { if ( !pRefDoc ) pRefDoc = pDoc; @@ -2835,7 +2835,7 @@ void ScChangeTrack::SetLastCutMoveRange( const ScRange& rRange, void ScChangeTrack::AppendContentRange( const ScRange& rRange, - ScDocument* pRefDoc, ULONG& nStartAction, ULONG& nEndAction, + ScDocument* pRefDoc, sal_uLong& nStartAction, sal_uLong& nEndAction, ScChangeActionClipMode eClipMode ) { if ( eClipMode == SC_CACM_CUT ) @@ -2851,11 +2851,11 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange, SCROW nRow2; SCTAB nTab2; rRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); - BOOL bDoContents; + sal_Bool bDoContents; if ( eClipMode == SC_CACM_PASTE && HasLastCut() ) { - bDoContents = FALSE; - SetInPasteCut( TRUE ); + bDoContents = sal_False; + SetInPasteCut( sal_True ); // Paste und Cut abstimmen, Paste kann groesserer Range sein ScRange aRange( rRange ); ScBigRange& r = pLastCutMove->GetBigRange(); @@ -2864,21 +2864,21 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange, { aRange.aEnd.SetCol( aRange.aStart.Col() + nTmpCol ); nCol1 += nTmpCol + 1; - bDoContents = TRUE; + bDoContents = sal_True; } SCROW nTmpRow; if ( (nTmpRow = (SCROW) (r.aEnd.Row() - r.aStart.Row())) != (nRow2 - nRow1) ) { aRange.aEnd.SetRow( aRange.aStart.Row() + nTmpRow ); nRow1 += nTmpRow + 1; - bDoContents = TRUE; + bDoContents = sal_True; } SCTAB nTmpTab; if ( (nTmpTab = (SCTAB) (r.aEnd.Tab() - r.aStart.Tab())) != (nTab2 - nTab1) ) { aRange.aEnd.SetTab( aRange.aStart.Tab() + nTmpTab ); nTab1 += nTmpTab + 1; - bDoContents = TRUE; + bDoContents = sal_True; } r = aRange; Undo( nStartLastCut, nEndLastCut ); // hier werden sich die Cuts gemerkt @@ -2892,11 +2892,11 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange, Append( pLastCutMove ); pLastCutMove = NULL; ResetLastCut(); - SetInPasteCut( FALSE ); + SetInPasteCut( sal_False ); } else { - bDoContents = TRUE; + bDoContents = sal_True; nStartAction = GetActionMax() + 1; StartBlockModify( SC_CTM_APPEND, nStartAction ); } @@ -2928,7 +2928,7 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange, void ScChangeTrack::AppendContentsIfInRefDoc( ScDocument* pRefDoc, - ULONG& nStartAction, ULONG& nEndAction ) + sal_uLong& nStartAction, sal_uLong& nEndAction ) { ScDocumentIterator aIter( pRefDoc, 0, MAXTAB ); if ( aIter.GetFirst() ) @@ -2956,7 +2956,7 @@ void ScChangeTrack::AppendContentsIfInRefDoc( ScDocument* pRefDoc, ScChangeActionContent* ScChangeTrack::AppendContentOnTheFly( const ScAddress& rPos, ScBaseCell* pOldCell, ScBaseCell* pNewCell, - ULONG nOldFormat, ULONG nNewFormat ) + sal_uLong nOldFormat, sal_uLong nNewFormat ) { ScRange aRange( rPos ); ScChangeActionContent* pAct = new ScChangeActionContent( aRange ); @@ -3016,7 +3016,7 @@ ScChangeActionContent* ScChangeTrack::GenerateDelContent( void ScChangeTrack::DeleteGeneratedDelContent( ScChangeActionContent* pContent ) { - ULONG nAct = pContent->GetActionNumber(); + sal_uLong nAct = pContent->GetActionNumber(); aGeneratedTable.Remove( nAct ); if ( pFirstGeneratedDelContent == pContent ) pFirstGeneratedDelContent = (ScChangeActionContent*) pContent->pNext; @@ -3057,7 +3057,7 @@ void ScChangeTrack::AddDependentWithNotify( ScChangeAction* pParent, pDependent->AddLink( pParent, pLink ); if ( aModifiedLink.IsSet() ) { - ULONG nMod = pParent->GetActionNumber(); + sal_uLong nMod = pParent->GetActionNumber(); NotifyModified( SC_CTM_PARENT, nMod, nMod ); } } @@ -3117,10 +3117,10 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct ) // also genau richtig const ScBigRange& rRange = pAct->GetBigRange(); - BOOL bActNoInsert = !pAct->IsInsertType(); - BOOL bActColDel = ( eActType == SC_CAT_DELETE_COLS ); - BOOL bActRowDel = ( eActType == SC_CAT_DELETE_ROWS ); - BOOL bActTabDel = ( eActType == SC_CAT_DELETE_TABS ); + sal_Bool bActNoInsert = !pAct->IsInsertType(); + sal_Bool bActColDel = ( eActType == SC_CAT_DELETE_COLS ); + sal_Bool bActRowDel = ( eActType == SC_CAT_DELETE_ROWS ); + sal_Bool bActTabDel = ( eActType == SC_CAT_DELETE_TABS ); if ( pLinkInsertCol && (eActType == SC_CAT_INSERT_COLS || (bActNoInsert && !bActRowDel && !bActTabDel)) ) @@ -3214,7 +3214,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct ) void ScChangeTrack::Remove( ScChangeAction* pRemove ) { // aus Track ausklinken - ULONG nAct = pRemove->GetActionNumber(); + sal_uLong nAct = pRemove->GetActionNumber(); aTable.Remove( nAct ); if ( nAct == nActionMax ) --nActionMax; @@ -3243,7 +3243,7 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove ) ScChangeActionContent* pContent = (ScChangeActionContent*) pRemove; if ( ( pContent = pContent->GetPrevContent() ) != NULL ) { - ULONG nMod = pContent->GetActionNumber(); + sal_uLong nMod = pContent->GetActionNumber(); NotifyModified( SC_CTM_CHANGE, nMod, nMod ); } } @@ -3263,7 +3263,7 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove ) } -void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge ) +void ScChangeTrack::Undo( sal_uLong nStartAction, sal_uLong nEndAction, bool bMerge ) { // #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong if ( bMerge ) @@ -3281,7 +3281,7 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge ) !IsInPasteCut() ) ResetLastCut(); StartBlockModify( SC_CTM_REMOVE, nStartAction ); - for ( ULONG j = nEndAction; j >= nStartAction; --j ) + for ( sal_uLong j = nEndAction; j >= nStartAction; --j ) { // rueckwaerts um evtl. nActionMax zu recyclen und schnelleren // Zugriff via pLast, Deletes in richtiger Reihenfolge ScChangeAction* pAct = ( (j == nActionMax && pLast && @@ -3293,13 +3293,13 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge ) if ( j == nEndAction || (pAct != pLast && ((ScChangeActionDel*)pAct)->IsTopDelete()) ) { - SetInDeleteTop( TRUE ); + SetInDeleteTop( sal_True ); SetInDeleteRange( ((ScChangeActionDel*)pAct)-> GetOverAllRange().MakeRange() ); } } - UpdateReference( pAct, TRUE ); - SetInDeleteTop( FALSE ); + UpdateReference( pAct, sal_True ); + SetInDeleteTop( sal_False ); Remove( pAct ); if ( IsInPasteCut() ) aPasteCutTable.Insert( pAct->GetActionNumber(), pAct ); @@ -3308,14 +3308,14 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge ) if ( j == nStartAction && pAct->GetType() == SC_CAT_MOVE ) { ScChangeActionMove* pMove = (ScChangeActionMove*) pAct; - ULONG nStart = pMove->GetStartLastCut(); - ULONG nEnd = pMove->GetEndLastCut(); + sal_uLong nStart = pMove->GetStartLastCut(); + sal_uLong nEnd = pMove->GetEndLastCut(); if ( nStart && nStart <= nEnd ) { // LastCut wiederherstellen //! Links vor Cut-Append aufloesen pMove->RemoveAllLinks(); StartBlockModify( SC_CTM_APPEND, nStart ); - for ( ULONG nCut = nStart; nCut <= nEnd; nCut++ ) + for ( sal_uLong nCut = nStart; nCut <= nEnd; nCut++ ) { ScChangeAction* pCut = aPasteCutTable.Remove( nCut ); if ( pCut ) @@ -3356,22 +3356,22 @@ void ScChangeTrack::Undo( ULONG nStartAction, ULONG nEndAction, bool bMerge ) // static -BOOL ScChangeTrack::MergeIgnore( const ScChangeAction& rAction, ULONG nFirstMerge ) +sal_Bool ScChangeTrack::MergeIgnore( const ScChangeAction& rAction, sal_uLong nFirstMerge ) { if ( rAction.IsRejected() ) - return TRUE; // da kommt noch eine passende Reject-Action + return sal_True; // da kommt noch eine passende Reject-Action if ( rAction.IsRejecting() && rAction.GetRejectAction() >= nFirstMerge ) - return TRUE; // da ist sie + return sal_True; // da ist sie - return FALSE; // alles andere + return sal_False; // alles andere } void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared ) { SetMergeState( SC_CTMS_PREPARE ); - ULONG nFirstMerge = pFirstMerge->GetActionNumber(); + sal_uLong nFirstMerge = pFirstMerge->GetActionNumber(); ScChangeAction* pAct = GetLast(); if ( pAct ) { @@ -3385,13 +3385,13 @@ void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared ) { if ( ((ScChangeActionDel*)pAct)->IsTopDelete() ) { - SetInDeleteTop( TRUE ); + SetInDeleteTop( sal_True ); SetInDeleteRange( ((ScChangeActionDel*)pAct)-> GetOverAllRange().MakeRange() ); } } - UpdateReference( pAct, TRUE ); - SetInDeleteTop( FALSE ); + UpdateReference( pAct, sal_True ); + SetInDeleteTop( sal_False ); pAct->DeleteCellEntries(); // sonst GPF bei Track Clear() } pAct = ( pAct == pFirstMerge ? NULL : pAct->GetPrev() ); @@ -3401,7 +3401,7 @@ void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared ) } -void ScChangeTrack::MergeOwn( ScChangeAction* pAct, ULONG nFirstMerge, bool bShared ) +void ScChangeTrack::MergeOwn( ScChangeAction* pAct, sal_uLong nFirstMerge, bool bShared ) { // #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong if ( bShared || !ScChangeTrack::MergeIgnore( *pAct, nFirstMerge ) ) @@ -3411,45 +3411,45 @@ void ScChangeTrack::MergeOwn( ScChangeAction* pAct, ULONG nFirstMerge, bool bSha { if ( ((ScChangeActionDel*)pAct)->IsTopDelete() ) { - SetInDeleteTop( TRUE ); + SetInDeleteTop( sal_True ); SetInDeleteRange( ((ScChangeActionDel*)pAct)-> GetOverAllRange().MakeRange() ); } } - UpdateReference( pAct, FALSE ); - SetInDeleteTop( FALSE ); + UpdateReference( pAct, sal_False ); + SetInDeleteTop( sal_False ); SetMergeState( SC_CTMS_OTHER ); //! nachfolgende per default MergeOther } } -void ScChangeTrack::UpdateReference( ScChangeAction* pAct, BOOL bUndo ) +void ScChangeTrack::UpdateReference( ScChangeAction* pAct, sal_Bool bUndo ) { ScChangeActionType eActType = pAct->GetType(); if ( eActType == SC_CAT_CONTENT || eActType == SC_CAT_REJECT ) return ; //! Formelzellen haengen nicht im Dokument - BOOL bOldAutoCalc = pDoc->GetAutoCalc(); - pDoc->SetAutoCalc( FALSE ); - BOOL bOldNoListening = pDoc->GetNoListening(); - pDoc->SetNoListening( TRUE ); + sal_Bool bOldAutoCalc = pDoc->GetAutoCalc(); + pDoc->SetAutoCalc( sal_False ); + sal_Bool bOldNoListening = pDoc->GetNoListening(); + pDoc->SetNoListening( sal_True ); //! Formelzellen ExpandRefs synchronisiert zu denen im Dokument - BOOL bOldExpandRefs = pDoc->IsExpandRefs(); + sal_Bool bOldExpandRefs = pDoc->IsExpandRefs(); if ( (!bUndo && pAct->IsInsertType()) || (bUndo && pAct->IsDeleteType()) ) pDoc->SetExpandRefs( SC_MOD()->GetInputOptions().GetExpandRefs() ); if ( pAct->IsDeleteType() ) { SetInDeleteUndo( bUndo ); - SetInDelete( TRUE ); + SetInDelete( sal_True ); } else if ( GetMergeState() == SC_CTMS_OWN ) { // Referenzen von Formelzellen wiederherstellen, // vorheriges MergePrepare war bei einem Insert wie ein Delete if ( pAct->IsInsertType() ) - SetInDeleteUndo( TRUE ); + SetInDeleteUndo( sal_True ); } //! erst die generated, als waeren sie vorher getrackt worden @@ -3458,8 +3458,8 @@ void ScChangeTrack::UpdateReference( ScChangeAction* pAct, BOOL bUndo ) bUndo ); UpdateReference( &pFirst, pAct, bUndo ); - SetInDelete( FALSE ); - SetInDeleteUndo( FALSE ); + SetInDelete( sal_False ); + SetInDeleteUndo( sal_False ); pDoc->SetExpandRefs( bOldExpandRefs ); pDoc->SetNoListening( bOldNoListening ); @@ -3468,18 +3468,18 @@ void ScChangeTrack::UpdateReference( ScChangeAction* pAct, BOOL bUndo ) void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, - ScChangeAction* pAct, BOOL bUndo ) + ScChangeAction* pAct, sal_Bool bUndo ) { ScChangeActionType eActType = pAct->GetType(); - BOOL bGeneratedDelContents = + sal_Bool bGeneratedDelContents = ( ppFirstAction == (ScChangeAction**)&pFirstGeneratedDelContent ); const ScBigRange& rOrgRange = pAct->GetBigRange(); ScBigRange aRange( rOrgRange ); ScBigRange aDelRange( rOrgRange ); - INT32 nDx, nDy, nDz; + sal_Int32 nDx, nDy, nDz; nDx = nDy = nDz = 0; UpdateRefMode eMode = URM_INSDEL; - BOOL bDel = FALSE; + sal_Bool bDel = sal_False; switch ( eActType ) { case SC_CAT_INSERT_COLS : @@ -3498,19 +3498,19 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, aRange.aEnd.SetCol( nInt32Max ); nDx = -(rOrgRange.aEnd.Col() - rOrgRange.aStart.Col() + 1); aDelRange.aEnd.SetCol( aDelRange.aStart.Col() - nDx - 1 ); - bDel = TRUE; + bDel = sal_True; break; case SC_CAT_DELETE_ROWS : aRange.aEnd.SetRow( nInt32Max ); nDy = -(rOrgRange.aEnd.Row() - rOrgRange.aStart.Row() + 1); aDelRange.aEnd.SetRow( aDelRange.aStart.Row() - nDy - 1 ); - bDel = TRUE; + bDel = sal_True; break; case SC_CAT_DELETE_TABS : aRange.aEnd.SetTab( nInt32Max ); nDz = -(rOrgRange.aEnd.Tab() - rOrgRange.aStart.Tab() + 1); aDelRange.aEnd.SetTab( aDelRange.aStart.Tab() - nDz - 1 ); - bDel = TRUE; + bDel = sal_True; break; case SC_CAT_MOVE : eMode = URM_MOVE; @@ -3552,7 +3552,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, { if ( p == pAct ) continue; // for - BOOL bUpdate = TRUE; + sal_Bool bUpdate = sal_True; if ( GetMergeState() == SC_CTMS_OTHER && p->GetActionNumber() <= GetLastMerge() ) { // Delete in mergendem Dokument, Action im zu mergenden @@ -3562,7 +3562,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, // das Insert nicht schneidet. if ( !aDelRange.Intersects( p->GetBigRange() ) ) p->UpdateReference( this, eMode, aRange, nDx, nDy, nDz ); - bUpdate = FALSE; + bUpdate = sal_False; } else if ( p->GetType() == SC_CAT_CONTENT && p->IsDeletedInDelType( eInsType ) ) @@ -3570,7 +3570,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, // Nicht anpassen, wenn dieses Delete in dem // Insert-"Delete" sein wuerde (ist nur verschoben). if ( aDelRange.In( p->GetBigRange().aStart ) ) - bUpdate = FALSE; + bUpdate = sal_False; else { const ScChangeActionLinkEntry* pLink = p->GetDeletedIn(); @@ -3579,7 +3579,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, const ScChangeAction* pDel = pLink->GetAction(); if ( pDel && pDel->GetType() == eInsType && pDel->GetBigRange().In( aDelRange ) ) - bUpdate = FALSE; + bUpdate = sal_False; pLink = pLink->GetNext(); } } @@ -3600,7 +3600,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, if ( bGeneratedDelContents ) pActDel->AddContent( (ScChangeActionContent*) p ); } - bUpdate = FALSE; + bUpdate = sal_False; } else { @@ -3765,7 +3765,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, { if ( p == pAct ) continue; // for - BOOL bUpdate = TRUE; + sal_Bool bUpdate = sal_True; if ( aDelRange.In( p->GetBigRange() ) ) { // #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong @@ -3790,18 +3790,18 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, // geloescht wird in DeleteCellEntries } } - bUpdate = FALSE; + bUpdate = sal_False; } else if ( eActType != SC_CAT_DELETE_TABS && p->IsDeletedInDelType( SC_CAT_DELETE_TABS ) ) { // in geloeschten Tabellen nicht updaten, // ausser wenn Tabelle verschoben wird - bUpdate = FALSE; + bUpdate = sal_False; } if ( p->GetType() == eActType && pActDel->IsDeletedIn( p ) ) { pActDel->RemoveDeletedIn( p ); // "druntergerutscht" - bUpdate = TRUE; + bUpdate = sal_True; } } if ( bUpdate ) @@ -3817,7 +3817,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, else if ( eActType == SC_CAT_MOVE ) { ScChangeActionMove* pActMove = (ScChangeActionMove*) pAct; - BOOL bLastCutMove = ( pActMove == pLastCutMove ); + sal_Bool bLastCutMove = ( pActMove == pLastCutMove ); const ScBigRange& rTo = pActMove->GetBigRange(); const ScBigRange& rFrom = pActMove->GetFromRange(); if ( !bUndo ) @@ -3867,7 +3867,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, } else { // Undo Move - BOOL bActRejected = pActMove->IsRejected(); + sal_Bool bActRejected = pActMove->IsRejected(); for ( ScChangeAction* p = *ppFirstAction; p; p = p->GetNext() ) { if ( p == pAct ) @@ -4026,13 +4026,13 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction, void ScChangeTrack::GetDependents( ScChangeAction* pAct, - ScChangeActionTable& rTable, BOOL bListMasterDelete, BOOL bAllFlat ) const + ScChangeActionTable& rTable, sal_Bool bListMasterDelete, sal_Bool bAllFlat ) const { //! bAllFlat==TRUE: intern aus Accept oder Reject gerufen, //! => Generated werden nicht aufgenommen - BOOL bIsDelete = pAct->IsDeleteType(); - BOOL bIsMasterDelete = ( bListMasterDelete && pAct->IsMasterDelete() ); + sal_Bool bIsDelete = pAct->IsDeleteType(); + sal_Bool bIsMasterDelete = ( bListMasterDelete && pAct->IsMasterDelete() ); const ScChangeAction* pCur = pAct; ScChangeActionStack* pStack = new ScChangeActionStack; @@ -4048,7 +4048,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct, { if ( bAllFlat ) { - ULONG n = p->GetActionNumber(); + sal_uLong n = p->GetActionNumber(); if ( !IsGenerated( n ) && rTable.Insert( n, p ) ) if ( p->HasDependent() ) pStack->Push( p ); @@ -4095,7 +4095,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct, if ( bAllFlat ) { // nur ein TopContent einer Kette ist in LinkDeleted - ULONG n = p->GetActionNumber(); + sal_uLong n = p->GetActionNumber(); if ( !IsGenerated( n ) && rTable.Insert( n, p ) ) if ( p->HasDeleted() || p->GetType() == SC_CAT_CONTENT ) @@ -4144,7 +4144,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct, { if ( bAllFlat ) { - ULONG n = p->GetActionNumber(); + sal_uLong n = p->GetActionNumber(); if ( !IsGenerated( n ) && rTable.Insert( n, p ) ) if ( p->HasDependent() || p->HasDeleted() ) pStack->Push( p ); @@ -4188,7 +4188,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct, { if ( bAllFlat ) { - ULONG n = p->GetActionNumber(); + sal_uLong n = p->GetActionNumber(); if ( !IsGenerated( n ) && rTable.Insert( n, p ) ) if ( p->HasDependent() ) pStack->Push( p ); @@ -4214,10 +4214,10 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct, } -BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest ) +sal_Bool ScChangeTrack::SelectContent( ScChangeAction* pAct, sal_Bool bOldest ) { if ( pAct->GetType() != SC_CAT_CONTENT ) - return FALSE; + return sal_False; ScChangeActionContent* pContent = (ScChangeActionContent*) pAct; if ( bOldest ) @@ -4230,7 +4230,7 @@ BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest ) } if ( !pContent->IsClickable() ) - return FALSE; + return sal_False; ScBigRange aBigRange( pContent->GetBigRange() ); const ScBaseCell* pCell = (bOldest ? pContent->GetOldCell() : @@ -4245,16 +4245,16 @@ BOOL ScChangeTrack::SelectContent( ScChangeAction* pAct, BOOL bOldest ) } if ( !aBigRange.IsValid( pDoc ) ) - return FALSE; + return sal_False; ScRange aRange( aBigRange.MakeRange() ); if ( !pDoc->IsBlockEditable( aRange.aStart.Tab(), aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row() ) ) - return FALSE; + return sal_False; if ( pContent->HasDependent() ) { - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; Stack aRejectActions; const ScChangeActionLinkEntry* pL = pContent->GetFirstDependentEntry(); while ( pL ) @@ -4302,28 +4302,28 @@ void ScChangeTrack::AcceptAll() } -BOOL ScChangeTrack::Accept( ScChangeAction* pAct ) +sal_Bool ScChangeTrack::Accept( ScChangeAction* pAct ) { if ( !pAct->IsClickable() ) - return FALSE; + return sal_False; if ( pAct->IsDeleteType() || pAct->GetType() == SC_CAT_CONTENT ) { ScChangeActionTable aActionTable; - GetDependents( pAct, aActionTable, FALSE, TRUE ); + GetDependents( pAct, aActionTable, sal_False, sal_True ); for ( ScChangeAction* p = aActionTable.First(); p; p = aActionTable.Next() ) { p->Accept(); } } pAct->Accept(); - return TRUE; + return sal_True; } -BOOL ScChangeTrack::RejectAll() +sal_Bool ScChangeTrack::RejectAll() { - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; for ( ScChangeAction* p = GetLast(); p && bOk; p = p->GetPrev() ) { //! rueckwaerts, weil abhaengige hinten und RejectActions angehaengt if ( p->IsInternalRejectable() ) @@ -4333,7 +4333,7 @@ BOOL ScChangeTrack::RejectAll() } -BOOL ScChangeTrack::Reject( ScChangeAction* pAct, bool bShared ) +sal_Bool ScChangeTrack::Reject( ScChangeAction* pAct, bool bShared ) { // #i100895# When collaboration changes are reversed, it must be possible // to reject a deleted row above another deleted row. @@ -4341,29 +4341,29 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, bool bShared ) pAct->RemoveAllDeletedIn(); if ( !pAct->IsRejectable() ) - return FALSE; + return sal_False; ScChangeActionTable* pTable = NULL; if ( pAct->HasDependent() ) { pTable = new ScChangeActionTable; - GetDependents( pAct, *pTable, FALSE, TRUE ); + GetDependents( pAct, *pTable, sal_False, sal_True ); } - BOOL bRejected = Reject( pAct, pTable, FALSE ); + sal_Bool bRejected = Reject( pAct, pTable, sal_False ); if ( pTable ) delete pTable; return bRejected; } -BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, - BOOL bRecursion ) +sal_Bool ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, + sal_Bool bRecursion ) { if ( !pAct->IsInternalRejectable() ) - return FALSE; + return sal_False; - BOOL bOk = TRUE; - BOOL bRejected = FALSE; + sal_Bool bOk = sal_True; + sal_Bool bRejected = sal_False; if ( pAct->IsInsertType() ) { if ( pAct->HasDependent() && !bRecursion ) @@ -4377,10 +4377,10 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, else if ( p->IsDeleteType() ) p->Accept(); // geloeschtes ins Nirvana else - bOk = Reject( p, NULL, TRUE ); //! rekursiv + bOk = Reject( p, NULL, sal_True ); //! rekursiv } } - if ( bOk && (bRejected = pAct->Reject( pDoc )) != FALSE ) + if ( bOk && (bRejected = pAct->Reject( pDoc )) != sal_False ) { // pRefDoc NULL := geloeschte Zellen nicht speichern AppendDeleteRange( pAct->GetBigRange().MakeRange(), NULL, (short) 0, @@ -4391,11 +4391,11 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, { DBG_ASSERT( !pTable, "ScChangeTrack::Reject: Delete mit Table" ); ScBigRange aDelRange; - ULONG nRejectAction = pAct->GetActionNumber(); - BOOL bTabDel, bTabDelOk; + sal_uLong nRejectAction = pAct->GetActionNumber(); + sal_Bool bTabDel, bTabDelOk; if ( pAct->GetType() == SC_CAT_DELETE_TABS ) { - bTabDel = TRUE; + bTabDel = sal_True; aDelRange = pAct->GetBigRange(); bOk = bTabDelOk = pAct->Reject( pDoc ); if ( bOk ) @@ -4405,14 +4405,14 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, } } else - bTabDel = bTabDelOk = FALSE; + bTabDel = bTabDelOk = sal_False; ScChangeActionDel* pDel = (ScChangeActionDel*) pAct; if ( bOk ) { aDelRange = pDel->GetOverAllRange(); bOk = aDelRange.IsValid( pDoc ); } - BOOL bOneOk = FALSE; + sal_Bool bOneOk = sal_False; if ( bOk ) { ScChangeActionType eActType = pAct->GetType(); @@ -4433,7 +4433,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, } } ScChangeAction* p = pAct; - BOOL bLoop = TRUE; + sal_Bool bLoop = sal_True; do { pDel = (ScChangeActionDel*) p; @@ -4460,10 +4460,10 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, } } else - bOneOk = TRUE; + bOneOk = sal_True; } if ( pDel->IsBaseDelete() ) - bLoop = FALSE; + bLoop = sal_False; else p = p->GetPrev(); } while ( bOk && bLoop && p && p->GetType() == eActType && @@ -4487,10 +4487,10 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, DBG_ASSERT( pTable, "ScChangeTrack::Reject: Move ohne Table" ); for ( ScChangeAction* p = pTable->Last(); p && bOk; p = pTable->Prev() ) { - bOk = Reject( p, NULL, TRUE ); //! rekursiv + bOk = Reject( p, NULL, sal_True ); //! rekursiv } } - if ( bOk && (bRejected = pAct->Reject( pDoc )) != FALSE ) + if ( bOk && (bRejected = pAct->Reject( pDoc )) != sal_False ) { ScChangeActionMove* pReject = new ScChangeActionMove( pAct->GetBigRange().MakeRange(), @@ -4512,7 +4512,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, pReject = new ScChangeActionContent( aRange ); pReject->SetOldValue( pDoc->GetCell( aRange.aStart ), pDoc, pDoc ); } - if ( (bRejected = pAct->Reject( pDoc )) != FALSE && !bRecursion ) + if ( (bRejected = pAct->Reject( pDoc )) != sal_False && !bRecursion ) { pReject->SetNewValue( pDoc->GetCell( aRange.aStart ), pDoc ); pReject->SetRejectAction( pAct->GetActionNumber() ); @@ -4531,7 +4531,7 @@ BOOL ScChangeTrack::Reject( ScChangeAction* pAct, ScChangeActionTable* pTable, } -ULONG ScChangeTrack::AddLoadedGenerated(ScBaseCell* pNewCell, const ScBigRange& aBigRange, const String& sNewValue ) +sal_uLong ScChangeTrack::AddLoadedGenerated(ScBaseCell* pNewCell, const ScBigRange& aBigRange, const String& sNewValue ) { ScChangeActionContent* pAct = new ScChangeActionContent( --nGeneratedMin, pNewCell, aBigRange, pDoc, sNewValue ); if ( pAct ) @@ -4733,7 +4733,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const { if ( pAction->HasDeleted() ) { - ::std::stack< ULONG > aStack; + ::std::stack< sal_uLong > aStack; const ScChangeActionLinkEntry* pL = pAction->GetFirstDeletedEntry(); while ( pL ) { @@ -4767,7 +4767,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const { if ( pAction->HasDependent() ) { - ::std::stack< ULONG > aStack; + ::std::stack< sal_uLong > aStack; const ScChangeActionLinkEntry* pL = pAction->GetFirstDependentEntry(); while ( pL ) { |