Bug 151278 - Label number format lost when copy/pasting graph
Summary: Label number format lost when copy/pasting graph
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
7.2.7.2 release
Hardware: All All
: medium normal
Assignee: Oliver Specht (CIB)
URL:
Whiteboard: target:25.8.0 target:25.2.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2022-10-02 16:14 UTC by Milan Bouchet-Valat
Modified: 2025-02-12 16:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


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

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
Description:
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 7.2.7.2 and 7.4.1.2. It is a regression from version 6.2.5.2, 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: 7.4.1.2 / 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: 7.5.0.0.alpha0+ / 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: 6.0.0.0.alpha1+
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?
Thanks
 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

https://git.libreoffice.org/core/+/e57d90cd4e51a1353eafc87bb29cfe6076704a7c
Comment 4 QA Administrators 2024-10-06 03:17:58 UTC Comment hidden (obsolete)
Comment 5 Milan Bouchet-Valat 2024-10-08 07:25:26 UTC
I can still reproduce the problem with the right-hand side graph in the testcase document.

Version: 7.6.7.2 (X86_64)
Build ID: 60(Build:2)
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 6 Commit Notification 2025-01-30 14:45:42 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e72919a30132cabeb3e3fda2f9ce16688e9f40eb

tdf#151278 tdf#164724 tdf#164728 tdf#164729 switch off charts number format from source

It will be available in 25.8.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 7 Commit Notification 2025-02-12 16:25:43 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/d440b72b336985dabc0ca3e511d88b90dc201b86

tdf#151278 tdf#164724 tdf#164728 tdf#164729 switch off charts number format

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