Bug 151278 - Label number format lost when copy/pasting graph
Summary: Label number format lost when copy/pasting graph
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Chart
  Show dependency treegraph
Reported: 2022-10-02 16:14 UTC by Milan Bouchet-Valat
Modified: 2022-10-06 10:44 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Test case ODS file (38.73 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-10-02 16:14 UTC, Milan Bouchet-Valat

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Bouchet-Valat 2022-10-02 16:14:07 UTC
When copy/pasting a graph from an ODS document to another ODS or ODT document, the number format for data labels is lost when set to be "Source format". In the attached testcase, the two original graphs use a single digit after the decimal separator, i.e. the format from source cells. But after copying either of the graphs to a new document, many more decimals are printed, making the output unreadable.

This bug happens on LO and It is a regression from version, though I'm not sure when exactly it was introduced.

Steps to Reproduce:
1. Open attachment.
2. Select one of the graphs.
3. Hit Ctrl+C.
4. Create a new ODS file.
5. Hit Ctrl+V.

Actual Results:
Labels use many decimal digits.

Expected Results:
Labels use only a single decimal digit like in original graph.

Reproducible: Always

User Profile Reset: No

Additional Info:
Version: / LibreOffice Community
Build ID: 3c58a8f3a960df8bc8fd77b461821e42c061c5f0
CPU threads: 4; OS: Mac OS X 12.6; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 1 Milan Bouchet-Valat 2022-10-02 16:14:44 UTC
Created attachment 182789 [details]
Test case ODS file
Comment 2 raal 2022-10-02 20:48:13 UTC
Confirm with Version: / LibreOffice Community
Build ID: bb47ffbc9d36e83695aa0d01767d3f83533c04e0
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

not in Version:
Comment 3 raal 2022-10-02 21:01:00 UTC
This seems to have begun at the below commit.
Adding Cc: to Balazs Varga; Could you possibly take a look at this one?
 fb0e0af33831dd51c24800b223eb5ca67174c301 is the first bad commit
commit fb0e0af33831dd51c24800b223eb5ca67174c301
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Dec 16 09:07:53 2019 +0100

    source e57d90cd4e51a1353eafc87bb29cfe6076704a7c