Index: sc/source/ui/docshell/impex.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/docshell/impex.cxx,v
retrieving revision 1.33
diff -u -p -u -r1.33 impex.cxx
--- sc/source/ui/docshell/impex.cxx	14 Dec 2005 15:10:05 -0000	1.33
+++ sc/source/ui/docshell/impex.cxx	19 Jun 2006 11:13:39 -0000
@@ -1044,6 +1048,12 @@ BOOL ScImportExport::ExtText2Doc( SvStre
 	if (!pExtOptions)
 		return Text2Doc( rStrm );
 
+	if( !StartPaste() )
+	{
+		EndPaste();
+		return FALSE;
+	}
+
 	ULONG nOldPos = rStrm.Tell();
 	rStrm.Seek( STREAM_SEEK_TO_END );
 	ScProgress aProgress( pDocSh, ScGlobal::GetRscString( STR_LOAD_DOC ), rStrm.Tell() - nOldPos );
@@ -1056,6 +1066,7 @@ BOOL ScImportExport::ExtText2Doc( SvStre
 
 	DBG_ASSERT( !bUndo, "ExtText2Doc mit Undo noch nicht implementiert!" );
 	SCCOL nStartCol = aRange.aStart.Col();
+	SCCOL nMaxCol = aRange.aEnd.Col();
 	SCROW nStartRow = aRange.aStart.Row();
 	SCTAB nTab = aRange.aStart.Tab();
 
@@ -1154,6 +1165,9 @@ BOOL ScImportExport::ExtText2Doc( SvStre
 				++nSourceCol;
 			}
 		}
+		if (nCol > nMaxCol)
+			nMaxCol = nCol;
+
         if (bMultiLine && pDocSh)
             pDocSh->AdjustRowHeight( nRow, nRow, nTab);
 
@@ -1172,6 +1186,9 @@ BOOL ScImportExport::ExtText2Doc( SvStre
     delete pEnglishTransliteration;
 	delete pEnglishCalendar;
 
+	aRange.aEnd = ScAddress( nMaxCol, nRow, aRange.aStart.Tab() );
+	EndPaste();
+
 	return TRUE;
 }
 
