Apache OpenOffice (AOO) Bugzilla – Issue 90705
Deleting Draw layer does not work from IDE
Last modified: 2013-12-27 16:52:21 UTC
This macro deletes layer "myLayer" in a Draw document: Dim allLayers As Object, thisLayer As Object allLayers = ThisComponent.LayerManager thisLayer = allLayers.getByName("myLayer") allLayers.remove(thisLayer) Well, it works if the macro is run from the document window. It does NOT work if run from the IDE ! Found on 2.4.1 and 2.3.1. No such problem on 1.1.5. Perhaps this strange bug has more consequences, it should be investigated. Next attachment is a simple Draw document with the macro.
Created attachment 54463 [details] Document with macro to delete myLayer
This seems to be a general problem with the ThisComponent handling. ThisComponent must keep the latest active real document, when the Basic IDE is activated. ab->as: Please have a look.
Reset assignee on issues not touched by assignee in more than 1000 days.
Created attachment 82180 [details] Enhanced Sample Document Still Reproducible with server installation of "AOO 4.1.0-Dev – English UI / English locale - [AOO410m1(Build:9750) - Rev. 1546757 - 2013-12-02]" on German WIN7 Home Premium (64bit)", own separate user profile: Macro Started from Draw document via _Tools -> Macros -> Run Macro ...' will delete layer "myLayer". But trying the same via menu 'Tools -> Macros -> Organize -> OO Basic - Select Macro in document -> Edit (Macro code appears) <f5>' will not delete the layer, although End of Macro will be reached. New sample document is based on original one, but with additional Message showing that macro has been finished.
Additional Inof: (a) already broken with OOo 2.0.2 (b) worked fine with OOo 1.1.5 (c) Still a problem with LibO 4.1.3 (d) Seems severity NORMAL to me due to Comment 2