update dev300-m57
[ooovba.git] / applied_patches / 0120-sc-change-record-dnd.diff
blob21ee26cc603a3a59785be0ccefa0f2a7c0d29480
1 diff -u -r ../src680-m79.bak/sc/source/ui/docshell/dbdocimp.cxx sc/source/ui/docshell/dbdocimp.cxx
2 --- ../src680-m79.bak/sc/source/ui/docshell/dbdocimp.cxx 2005-03-09 10:21:05.000000000 +0530
3 +++ sc/source/ui/docshell/dbdocimp.cxx 2005-03-14 16:43:44.251843333 +0530
4 @@ -100,6 +100,7 @@
5 #include "dbdocutl.hxx"
6 #include "editable.hxx"
7 #include "hints.hxx"
8 +#include "chgtrack.hxx"
10 using namespace com::sun::star;
12 @@ -249,6 +250,8 @@
13 const SbaSelectionList* pSelection, BOOL bRecord, BOOL bAddrInsert )
15 ScDocument* pDoc = rDocShell.GetDocument();
16 + ScChangeTrack *pChangeTrack = NULL;
17 + ScRange aChangedRange;
19 if (bRecord && !pDoc->IsUndoEnabled())
20 bRecord = FALSE;
21 @@ -523,11 +526,9 @@
22 nErrStringId = aTester.GetMessageId();
23 bSuccess = FALSE;
25 - else if ( pDoc->GetChangeTrack() != NULL )
26 - {
27 - nErrStringId = STR_PROTECTIONERR;
28 - bSuccess = FALSE;
29 - }
30 + else if ( (pChangeTrack = pDoc->GetChangeTrack()) != NULL )
31 + aChangedRange = ScRange(rParam.nCol1, rParam.nRow1, nTab,
32 + nEndCol+nFormulaCols, nEndRow, nTab );
35 if ( bSuccess && bMoveCells )
36 @@ -742,6 +743,9 @@
38 delete pImportDoc;
40 + if (bSuccess && pChangeTrack)
41 + pChangeTrack->AppendInsert ( aChangedRange );
43 return bSuccess;