summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-02-17 18:28:17 +0100
committerEike Rathke <erack@redhat.com>2022-02-17 19:10:03 +0100
commitbe13ca182d7b0b59ad0c9509200cfdc45bd15cf2 (patch)
treeaf84ab039423066fc923ef3be7f85dc98da419a6 /sc
parent24231f2a336c50eac5e6a1621c57e60ebe1e1cf4 (diff)
Resolves: tdf#147496 No line feed for one single cell in clipboard Doc2Text()
Change-Id: If6326bf414e1da43d846f952d88ceae37b2b9cd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130109 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-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 )