Bug 101112 - Pasted number loses one decimal or a space when adding text.
Summary: Pasted number loses one decimal or a space when adding text.
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-25 14:43 UTC by Vesa Roto
Modified: 2016-08-10 22:27 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 Vesa Roto 2016-07-25 14:43:50 UTC
If there is a number with decimals in a cell and you copy paste that to the edit box, remove all but one digit after the decimal dot and add text then the last decimal is removed automatically.

Ok, so the description and the bug is a bit weird so the below steps of how to reproduce should clear it.

Part one:

1) Enter a number with a decimal dot and more than one digit after it to a field. Example: 1.555 in A1
2) copy that cell. (ctrl-c)
3) go to another cell Example: B1
4) Click in the input line and paste the value. (ctrl-v)
5) Verify that you have the expected number. Example: 1.555
6) Remove extra digits so that you only have one after the decimal Example 1.5
7) Add in some letters after the automatically included space Example: tons
8) Look in the input box and see that you have the expected thing. Example: 1.5 tons
9) Press enter to accept
10) look in the cell and note that the number after the . is removed but the rest is there. Example: 1. tons

Expected result would be that the field would still be 1.5 tons.

Note that you should keep the cursor in the input box(not clicking outside or pressing enter or similar) for steps 4-8.  If you click enter and click again in the edit box after step 4 or 5 before step 6 you will get the correct result of 1.5 tons in the cell

Part two:
Do the same, except leave 2 numbers after the decimal dot and note that you have the value with only one number after the decimal dot. In the previous example in step 6 editing the "1.555" to be "1.55 tons" results in "1.5 tons" at step 10.

Same can then be repeated with three and so on, you always lose one digit in such.

Part three:
Do the same except do not remove any decimal digits just adding the text. So in above skip step 6 fully. Thus in the example at step 8 you have "1.555 tons" Then the space is removed and you end up with "1.555tons" in step 10

Used:

Version: 5.1.4.2 (x64)
Build ID: f99d75f39f1c57ebdd7ffc5f42867c12031db97a
CPU Threads: 4; OS Version: Windows 6.29; UI Render: default; 
Locale: en-GB (en_GB)
Comment 1 Buovjaga 2016-08-01 19:05:15 UTC
I reproduce the problem of "1,5tons", "1,55tons" etc. in 5.1.4, but not the eating of the digit.
I don't reproduce any problem in 5.3.

Using comma as separator on Finnish locale.

Vesa: could you test with 5.2?

You can close as worksforme, if it is fixed for you in 5.2.

64-bit, KDE Plasma 5
Build ID: 5.1.4.2 Arch Linux build-1
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: c1b665fcdacd4141137f1e369527e2c0d94513ae
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on July 26th 2016
Comment 2 Vesa Roto 2016-08-10 22:27:47 UTC
This issue seems fixed in 5.2.0.4