Description: After creating a table in LibreOffice Writer, I tried to paste some data copied from STDOUT (unformatted text, it was a set dates, every date in a new line). If the cursor was in a particular cell, the text was pasted into the cell (which is OK), but when I highlight the whole column and paste, every cell gets the whole set instead of just one line. When I tried that in MS Word with the same unformatted text, I got the desired result. It also works if I paste the text into Calc, then copy from Calc and paste into Writer. Steps to Reproduce: 1. Copy some unformatted text with more than one line. 2. Create a table in LibreOffice Writer. 3. Highlight one column and paste. Actual Results: Every cell gets all the text from clipboard. Expected Results: Every cell should get just one line. Reproducible: Always User Profile Reset: No OpenGL enabled: Yes Additional Info: Version: 7.1.3.2 / LibreOffice Community Build ID: 10(Build:2) CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: kf5 Locale: pl-PL (pl_PL.UTF-8); UI: pl-PL 7.1.3-2 Calc: threaded
Created attachment 173295 [details] Comparison between what I want to get (left) and what I get (right)
(In reply to Jakub from comment #0) > When I tried that in > MS Word with the same unformatted text, I got the desired result. Oh? I tried this right now with Word 2016, and couldn't get such a result - either using text from terminal (cmd.exe or cygwin), nor from plain-text editors like notepad. Note that Writer includes a method to *convert text to table* (under menu Table->Convert), which is the intended workflow in such a case: you paste not into existing table, but into main text flow, then select and convert to table. I have no idea how to implement the *option* to split text to rows - and then, what about columns? Do we need a full CSV import dialog like in Calc? My take would be WONTFIX, because it is a rarely-needed function that has a reasonable substitution. Asking UX for opinions.
(In reply to Mike Kaganski from comment #2) > Oh? I tried this right now with Word 2016, and couldn't get such a result - > either using text from terminal (cmd.exe or cygwin), nor from plain-text > editors like notepad. I see now: that works when the table is pre-selected only, not when the cursor is in the first cell of a range (as was my intuitive expectation). Maybe that could be the good option: repeat not the whole clipboard content into every selected cell, but iterate element by element - which, for a single copied line, would be equivalent to what happens now, and for multiple cells, would be what Jakub asks for. Only do that for plain text ...
It's not a rare use case, stumble over it myself from time to time. Guess there is a duplicate... If the clipboard content contains tabs it should go into the next column (what happens when it's not selected, eg. "1 /t 2 /t 3" but only 'A' or 'A and B' is selected?; what happens when the table has less columns?) and line feed continues at the next row (what if those cells are not selected, eg. 1 \n 2 \n 3 \n 4 and only 1 and 2 are selected?; what happens when the table has less rows?). Please check MSO what happen in these cases.
If the unformatted text is pasted into a table it should do what Jakub suggests in c1. If the table has not enough rows or columns it should be added. If a selection has been made the paste operation should work only on this subset. If the text to be pasted exceeds the selection a warning "Not all content has been pasted" should tell the user what happened.
*** Bug 95741 has been marked as a duplicate of this bug. ***
*** Bug 104127 has been marked as a duplicate of this bug. ***
*** Bug 149930 has been marked as a duplicate of this bug. ***
I've run into this as well, quite regularly. I have a Writer document that I use as a template, copying and filling it out regularly, with a table in it. I generate data for different columns of that table via the command-line, putting it in the clipboard. What I'd *like* to do is paste directly into that table and have the data spread across rows. What I end up doing instead is opening Libreoffice Calc, pasting there which *does* default to automatically splitting across rows, then copying the resulting rows and pasting into Writer, which spreads across rows there. That's a cumbersome workflow, and I'd love to *just* use Writer for this.