You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2022/12/29 16:06:32 UTC
[openoffice] branch AOO41X updated: When we reach EOF, and SvStream.ReadCsvLine() returned some data, process that data before returning.
This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO41X by this push:
new 36795fb31b When we reach EOF, and SvStream.ReadCsvLine() returned some data, process that data before returning.
36795fb31b is described below
commit 36795fb31b6150980d77ebea85aeae4434a29853
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Tue Dec 27 14:47:35 2022 +0200
When we reach EOF, and SvStream.ReadCsvLine() returned some data,
process that data before returning.
Fixes https://bz.apache.org/ooo/show_bug.cgi?id=128548 -
"Last CSV line is silently lost on import if last field is quoted
and EOF is reached before closing quote"
Patch by: me
(cherry picked from commit c7ace38fedbe61bc12c11cf4f428626429620f06)
---
main/sc/source/ui/docshell/impex.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main/sc/source/ui/docshell/impex.cxx b/main/sc/source/ui/docshell/impex.cxx
index 4034ca8ee0..9178348a17 100644
--- a/main/sc/source/ui/docshell/impex.cxx
+++ b/main/sc/source/ui/docshell/impex.cxx
@@ -1231,7 +1231,7 @@ sal_Bool ScImportExport::ExtText2Doc( SvStream& rStrm )
for( ;; )
{
rStrm.ReadCsvLine( aLine, !bFixed, rSeps, cStr);
- if ( rStrm.IsEof() )
+ if ( rStrm.IsEof() && aLine.Len() == 0 )
break;
xub_StrLen nLineLen = aLine.Len();