diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-02-11 15:19:01 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-02-11 15:19:01 +0000 |
commit | 6fed8a270237f81690addb2f5853e372535d66a9 (patch) | |
tree | 7fc19d7aed581096ed202f831b17e6465745166a /sc/source/ui/docshell/docsh3.cxx | |
parent | e6e8722c10e925c05c7eeea073a717f20c0ebdb2 (diff) |
CWS-TOOLING: integrate CWS tbe35
2008-12-15 15:10:58 +0100 tbe r265503 : CWS-TOOLING: rebase CWS tbe35 to trunk@264807 (milestone: DEV300:m37)
2008-12-11 17:12:58 +0100 tbe r265335 : #i90682# formatting failed when first character is '-', '+' or '='
2008-12-10 18:59:13 +0100 nn r265228 : #i96930# invalidate sort toolbar slots in SelectionChanged
2008-12-09 15:58:45 +0100 nn r265111 : #i77853# InitDocShell: SetLayoutRTL
2008-12-03 15:54:50 +0100 tbe r264795 : #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong
2008-11-14 16:13:21 +0100 tbe r263682 : #i95212# [Collaboration] Bad handling of row insertion in shared spreadsheet
Diffstat (limited to 'sc/source/ui/docshell/docsh3.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 786e99921b63..58c72458ba0a 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -769,15 +769,16 @@ inline BOOL lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, BOOL // State nicht vergleichen, falls eine alte Aenderung akzeptiert wurde } -bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, BOOL bIgnore100Sec ) +bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, const ScChangeAction* pLastSearchAction, BOOL bIgnore100Sec ) { - if ( !pDoc || !pAction || !pSearchDoc || !pFirstSearchAction ) + if ( !pDoc || !pAction || !pSearchDoc || !pFirstSearchAction || !pLastSearchAction ) { return false; } + ULONG nLastSearchAction = pLastSearchAction->GetActionNumber(); const ScChangeAction* pA = pFirstSearchAction; - while ( pA ) + while ( pA && pA->GetActionNumber() <= nLastSearchAction ) { if ( pAction->GetType() == pA->GetType() && pAction->GetUser() == pA->GetUser() && @@ -850,6 +851,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck const ScChangeAction* pFirstMergeAction = pSourceAction; const ScChangeAction* pFirstSearchAction = pThisAction; + + // #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong + const ScChangeAction* pLastSearchAction = pThisTrack->GetLast(); + // MergeChangeData aus den folgenden Aktionen erzeugen ULONG nNewActionCount = 0; const ScChangeAction* pCount = pSourceAction; @@ -869,7 +874,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck ULONG nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber(); // UpdateReference-Undo, gueltige Referenzen fuer den letzten gemeinsamen Zustand - pSourceTrack->MergePrepare( (ScChangeAction*) pFirstMergeAction ); + pSourceTrack->MergePrepare( (ScChangeAction*) pFirstMergeAction, bShared ); // MergeChangeData an alle noch folgenden Aktionen in diesem Dokument anpassen // -> Referenzen gueltig fuer dieses Dokument @@ -929,7 +934,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck bool bMergeAction = false; if ( bShared ) { - if ( !bCheckDuplicates || !lcl_FindAction( &rOtherDoc, pSourceAction, &aDocument, pFirstSearchAction, bIgnore100Sec ) ) + if ( !bCheckDuplicates || !lcl_FindAction( &rOtherDoc, pSourceAction, &aDocument, pFirstSearchAction, pLastSearchAction, bIgnore100Sec ) ) { bMergeAction = true; } @@ -1119,7 +1124,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck } // Referenzen anpassen - pSourceTrack->MergeOwn( (ScChangeAction*) pSourceAction, nFirstNewNumber ); + pSourceTrack->MergeOwn( (ScChangeAction*) pSourceAction, nFirstNewNumber, bShared ); // merge action state if ( bShared && !pSourceAction->IsRejected() ) @@ -1159,6 +1164,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck } pSourceAction = pSourceAction->GetNext(); } + rMarkData = aOldMarkData; pThisTrack->SetUser(aOldUser); pThisTrack->SetUseFixDateTime( FALSE ); @@ -1284,7 +1290,9 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) pThisTrack->Reject( pAction ); pAction = pAction->GetPrev(); } - pThisTrack->Undo( nStartShared, pThisTrack->GetActionMax() ); + + // #i94841# [Collaboration] When deleting rows is rejected, the content is sometimes wrong + pThisTrack->Undo( nStartShared, pThisTrack->GetActionMax(), true ); // merge shared changes into own document ScChangeActionMergeMap aSharedMergeMap; |