https://bugs.documentfoundation.org/show_bug.cgi?id=171549
Bug ID: 171549
Summary: Writer: Table name collision in SwDoc::SetTableName
breaks linked chart data sources
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
Description:
When renaming a table results in a name collision, LibreOffice generates a new
unique name. However, charts linked to this table are not properly updated.
This inconsistency is evident in the saved .odt file: the root `content.xml`
reference is updated, but the internal `Object 1/content.xml` reference remains
stale (pointing to the old name).
The issue is also reproducible when renaming a table to an empty string, as
this triggers the same logic and results in the same behavior.
Steps to Reproduce:
Scenario 1 Name collision:
1. Create a new Writer document.
2. Create two tables: "Table1" and "Table2" and populate them with some
numbers.
3. Select "Table1" and create a chart using "Table1" as the data source.
4. Try to rename "Table1" to "Table2" (to trigger a name collision).
Scenario 2 Empty name
1. Create a new Writer document.
2. Create a table and populate it with some numbers.
3. Select the table and create a chart using this table as the data source.
4. Try to rename the table to an empty string (to trigger the generation of a
new unique name).
Actual Results:
1. "Table1" is automatically renamed to a unique name "Table3".
2. The UI shows the new name in the chart formula, but the chart stops syncing
with the table data.
3. Saved ODF: content.xml shows the new table name in
draw:notify-on-update-of-ranges, but Object 1/content.xml still uses the old
table name in chart:values-cell-range-address.
Expected Results:
The chart data source should be correctly updated to the new table name.
The chart should still sync with the table data.
Reproducible: Always
User Profile Reset: No
Additional Info:
Technical reference:
The issue appears to be located here:
https://git.libreoffice.org/core/+/refs/tags/libreoffice-26.2.2.2/sw/source/core/doc/docchart.cxx#182
Specifically, rNewName does not necessarily reflect the final name assigned to
the table (e.g., when a unique name is generated due to a collision).
Thisb ug predates the year 2000 and is present in the current master branch.
--
You are receiving this mail because:
You are the assignee for the bug.