Bug 164548 - Calc: Chart data series names corrupted when cell A1 moved or new column inserted before column A
Summary: Calc: Chart data series names corrupted when cell A1 moved or new column inse...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.4.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: implementationError
Depends on:
Blocks: Chart-Data
  Show dependency treegraph
 
Reported: 2025-01-02 22:29 UTC by TonyH
Modified: 2025-01-04 03:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple spreadsheet containing a scatter chart (15.34 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-01-02 22:34 UTC, TonyH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TonyH 2025-01-02 22:29:31 UTC
Description:
A Chart has several data series whose names are specified using quoted text in the right mouse click->'Data Ranges', 'Data Series' Tab, 'Range for Name' field (rather than from the content of a cell).

Moving the contents of cell A1 to (for example) B1 causes the names of all the data series to change to the content of what was in cell A1. The same happens when inserting a new column before column A. Undo does not undo these corruptions properly (after moving cell A1) or at all (after inserting column)

Steps to Reproduce:
1. See description. Create a scatter chart and rename the data serie(s) using a quoted name, or by using the attached spreadsheet:
2. Move the contents of cell A1 to B2. Note chart legends change to text in B2.
3. ctr-Z to undo. Note legends change but doesnt restore to original
4. Instead of moving cell A1 contents, insert column before column A. Note chart legends change to content of cell B1
5. ctr-Z. Note no change to legends 


Actual Results:
See above

Expected Results:
See above


Reproducible: Always


User Profile Reset: No

Additional Info:
This is a nasty bug as it loses data (the names) with no obvious way to recover.

Saving and reloading the spreadsheet doesa not restore the data.

Version: libreoffice-24.8.3.2
Build:   48a6bac
Comment 1 TonyH 2025-01-02 22:34:39 UTC
Created attachment 198363 [details]
Simple spreadsheet containing a scatter chart

As stated in bug report, move the contents of cell A1 to cell B1 and note chart legends change.
Comment 2 Regina Henschel 2025-01-03 22:53:46 UTC
The string is written to file as "loext:label-string". That was introduced with fix for bug 64722.

Besides the problems listed here, the implementation has the error, that "loext:label-string" is written in ODF strict versions. It may only be written in ODF extended versions.