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.
Created attachment 174673 [details] Macro trying to rename a chart
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
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".
(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