Issue 121714 - fields containg line feeds are not surrounded with necessary quotes after copying to clipboard
Summary: fields containg line feeds are not surrounded with necessary quotes after cop...
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: save-export (show other issues)
Version: 3.4.1
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact: saisyamala
URL:
Keywords: needmoreinfo
: 121713 (view as issue list)
Depends on:
Blocks:
 
Reported: 2013-02-04 13:34 UTC by Max Wildgrube
Modified: 2014-07-09 10:27 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Max Wildgrube 2013-02-04 13:34:19 UTC
Hi,
I have a sheet with multiple lines in cells (you can separate lines inside a cell with ctrl-enter). I had to copy the complete sheet with ctrl-a ctrl-c into the clipbord and paste this in a textarea field of a web browser.
(in the background there is a PHP application using fgetcsv for to interprete the content)

But while clipping as text the necessary quotes (") are not surrounded the text fields which contain new-line characters. So these new-line chars produces new rows, destroying the structure of the table.

This is in opposite to the behaviour of MS Excel or LibreOffice Calc which works correctly.
There is a workaround while using save as csv file, which asks for the column and text delimiter.
(And making the copy and paste out off this file)

Not using a text delimiter if there are syntactical characters (as tab or new line) is not meaningful, so I think this is obviously a bug.

OS: Win 7, OOo: 3.4.1

Max.
Comment 1 Rob Weir 2013-02-04 18:21:23 UTC
*** Issue 121713 has been marked as a duplicate of this issue. ***
Comment 2 Max Wildgrube 2013-02-04 18:57:57 UTC
Sorry,

it's my first bug report on bugzilla. While doing this I read first:

"*Testproduct:  	New to IssueTracker? Please select this component if you want to learn how to submit and comment on issues. Do not use this component for real issues."

Because I'm a compliant fellow I used this *Testproduct first. But I expected that this "bug report" will be discarded or even hidden for the community.

Nevertheless I didn't really understand for what is this *Testproduct good.

Kind regards,
Max.
Comment 3 saisyamala 2013-02-07 06:10:06 UTC
Hi,
Can you please provide the steps you followed and when you faced the error (In reply to comment #0)
> Hi,
> I have a sheet with multiple lines in cells (you can separate lines inside a
> cell with ctrl-enter). I had to copy the complete sheet with ctrl-a ctrl-c
> into the clipbord and paste this in a textarea field of a web browser.
> (in the background there is a PHP application using fgetcsv for to
> interprete the content)
> 
> But while clipping as text the necessary quotes (") are not surrounded the
> text fields which contain new-line characters. So these new-line chars
> produces new rows, destroying the structure of the table.
> 
> This is in opposite to the behaviour of MS Excel or LibreOffice Calc which
> works correctly.
> There is a workaround while using save as csv file, which asks for the
> column and text delimiter.
> (And making the copy and paste out off this file)
> 
> Not using a text delimiter if there are syntactical characters (as tab or
> new line) is not meaningful, so I think this is obviously a bug.
> 
> OS: Win 7, OOo: 3.4.1
> 
> Max.
Comment 4 Max Wildgrube 2013-02-07 13:56:04 UTC
1. In an empty Calc sheet put in cell A1 an "A" and in B1 "B" CTRL-ENTER "C"
   (Without the ")
2. Select the Cells A1 and B1, copy the selection into the Clipboard (CTRL-C)
3. Open your favorite Text Editor (e.g. Notepad) 
4. Paste the Clipboard (CTRL-V). What you see is:

A	B
C

5. Select all (CTRL-A) and Copy back (CTRL-C)
6. Go back to the sheet and select e.g. cell A3, Paste Clipboard.
7. What you see is:

A3 = A, B3=B, A4=C

and NOT A3 = A, B3=B
                   C
as expected.

8. As an counter example you can paste the clipboard after step 2 into an Excel sheet, do the step 2 in Excel now. Step 4 shows you:

A	"B
C"

,in a non-Notepad editor. In Notepad is looks like

A	"BC"
the CR between B and C is only hidden but present.

if you repeat step 5 and 6 (Excel) you see the expected result.

Max.
Comment 5 Max Wildgrube 2013-02-07 14:01:32 UTC
(In reply to comment #0)
> Hi,
> I have a sheet with multiple lines in cells (you can separate lines inside a
> cell with ctrl-enter). I had to copy the complete sheet with ctrl-a ctrl-c
> into the clipbord and paste this in a textarea field of a web browser.
> (in the background there is a PHP application using fgetcsv for to
> interprete the content)
> 
> But while clipping as text the necessary quotes (") are not surrounded the
> text fields which contain new-line characters. So these new-line chars
> produces new rows, destroying the structure of the table.
> 
> This is in opposite to the behaviour of MS Excel or LibreOffice Calc which
> works correctly.
> There is a workaround while using save as csv file, which asks for the
> column and text delimiter.
> (And making the copy and paste out off this file)
> 
> Not using a text delimiter if there are syntactical characters (as tab or
> new line) is not meaningful, so I think this is obviously a bug.
> 
> OS: Win 7, OOo: 3.4.1
> 
> Max.

1. In an empty Calc sheet put in cell A1 an "A" and in B1 "B" CTRL-ENTER "C"
   (Without the ")
2. Select the Cells A1 and B1, copy the selection into the Clipboard (CTRL-C)
3. Open your favorite Text Editor (e.g. Notepad) 
4. Paste the Clipboard (CTRL-V). What you see is:

A	B
C

5. Select all (CTRL-A) and Copy back (CTRL-C)
6. Go back to the sheet and select e.g. cell A3, Paste Clipboard.
7. What you see is:

A3 = A, B3=B, A4=C

and NOT A3 = A, B3=B
                   C
as expected.

8. As an counter example you can paste the clipboard after step 2 into an Excel sheet, do the step 2 in Excel now. Step 4 shows you:

A	"B
C"

,in a non-Notepad editor. In Notepad is looks like

A	"BC"
the CR between B and C is only hidden but present.

if you repeat step 5 and 6 (Excel) you see the expected result.

Max.
Comment 6 Edwin Sharp 2014-01-09 15:57:58 UTC
As given in comment 5

AOO410m1(Build:9750)  -  Rev. 1552994
Rev.1552994
Excel 2010
Win 7