Bug 134644 - Calc won't recognize decimal numbers pasted from Base through clipboard, when Calc uses comma and Base has set dot as decimal separator
Summary: Calc won't recognize decimal numbers pasted from Base through clipboard, when...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Decimal-Separator-Key
  Show dependency treegraph
 
Reported: 2020-07-08 09:45 UTC by Heinz Repp
Modified: 2023-04-03 18:36 UTC (History)
2 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 Heinz Repp 2020-07-08 09:45:38 UTC
Description:
Libreoffice 6.4.5 on Linux 64bit, Debian testing, German language

Database in Base based on Sqlite3: numbers have dots as decimal, Base shows them correct and can use them
When copying a table, view or query directly from the base main page, and then pasting to a new calc spreadsheet, numbers are not recognized, either decimal is left out to result in big integers, or numbers are treated as text.

Steps to Reproduce:
1. Open database in Base, select query/table, right click, select "copy"
2. Open new spreadsheet, select first cell, right click, select "paste"


Actual Results:
Numbers have either lost its decimal, or are treated as text

Expected Results:
numbers are pasted as numbers preserving their value


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Bug happened with 6.4.5, not selectable with the version drop-down above, and I do not recall experiencing this bug in versions before, using this procedure pretty often, so would like to mark it as regression. And it belongs to Base AND Calc, not selectable either

and this clearly happens only in languages that do not use dot as decimal
Comment 1 Heinz Repp 2020-07-08 10:14:48 UTC
further testing reveals, it's not as simple as this. Numbers, pasted from tables with numbers, stay numbers when pasted. The bug appears when I copy a query that has sums in its columns, then calc won't recognize the sums as numbers.

So to reproduce:
In Base, create a query with columns that use "sum" as function. Then copy this query, and paste it to a new spreadsheet. The sums paste wrong.

Further finding: If I use "paste contents", I can choose between "RTF" or "HTML", but that's the same when pasting a table. So I believe the bug resides within Base, it seems to format sums differently to simple values.
Comment 2 Robert Großkopf 2020-07-08 14:33:50 UTC
Have tested this with different versions:
Created a query with a sum for values with decimal-places.

Copy the query through the clipboard (right click - copy, in Calc right click - paste). The decimal-separator has been changed form comma to dot. The value is only recognized as text.

Take the query and drag the query from Base to Calc. The decimal separator is comma in Base and in Calc. The value has been recognized as decimal.

It's the same behavior in all LO-Versions here. Tested with LO 6.4.5.2 and also older versions like LO 6.1.5.2 Don't know if it is a regression, but I remember there are similar problems diffenert from copy-paste and drag-drop between Calc and Base.
Comment 3 Robert Großkopf 2020-07-08 14:36:08 UTC
Have forgotten to write down my system:
OpenSUSE 15.1 64bit rpm Linux
Different LO-Versions tested, oldest version here: LO 6.1.5.2
Tested with internal HSQLDB.
Comment 4 QA Administrators 2022-07-09 03:35:13 UTC Comment hidden (obsolete)
Comment 5 Robert Großkopf 2022-07-09 06:19:25 UTC
Couldn't reproduce the bug any more with LO 7.3.5.1 on OpenSUSE 15.3 64bit rpm Linux. But couldn't reproduce it also with older versions like LO 6.4.0, where I could reproduce it before.

One note: Copying the query through clipboard copies only the decimal places, which are shown through the format in the table. Drag and drop will show the real decimal places saved in the database. 

I would prefer to set this one to WORKSFORME. Feel free to reopen the bug.
Comment 6 Robert Großkopf 2022-07-09 06:29:49 UTC
Haven't realised: The decimal separator by the format in Base should be a dot. So changed the language in the table to English and copied through the clipboard into an empty Calc table, which has default language German.

Pasting in Calc will shows the dot (and text instead of decimal number), drag and drop from base to Calc wont show the dot, will show comma instead and decimal number.

Copy and pasting through clipboard will always show what has been shown when opening the table/query. If there is a dot it will copy a dot, if there are only 2 decimal places instead of 3 decimal places, it will show this 2 decimal places.

Don't know if we should set this one as WONTFIX, because it could be an intended behavior and difference between drag and drop and copy and paste.