Created attachment 137897 [details] Example file Description: Pasting raw text, with empty columns, erase cells Steps to reproduce: 1. Create a new sheet, with formulas in column D = SUM(A1:C1) (or open attached document) 2. Copy this text: 1;2;3;;60 2;3;4;;61 Note: successive semi colons indicate an empty column 3. Click on menu button of Paste button > Unformated text 4. In dialog, check semi colon as separator, OK Actual result: Formula in column D are erased. Expected result: Formula in column D should be kept Workaround: paste in another sheet, copy again and paste special with "Skip empty cells" option Reproduce with: - Version: 5.3.0.1 (x64) Build ID: 3b800451b1d0c48045de03b5b3c7bbbac87f20d9 Threads CPU : 2; Version de l'OS :Windows 6.1; UI Render : par défaut; Moteur de mise en page : nouveau; Locale : fr-FR (fr_FR); Calc: CL - Version: 5.3.6.1 Build ID: 686f202eff87ef707079aeb7f485847613344eb7 Threads CPU : 2; Version de l'OS :Windows 6.1; UI Render : par défaut; Moteur de mise en page : nouveau; Locale : fr-FR (fr_FR); Calc: group NOT reproduce with (works as expected): - Version: 5.2.7.2 (x64) Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10 Threads CPU : 2; Version de l'OS :Windows 6.1; UI Render : par défaut; Locale : fr-FR (fr_FR); Calc: CL - Version: 5.3.0.0.alpha1 (x64) Build ID: f4ca1573fcf445164c068c1046ab5d084e1b005f Threads CPU : 2; Version de l'OS :Windows 6.1; UI Render : par défaut; Locale : fr-FR (fr_FR); Calc: CL
Reproduce with: - Version: 5.3.0.0.beta1 (x64) Build ID: 690f553ecb3efd19143acbf01f3af4e289e94536 Threads CPU : 2; Version de l'OS :Windows 6.1; UI Render : par défaut; Layout Engine: new; Locale : fr-FR (fr_FR); Calc: CL - Version: 5.4.2.1 (x64) Build ID: dfa67a98bede79c671438308dc9036d50465d2cb Threads CPU : 2; OS : Windows 6.1; UI Render : par défaut; Locale : fr-FR (fr_FR); Calc: CL Set as regression
Reproduce with: - Version: 5.3.0.0.alpha1+ (x64) Build ID: 9745d29227e471ce40e9992fefd92e10a48696fb CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2016-11-18_21:55:13 Locale: fr-FR (fr_FR); Calc: CL NOT reproduce with: - Version: 5.3.0.0.alpha1+ Build ID: bbd44f8f89839b5abb4ec6c7ea195431de5b2f48 CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2016-10-26_23:19:45 Locale: fr-FR (fr_FR); Calc: CL Regression was introduced between 2016-10-26_23:19:45 and 2016-11-18_21:55:13 Still present in recent master: - Version: 6.0.0.0.alpha1+ (x64) Build ID: 6d24213d55df33c7bb5f10d511dcfc82b745db38 CPU threads: 4; OS: Windows 6.1; UI render: default; TinderBox: Win-x86_64@42, Branch:master, Time: 2017-11-18_04:09:43 Locale: fr-FR (fr_FR); Calc: CL
Regression introduced by: author Tamás Gulácsi <tgulacsi78@gmail.com> 2016-11-11 20:11:01 (GMT) committer Eike Rathke <erack@redhat.com> 2016-11-12 14:43:22 (GMT) commit 96175a4bc6687c3adc31b9e0246fe49db2b7675e (patch) tree 2cefbbe0c0f8be5a0b4ad5c402fd80bab80bbdf5 parent f57502e75cae1020f3fcfa5919802a78a6ccb6ff (diff) tdf#69981 - sc: blank empty cells in TextToColumns If the string is empty, we must delete the destination cell. This is done, iff we don't return early (rStr.isEmpty() check). Instead, add a fast path for the empty string. Bisected with: bibisect-linux-64-5.3 Adding Cc: to Tamás Gulácsi
I came to the same conclusion with a manual bisection ;-) It seems that this behavior was intentionally introduced with commit 96175a4bc6687c3adc31b9e0246fe49db2b7675e https://cgit.freedesktop.org/libreoffice/core/commit/sc/source/ui?id=96175a4bc6687c3adc31b9e0246fe49db2b7675e to fix bug 69981 for Text to column function. Shall we have a different behavior when pasting raw text? @Eike: any advice?
Or shall we have an option "Skip empty cells" to let user decide which behavior he is expecting?
The "Text to Columns" case is clear, you don't want to have anything there which weren't in the text before. The simplest case for this is converting ",a,b,c" to columns - you want "_ a b c" and not ",a,b,c a b c". I can accept that pasting raw text may behave differently, and skip empty cells, but that should be at least configurable, is someone want it differently/consistently.
(In reply to Tamás Gulácsi from comment #6) > The "Text to Columns" case is clear, you don't want to have anything there > which weren't in the text before. > The simplest case for this is converting ",a,b,c" to columns - you want "_ a > b c" and not ",a,b,c a b c". I do not totally agree with you. It's OK for the *first* column: if text starts with a separator, first column must be empty. But if text contains several successive separator, user may (or not) want to keep the previous content of the cell. Lets consider for example in column A: ",b,,d,,f". In Text to column with comma as separator, with previous behavior (prior 5.3) content of column C and E where preserved (and column A was not emptied which was the bug). With new behavior (from version 5.3), column A, C and E are emptied. As this was the behavior from the beginning, not erasing columns C and E should be consider as a feature. An option "Skip empty cells" would make all users happy, if Text to column function considers to erase first column if text starts with a separator.
I confirm the bug explained here or what I consider as so or at least a loss of functionality. I clearly use this disappeared feature everyday since I put formulas between pasted raw text. Therefore, thanks to Laurent investigation, I had to revert to an ancient version that works it should. OS : linux version : back to 5.2.7.2 What I clearly ask is for an option to tick just like in copy-special paste from csv to sheet
Laurent BP committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3bd4957191f12457c17404645bab0794639c95f8 tdf#113979 Add option to Skip empty cells It will be available in 6.1.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.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8f3f6755d7f7355493e873954513fdaeb4dceca9 Have one getSkipEmptyCellsIndex(), assert array length, tdf#113979 follow-up It will be available in 6.1.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.
Thanks Eike for your reviewing. @all: Eike suggested that "Skip empty cells" may be a bit ambiguous, as it doesn't indicate whether source or target cells are meant. Specifically, the source doesn't have "cells" yet.. concluding empty target cells then is really confusing and not what was meant. I proposed "Skip empty cells", because it is the wording used in Paste Special. Do you have any suggestion to be clearer, such as "Empty field content overwrites target cell" which sounds too long?
(In reply to Laurent BP from comment #11) > @all: Eike suggested that "Skip empty cells" may be a bit ambiguous The import dialog appears in 3 cases: - open CSV file: the new option is hidden - text to column - paste unformated text We may use two different texts for the option, according which case is used: - open CSV file: no text as the option is hidden - text to column: in this case the text in the first column contains delimiters, and "empty field" may be more appropriate to describe when there is two successive delimiters (or text starts with a delimiter) - paste unformated text: in this case, I thinks we can keep "Skip empty cells" because this case is very same the option "Skip empty cells" in Paste Special dialog Any suggestion?
Laurent BP committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=94375babd75d8b611311bab682f9017e0485d19b tdf#113979 Skip empty cells option
A polite ping to Laurent BP: is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Thanks
Actually the bug is fixed but Eike was not happy with the wording. Shall we close this report and open a new one to improve wording?
I opened bug 116448 for the problem of the wording of this option. Close this one.