Bug 90698 - EDITING: malformed list (1;2) erroneously changed to union range list (1~2) despite operands are not references
Summary: EDITING: malformed list (1;2) erroneously changed to union range list (1~2) d...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium major
Assignee: Eike Rathke
URL:
Whiteboard: target:6.2.0 target:7.1.0
Keywords:
Depends on:
Blocks: Calc-Formula-Bar
  Show dependency treegraph
 
Reported: 2015-04-18 19:45 UTC by Nick Levinson
Modified: 2020-09-09 17:41 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Levinson 2015-04-18 19:45:49 UTC
When pasting a badly misformed formula into a spreadsheet, I'd rather be told at least that there's an error and perhaps even what error Calc sees. Instead, I think Calc attempts to fix the formula without telling us. In one case, it replaced commas with tildes. This means we have to re-proofread what we've pasted when pasting should allow us to skip that step if we already proofed it before pasting. (The specific case with the example is discussed at <http://ask.libreoffice.org/en/question/48439/calc-formula-why-are-tildes-auto-replacing-commas/>.) (I guessed my hardware.)
Comment 1 raal 2015-04-18 20:09:26 UTC
I can confirm with  Version: 4.5.0.0.alpha0+
Build ID: 51e0d789c344547956764c3b5f0ef5a304f4e0aa
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-04-13_16:58:45

paste into cell:

=CONCATENATE(IF(BA3=1);"A";(IF(BA3=2);"B";(IF(BA3=3);"C";(IF(BA3=4);"D";(IF(BA3=5);"E";(IF(BA3=6);"F";(IF(BA3=7);"G";(IF(BA3=8);"H";(IF(BA3=9);"I";(IF(BA3=10);"J";(IF(BA3=11);"K";(IF(BA3=12);"L";(IF(BA3=13);"M";(IF(BA3=14);"N";(IF(BA3=15);"O";(IF(BA3=16);"P";(IF(BA3=17);"Q";(IF(BA3=18);"R";(IF(BA3=19);"S";(IF(BA3=20);"T";(IF(BA3=21);"U";(IF(BA3=22);"V";(IF(BA3=23);"W";(IF(BA3=24);"X";"Y")))))))))))))))))))))));RANDBETWEEN(5;17))

LO change into:
=CONCATENATE(IF(BA3=1);"A";(IF(BA3=2)~"B"~(IF(BA3=3)~"C"~(IF(BA3=4)~"D"~(IF(BA3=5)~"E"~(IF(BA3=6)~"F"~(IF(BA3=7)~"G"~(IF(BA3=8)~"H"~(IF(BA3=9)~"I"~(IF(BA3=10)~"J"~(IF(BA3=11)~"K"~(IF(BA3=12)~"L"~(IF(BA3=13)~"M"~(IF(BA3=14)~"N"~(IF(BA3=15)~"O"~(IF(BA3=16)~"P"~(IF(BA3=17)~"Q"~(IF(BA3=18)~"R"~(IF(BA3=19)~"S"~(IF(BA3=20)~"T"~(IF(BA3=21)~"U"~(IF(BA3=22)~"V"~(IF(BA3=23)~"W"~(IF(BA3=24)~"X"~"Y")))))))))))))))))))))));RANDBETWEEN(5;17))
Comment 2 raal 2015-04-18 20:10:20 UTC
reproduced with LibreOffice 3.5.0 
Build ID: d6cde02
Comment 3 QA Administrators 2016-09-20 09:24:55 UTC Comment hidden (obsolete)
Comment 4 raal 2018-06-14 16:11:31 UTC
Still repro.
Version: 6.2.0.0.alpha0+
Build ID: c4c56de1b0e62ec866b519b2b24c5e805f0a86d3
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3;
Comment 5 Nick Levinson 2018-10-10 22:07:28 UTC
I disagree with the new summary, because it omits that the program is editing without telling the user that it's editing the paste. I don't know if the problem is limited to list/union cases. Can the new and old summaries be merged somehow?
Comment 6 Eike Rathke 2018-10-10 23:04:36 UTC
The new summary exactly describes the cause of this behaviour, and yes, this is limited to the union case as the intention was to accept (range1;range2) as input for a range list (union) as in Excel.
Comment 7 Commit Notification 2018-10-11 09:27:57 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#90698 catch list (1;2) of non-references as error

It will be available in 6.2.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 8 Commit Notification 2020-09-09 17:41:26 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e7b0e0b2b0df7197ee04c5c7232145d7a044bae0

tdf#90698: sc_ucalc: Add unittest

It will be available in 7.1.0.

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

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