summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/docshell/impex.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 953aa0eb8167..5ff892fe19ca 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1980,7 +1980,11 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
if( nCol < nEndCol )
lcl_WriteSimpleString( rStrm, OUString(cSep) );
}
- WriteUnicodeOrByteEndl( rStrm );
+ // Do not append a line feed for one single cell.
+ // NOTE: this Doc2Text() is only called for clipboard via
+ // ScImportExport::ExportStream().
+ if (nStartRow != nEndRow || nStartCol != nEndCol)
+ WriteUnicodeOrByteEndl( rStrm );
if( rStrm.GetError() != ERRCODE_NONE )
break;
if( nSizeLimit && rStrm.Tell() > nSizeLimit )