Bug 144219

Summary: Name of a chart should be read-only (in fact it is)
Product: LibreOffice Reporter: Andreas Säger <villeroy>
Component: ChartAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: buzea.bogdan, ilmari.lauhakangas
Priority: medium    
Version: 7.3.0.0 alpha1+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=152130
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 90486    
Attachments: Macro trying to rename a chart
Macro trying to set the PersistName property

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