Bug 93951 - Changing a formula calculation to include § causes truncation
Summary: Changing a formula calculation to include § causes truncation
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.3.0 target:6.2.2 target:7.4.0
Keywords:
Depends on:
Blocks: Cell-Formula
  Show dependency treegraph
 
Reported: 2015-09-05 19:38 UTC by Vesa Roto
Modified: 2022-03-16 14:59 UTC (History)
4 users (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 Vesa Roto 2015-09-05 19:38:09 UTC
If you accidentally add § into a formula will cause the rest of the formula to be erased.  This is specially annoying in keyboard layouts where § is next to 1 so it is easy to hit by accident.

How to reproduce/example:
In all you should enter a calculation formula in a cell and see that it produces the expected value and that when you click on it the edit bar shows the right formula. I will use =2*2*2 as example in the following.

First example:
Change the middle 2 to a § producing =2*§*2 and press enter. You get the expected Err:501 as cell value, but going back to edit you see =2* in the edit box, so everything starting from § was truncated.

Expected behavior: Have =2*§*2 in the edit box so could change the § into the meant 1


Second example:
Undo or type in =2*2*2 again to reset for next:
Change the first 2 to a § producing =§*2*2 and press enter. You get the expected Err:501 as cell value, but going back to edit you see Err:501 in the edit box, so everything including the = was truncated.

Expected behavior: Have =§*2*2 in the edit box so could change the § into the meant 1

Third example:
Type in directly a new formula =§*2*2 and press enter. You get the expected Err:501 as cell value, but going back to edit you see Err:501 in the edit box, so everything including the = was truncated.

Expected behavior: Have =§*2*2 in the edit box so could change the § into the meant 1

Libreoffice version:
Version: 5.0.1.2 (x64)
Build ID: 81898c9f5c0d43f3473ba111d7b351050be20261
Locale: en-GB (en_GB)

System: 
Windows 8.1 Pro 64 bit.
Comment 1 Jean-Baptiste Faure 2015-09-05 21:24:21 UTC
Reproducible with LO 5.0.3.0+ built at home under Ubuntu 15.04 x86-64 with gcc 5.1.
We encounter the same behaviour with any invalid character (in the meaning of LO Calc), for example ± or ¨
Set status to NEW.

Best regards. JBF
Comment 2 m_a_riosv 2015-09-05 21:49:17 UTC
Seems it begins with ascii 128
Comment 3 QA Administrators 2016-09-20 10:29:04 UTC Comment hidden (obsolete)
Comment 4 Jean-Baptiste Faure 2016-09-28 17:19:13 UTC
Still reproducible in LO 5.2.3.0+ and current master, both built at home under Ubuntu 16.04 x86-64.

Best regards. JBF
Comment 5 Xisco Faulí 2017-09-29 08:49:16 UTC Comment hidden (obsolete)
Comment 6 Jean-Baptiste Faure 2017-10-28 11:22:23 UTC
Still reproducible in LO 5.4.4.0.0+ and current master, both built at home under Ubuntu 16.04 x86-64.

Best regards. JBF
Comment 7 QA Administrators 2018-10-29 03:58:08 UTC Comment hidden (obsolete)
Comment 8 Jean-Baptiste Faure 2019-01-05 12:18:19 UTC
Still reproducible with LO 6.2.0.1.0+

Best regards. JBF
Comment 10 Commit Notification 2019-01-30 09:56:42 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/7d6f30d04c51088b26815c241a7473c48822c6c3%5E%21

Resolves: tdf#93951 set remainder as bad string if not parsed as valid

It will be available in 6.3.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.
Comment 11 Eike Rathke 2019-01-30 10:07:23 UTC
Pending review https://gerrit.libreoffice.org/67115 for 6-2
Comment 12 Commit Notification 2019-02-13 09:03:35 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/99b0a3702d9c04c68d33adb9fbf1fd289618cc89%5E%21

Resolves: tdf#93951 set remainder as bad string if not parsed as valid

It will be available in 6.2.2.

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.
Comment 13 Jean-Baptiste Faure 2019-02-13 21:05:45 UTC
Verified fixed in Version: 6.2.2.0.0+
Build ID: ffd826d0e421a7634ac742439ecd0e7563b3eb4d
Threads CPU : 4; OS : Linux 4.15; UI Render : par défaut; VCL: gtk3; 
Ubuntu_18.04_x86-64
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded

Best regards. JBF
Comment 14 m_a_riosv 2019-02-20 14:52:43 UTC
Also verified in
Version: 6.3.0.0.alpha0+ (x64)
Build ID: 99e12aed50765d0c2ac7be29c44469641f2567b5
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-02-16_23:24:24
Locale: es-ES (es_ES); UI-Language: en-US
Calc: CL
Comment 15 Commit Notification 2022-03-16 14:59:45 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/26623cc6c144c451323a08be7bd021ae354b1a95

tdf#93951: sc_ucalc: Add unittest

It will be available in 7.4.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.