Description: This concerns what happens when newlines are pasted into Calc's Formula Bar. I have seen pasting into the ***formula bar*** recommended somewhere as a way to Paste (Ctrl+V) unformatted without the contortions of pressing Ctrl+Alt+Shift. This technique has the Paste Unformatted effect in both Calc and Excel, but unfortunately is problematic in Calc when the text contains newlines. I contend the result should basically be equivalent to entering Cell Edit Mode followed by Paste Unformatted, in regards to how any CR/LF/or any other expression of newline in the data is handled. Steps to Reproduce: 1. Copy these three lines to the clipboard: a b c 2. In Calc, click on the formula bar. 3. Paste (Ctrl+V) Actual Results: The data is pasted all on one line, with newlines replaced by single spaces. Expected Results: Match Excel behavior: The newlines are pasted. Reproducible: Always User Profile Reset: No Additional Info: Version: 25.2.4.3 (X86_64) / LibreOffice Community Build ID: 33e196637044ead23f5c3226cde09b47731f7e27 CPU threads: 12; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded
But it does keep the new lines! Specifically via the Paste Special put in place for bug 50746, and to be consistent with internal copy/paste single cell multi-cell selections bug 113571 and bug 119928. Use Paste Special <Ctrl><Shift><V>, and paste into the Formula bar as 'unformatted text', the target cell receives the content with CR/LF or newlines. To convince yourself, <Tab> to the next cell. Then <Tab> back to the target cell. CR/LF or newlines will be present. That is the way the 'unformatted text' filter handles it. Just the visual representation the edit shell for the Formula bar on paste does not show--during the paste, but they are there. The Formula bar will show the new lines when revisiting the cell. No reason to change current behavior, simple <Ctrl>+V paste does not include the new lines, while <Ctrl><Shift>+V w/ "Unformatted text" selection will. IMHO => WF
The request is to handle Paste (Ctrl+V) in the Input Line (Formula Bar) same as Paste Special (Shift+Ctrl+V) Unformatted, preserving newlines; one could indeed expect that a standard Paste preserves as much formatting as possible, at least as much as Paste Special Unformatted. However, pasting text is quite intertwined as the mentioned bug 113571 (specifically https://bugs.documentfoundation.org/show_bug.cgi?id=113571#c4) and bug 119928 (specifically https://bugs.documentfoundation.org/show_bug.cgi?id=119928#c17) indicate, and the behaviour that different targets (input line, in cell, over cell) for the same source may and should behave differently with multiple cells (thus multi-line unformatted text) doesn't make it easier. Maybe someone wants to deeply investigate..
(In reply to V Stuart Foote from comment #1) > Use Paste Special <Ctrl><Shift><V>... Does this satisfy you, Jason?
(In reply to Heiko Tietze from comment #3) > (In reply to V Stuart Foote from comment #1) > > Use Paste Special <Ctrl><Shift><V>... > Does this satisfy you, Jason? Some perspective on this: As a technical user, I know all the different paste commands and how to customize the menus and toolbars as well. What I was really trying to encourage to be addressed is not to find a solution for "me" but to make things easier for users who are confused by this not meeting expectations, especially users coming from an Excel background where this functionality works "better". Consider some users just want to focus on data entry and not learn about idiosyncrasies compared to Excel. I think Eric Rathke summed up my thinking very well: "one could indeed expect that a standard Paste preserves ... at least as much as Paste Special Unformatted.".
Created attachment 202375 [details] Calc (top) vs. Excel (bottom) While we provide much more and better functionality with paste special the line break is indeed missing. We apparently understand it as part of the formatting while Excel preserves it. However, I see no way to copy the cell content with formatting in Excel, which makes it a poor comparison. For consistency we should either make F2 and FB (formula bar) behave similarly and paste with all formatting per Ctrl+V or do exactly the current behavior and clear the new-line along with other attributes. But has there been any request to do so? "Make it available" is to optionally allow pasting unformatted.
No further comment, let's resolve this as invalid. There is ctrl+v and shift+ctrl+v allowing to insert text with or without all level of formats. The actual request "Paste into formula bar should keep newlines" can be done per shift+ctrl+v in the formula input line with the choice of "Unformatted text". If you disagree please feel free to reopen.