Bug 113562 - Last Digit is Automatically Deleted when Editing Formula with Comma-separated Values
Summary: Last Digit is Automatically Deleted when Editing Formula with Comma-separated...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.0.0 target:5.4.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-11-01 02:43 UTC by Kevin Suo
Modified: 2017-11-24 16:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of the steps (314.81 KB, image/png)
2017-11-02 13:06 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2017-11-01 02:43:45 UTC
Steps to Reproduce: (in Calc)

1. Type in "123456789" in A1 (without quotes), format as comma-separated number value with zero decimal place, (so it displays as "123,456,789");

2. Ctrl_C to copy A1.

3. Insert formula in A2 by typing "=", followed by CTRL+V, then delete the commas one by one. Hit Enter. 
Now the formula in A2 displays as "=123456789" which is good.

4. Editing the formula in A2 by appending "+<Ctrl_V>" (so you get "=123456789+123,456,789 "), then delete the commas (and also delete the space at the end) one by one. Hit Enter.
Now the formula displays as "=123456789+12345678". This is bad.

版本:5.4.2.2
Build ID:22b09f6418e8c2d508a9eaf86b2399209b0990f4
CPU 线程:4; 操作系统:Linux 4.13; UI 渲染:默认; VCL: gtk2; 
区域语言:zh-CN (zh_CN.UTF-8); Calc: single
Fedora 26 X64.
Comment 1 Mohamed 2017-11-01 09:04:34 UTC
I tried to reproduce the issue. But the final result gives the total of the addition of both values in the cell A2 however in the input line that’s true it shows the formula « =123456789+123456789 ». I don’t if it could be considered as a bug or not. Can you please mention the expected result ?

Tested on :
    • Operating system : Ubuntu 16.04.3 64-bits.
    • LibreOffice :Version: 5.4.3.1
      Build ID: 32c8895c6cae21571f364dbb059f419a743ee44d
CPU threads: 8; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: ja-JP (ja_JP.UTF-8); Calc: group
Comment 2 Kevin Suo 2017-11-01 11:25:12 UTC
(In reply to Mohamed from comment #1)
It is expected to be showing "=123456789+123456789" in formula bar, rather than "=123456789+12345678".
Comment 3 Kevin Suo 2017-11-01 11:26:42 UTC
By the way, i am using ibus-pinyin input method. I am under Gnome desktop.
Comment 4 Mohamed 2017-11-02 08:13:39 UTC
I did the same steps again and it displays the formula “123456789+123456789”, also I used ibus-pinyin as an input. I change to the following environment:

    • Ubuntu 17.10 x64-bits 
    • Version: 5.4.2.2
     Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
     CPU threads: 1; OS: Linux 4.13; UI render: default; VCL: gtk2; 
     Locale: en-US (en_US.UTF-8); Calc: group
Comment 5 Kevin Suo 2017-11-02 09:03:05 UTC
Need someone with Fedora 26 or Fedora 27 to test.
Comment 6 Kevin Suo 2017-11-02 12:43:37 UTC
I can also reproduce under Ubuntu 17.10 x64
Version: 5.4.1.2
Build ID:1:5.4.1-0ubuntu1
CPU Thread:2; OS:Linux 4.13; UI Rendering:Default; VCL: gtk3; 
Locale: zh-CN (zh_CN.UTF-8); Calc: group
Comment 7 Kevin Suo 2017-11-02 13:06:37 UTC
Created attachment 137463 [details]
screenshot of the steps

To reproduce, do not hit ENTER before you have deleted the space and the commas.
Comment 8 Kevin Suo 2017-11-07 04:39:03 UTC
This is a regression. I am doing bibisecting.
Comment 9 Kevin Suo 2017-11-07 04:51:51 UTC
Bibisected using lo-linux-dbgutil-daily-till53:
 a7e3e7008c4f8aa164590a42ce8d2cd3e46d488a is the first bad commit
commit a7e3e7008c4f8aa164590a42ce8d2cd3e46d488a
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Wed Aug 3 05:38:07 2016 +0200

    2016-08-03: source-hash-1b52171752d5e4f9fc101a8bc15f6feb6599aaa2

$ git bisect log
# bad: [a4e655a7c68de7ffcfe3e428584ebc25b9385e5c] 2016-08-24: source-hash-d5fab973d0af95c433c5f6a9492014f7db642489
# good: [fdc21834eb2e20bf4e0b857a937930d297ffbe5f] 2016-07-10: source-hash-903e60753f4cf8fb03e27ed312a699f72ac1649a
git bisect start 'a4e655a7c68de7ffcfe3e428584ebc25b9385e5c' 'fdc21834eb2e20bf4e0b857a937930d297ffbe5f'
# good: [fe9c60dd98b4b2e4a12bdde37c029d5a54792ac5] 2016-08-01: source-hash-e02e103e3e90d1c6fa32605fdfdc4ac8cd27e6b8
git bisect good fe9c60dd98b4b2e4a12bdde37c029d5a54792ac5
# bad: [c81b0aba2331369da8a0d8a26718cef79d6fe8a0] 2016-08-12: source-hash-8fb3e7971c52a13c2e8adf425ca02a13ea2e45c2
git bisect bad c81b0aba2331369da8a0d8a26718cef79d6fe8a0
# bad: [2ba5bc87d54319bc35de6c4e58e78ce00eb747d7] 2016-08-06: source-hash-07966a9999b0b3f27e1adeea1f4c97b3ba2944fa
git bisect bad 2ba5bc87d54319bc35de6c4e58e78ce00eb747d7
# bad: [a7e3e7008c4f8aa164590a42ce8d2cd3e46d488a] 2016-08-03: source-hash-
git bisect bad a7e3e7008c4f8aa164590a42ce8d2cd3e46d488a
# good: [05b36582da87aa073ece143551b279ae00fab5ca] 2016-08-02: source-hash-389b08190092f9a9103b3ac098994ec83b2d0bfa
git bisect good 05b36582da87aa073ece143551b279ae00fab5ca
# first bad commit: [a7e3e7008c4f8aa164590a42ce8d2cd3e46d488a] 2016-08-03: source-hash-1b52171752d5e4f9fc101a8bc15f6feb6599aaa2
Comment 10 Kevin Suo 2017-11-08 09:30:23 UTC
Bisected (yes, it is bisected)
 0321dbb9be72f92c02919457cdc3c4e76cfbd11d is the first bad commit
commit 0321dbb9be72f92c02919457cdc3c4e76cfbd11d
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Sat Jul 30 21:29:48 2016 +0100

    Resolves: tdf#99324 let sidebar toggle auto-mnemonics on/off with alt
    
    this returns things to passing the alt to the thing with the focus
    and depends on ::Command handlers passing the alt-press/release back
    up through the Command hierarchy to get to the default top-level
    handler eventually
    
    Change-Id: I869120f43810adfa2fac4670c2db143b790a1f9b

:040000 040000 c86e0cfe7c29866997dea80c28500036689a83f7 956f75bbc0c414628940725c8e805f7ecc89766e M	include
:040000 040000 f1e58b5813e4cb00da8e018fc22cafc0e4461b21 fdcd1c2427a235c2819a199738ed975b0dd6f9a6 M	sc
:040000 040000 9e3e84fe0b18f73ef94a5b10bc0652b876a27442 4cd8fde8b492e6cfa6ccc24809e1b51580e3d806 M	sd
:040000 040000 4048f34eabc4ae46ad628a2ef94e6d204cff1fa7 50626be43481b24d42d68f6f4cdfd7c94c5da965 M	sfx2
:040000 040000 050b8802f594ed2fa26c4a1efa2548a3b6d12b02 b52d1db4aa2c6ccab3d2da7b6d4b0ed28edf7d85 M	starmath
:040000 040000 00963273390fdf266288668e37971d0acfcde375 348008569fbb05c04544f5b46a65ba914da80330 M	svx
:040000 040000 2947b69e3afcc92ef98833a05137d92ae3c89408 2a2b7a7faefe0941414c8f37ee3c26a2505bb235 M	vcl

$ git bisect log
# bad: [9162c483bcc6288cc2a92503b6ec34d58496327b] GSoC notebookbar: Calc, Impress placeholder icons
# good: [52f377c2590d71895998a170105d0b07c13c267b] tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
git bisect start '9162c483bcc6288cc2a92503b6ec34d58496327b' '52f377c2590d71895998a170105d0b07c13c267b'
# good: [6d40c515fdf86d807c199ff4179b9c862a9fe5b2] libxmlsec: drop xmlsec1-keyinfo-revert.patch.1 completely
git bisect good 6d40c515fdf86d807c199ff4179b9c862a9fe5b2
# bad: [772191616a0cceebf91a9674ce7417d5cad0050f] Resolves: tdf#101241 Revert "fix paint table border in DOUBLE_THIN style"
git bisect bad 772191616a0cceebf91a9674ce7417d5cad0050f
# bad: [0321dbb9be72f92c02919457cdc3c4e76cfbd11d] Resolves: tdf#99324 let sidebar toggle auto-mnemonics on/off with alt
git bisect bad 0321dbb9be72f92c02919457cdc3c4e76cfbd11d
# first bad commit: [0321dbb9be72f92c02919457cdc3c4e76cfbd11d] Resolves: tdf#99324 let sidebar toggle auto-mnemonics on/off with alt

Adding Caolán McNamara to cc list. Would you please take a look? Thanks.
Comment 11 Commit Notification 2017-11-08 23:21:47 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#113562 desired window didn't get the input

It will be available in 6.0.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 12 Caolán McNamara 2017-11-08 23:23:54 UTC
backport to 5-4 in gerrit
Comment 13 Kevin Suo 2017-11-20 09:47:33 UTC
(In reply to Caolán McNamara from comment #12)
The backport commit for branch libreoffice-5-4 is still under code review. It has been 11 days -:)
Comment 14 Caolán McNamara 2017-11-20 12:47:20 UTC
I can't force people to review my patches
Comment 15 Kevin Suo 2017-11-20 14:11:33 UTC
(In reply to Caolán McNamara from comment #14)
I fully understand this, and thank you for your hard work.
Comment 16 Kevin Suo 2017-11-20 14:12:44 UTC
Verified fixed on master as of today.
Comment 17 Commit Notification 2017-11-24 16:48:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=13511a077bb85a68a3d29d081d0f88090028185f&h=libreoffice-5-4

Resolves: tdf#113562 desired window didn't get the input

It will be available in 5.4.4.

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.