diff -u -r ../src680-m79.bak/sc/source/ui/docshell/dbdocimp.cxx sc/source/ui/docshell/dbdocimp.cxx --- ../src680-m79.bak/sc/source/ui/docshell/dbdocimp.cxx 2005-03-09 10:21:05.000000000 +0530 +++ sc/source/ui/docshell/dbdocimp.cxx 2005-03-14 16:43:44.251843333 +0530 @@ -100,6 +100,7 @@ #include "dbdocutl.hxx" #include "editable.hxx" #include "hints.hxx" +#include "chgtrack.hxx" using namespace com::sun::star; @@ -249,6 +250,8 @@ const SbaSelectionList* pSelection, BOOL bRecord, BOOL bAddrInsert ) { ScDocument* pDoc = rDocShell.GetDocument(); + ScChangeTrack *pChangeTrack = NULL; + ScRange aChangedRange; if (bRecord && !pDoc->IsUndoEnabled()) bRecord = FALSE; @@ -523,11 +526,9 @@ nErrStringId = aTester.GetMessageId(); bSuccess = FALSE; } - else if ( pDoc->GetChangeTrack() != NULL ) - { - nErrStringId = STR_PROTECTIONERR; - bSuccess = FALSE; - } + else if ( (pChangeTrack = pDoc->GetChangeTrack()) != NULL ) + aChangedRange = ScRange(rParam.nCol1, rParam.nRow1, nTab, + nEndCol+nFormulaCols, nEndRow, nTab ); } if ( bSuccess && bMoveCells ) @@ -742,6 +743,9 @@ delete pImportDoc; + if (bSuccess && pChangeTrack) + pChangeTrack->AppendInsert ( aChangedRange ); + return bSuccess; }