Bug 144219 - Name of a chart should be read-only (in fact it is)
Summary: Name of a chart should be read-only (in fact it is)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2021-08-31 12:34 UTC by Andreas Säger
Modified: 2022-12-27 17:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Macro trying to rename a chart (17.01 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-08-31 14:26 UTC, Andreas Säger
Details
Macro trying to set the PersistName property (17.01 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-08-31 16:01 UTC, Andreas Säger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Säger 2021-08-31 12:34:09 UTC
See attached Calc document with macro. Pseudo-property is not writable although there is a method setName(newName).

There is also a property "PersistName" when you access the chart as a DrawPage elemen:
chart = ThisComponent.Sheets(0).DrawPage.getByIndex(0)
spn = chart.PersistName
This property ignores the attempt to rename and finally crashes the chart element. After document recovery the chart is gone.
Comment 1 Andreas Säger 2021-08-31 14:26:15 UTC
Created attachment 174673 [details]
Macro trying to rename a chart
Comment 2 elias estatistics 2021-08-31 15:11:22 UTC
I checked the macro in Libre Office  7.3.0.0.alpha0+

In my computer, it is not crashed no chart is disappearing.  





Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: ac0db5736a53a4887cebbacc59026cecb7c44c66
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: el-GR (el_GR.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-08-08_02:51:24
Calc: threaded
Comment 3 Andreas Säger 2021-08-31 16:01:54 UTC
Created attachment 174677 [details]
Macro trying to set the PersistName property

This one tries to change the PersistName from "Object 1" to "Chart 1" by macro. Sometimes it crashes.
In any case the new name is reported as an empty string whereas the new name is shown in the navigator. The only accepted name is the old name "Object 1".
Comment 4 Buovjaga 2022-05-20 13:14:39 UTC
(In reply to Andreas Säger from comment #3)
> Created attachment 174677 [details]
> Macro trying to set the PersistName property
> 
> This one tries to change the PersistName from "Object 1" to "Chart 1" by
> macro. Sometimes it crashes.
> In any case the new name is reported as an empty string whereas the new name
> is shown in the navigator. The only accepted name is the old name "Object 1".

No crash, but I confirm the modified name in the pop up dialog is shown as "Object 1"

Arch Linux 64-bit
Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: 47e8763114f12fe14e2a8dd94b5a339f614d23bc
CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 20 May 2022