Bug 32213 - [EDITING]: Paste Unformatted Text broken for complex cell contents
Summary: [EDITING]: Paste Unformatted Text broken for complex cell contents
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 RC1
Hardware: All All
: medium major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:3.4 target:6.0.0
Keywords:
Depends on:
Blocks: Paste-Special-Unformatted
  Show dependency treegraph
 
Reported: 2010-12-07 22:19 UTC by Rainer Bielefeld Retired
Modified: 2017-11-21 19:36 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample document (80.06 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-12-07 22:19 UTC, Rainer Bielefeld Retired
Details
much simpler example (7.74 KB, application/vnd.sun.xml.calc)
2010-12-14 11:22 UTC, Kohei Yoshida
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Bielefeld Retired 2010-12-07 22:19:41 UTC
Created attachment 40895 [details]
Sample document

Steps to reproduce:
1. open attached "Sample6.ods", sheet "Reparatur_Erforderlich"
2. Click on row heading "3" to select all line 3
3. <cntrl>+<c> for copy
4. change to sheet "Erledigt"
5. click into 'a3'
6. Long click Icon 'Paste (Strg+V -> Unformatted text'
   Expected: View as shown in sheet "Screenshots" - So should it look 
   Actual:  View as shown in sheet "Screenshots" - So does it look"
            Paste is broken for cells with line feed (?)
I am pretty (but not absolutely) sure that that worked with Beta3
Menu 'Edit - Paste special' does not show that problem.
Comment 1 Kohei Yoshida 2010-12-08 09:57:58 UTC
Did this really ever work?

I tested it with Beta3, and Go-OO 3.2.1 and both versions show the same exact issue.
Comment 2 Rainer Bielefeld Retired 2010-12-08 10:21:56 UTC
Yes, that has been working in a perfect way until OOo3.1.1. Later OOo versions have not been used for my daily work. It seems that that problem started with the new "paste unformatted text" text dialog?
Comment 3 Kohei Yoshida 2010-12-08 14:05:19 UTC
Likely not because of the dialog change, but probably because of the introduction of the line break support inside cell during csv import.  The same code is used during unformatted text pasting.

So, it's been like this for at least a few versions, definitely not a regression.
Comment 4 Rainer Bielefeld Retired 2010-12-08 21:16:38 UTC
Long distance regression - sigh; will I be enchained to 3.1.1 forever?

NEW due to  Comment 1    Kohei Yoshida      2010-12-08 09:57:58 PST
Comment 5 Rainer Bielefeld Retired 2010-12-09 09:46:14 UTC
No, this did not work with Beta3, I checked on my laptop.

The problem appears if there are cells with empty lines at the end. If you delete that empty line the problem disappears. Esample with sample6.ods:

1. Copy / Paste Text (TAB) of "Reparatur_Erforderlich-Row4" to row 4 in Sheet "Erledigt" will show the problem.

2. Doing the same after you selected "Reparatur_Erforderlich-Row4-D4" -> Caret into last empty line -> Backspace -> ENTER, paste will work fine.

To me it seems eye-catching that the Text Import dialog does not appear proceeding as per 2.
Comment 6 Kohei Yoshida 2010-12-14 11:22:48 UTC
Created attachment 41122 [details]
much simpler example

This is a much simpler example that exhibits the same issue.
Comment 7 Kohei Yoshida 2010-12-14 11:29:33 UTC
I'm looking into this right now.
Comment 8 Kohei Yoshida 2010-12-14 14:32:25 UTC
Ok.  I fixed this on master.

http://cgit.freedesktop.org/libreoffice/calc/commit/?id=cdcd262ea4aa3c3e407b14ed533e514f75de2d3a

Let me see if we want to port this to 3.3.....
Comment 9 Kohei Yoshida 2010-12-15 07:42:04 UTC
I guess we aren't risking the stability of 3.3. for this this fix.

Marking this fixed on master.
Comment 10 sophie 2011-01-13 05:50:27 UTC
Verified - Closed - Sophie
Comment 11 Rainer Bielefeld Retired 2011-01-28 00:29:36 UTC
I just saw that for contents without empty line at the End, but with linefeed within contents, what will have been the main reason.
The fix hasn't been integrated in 3.3 stable?
Comment 12 Kohei Yoshida 2011-01-28 13:01:01 UTC
(In reply to comment #11)
> I just saw that for contents without empty line at the End, but with linefeed
> within contents, what will have been the main reason.
> The fix hasn't been integrated in 3.3 stable?

No, the main reason was that I couldn't find anyone to sign off of my change for the 3.3 branch.  Plus this wasn't exactly a blocker bug, so...  Sorry. :-(
Comment 13 Commit Notification 2017-11-13 17:44:24 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f435cdba5b4ea98dc30b4b4879de21a542c8a84d

Resolves: tdf#113571 paste-special "Unformatted text [TSV-Calc]", tdf#32213

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2017-11-21 15:15:26 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d9d8ee98338a956d7241f556de7c697919151f39

tdf#113571, tdf#32213, tdf#50746: Make "paste unformatted text"

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.