Issue 90705 - Deleting Draw layer does not work from IDE
Summary: Deleting Draw layer does not work from IDE
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: OOo 2.4.1
Hardware: All Windows, all
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2008-06-13 17:43 UTC by bmarcelly
Modified: 2013-12-27 16:52 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---

Document with macro to delete myLayer (11.79 KB, application/
2008-06-13 17:44 UTC, bmarcelly
no flags Details
Enhanced Sample Document (14.30 KB, application/
2013-12-27 16:43 UTC, Rainer Bielefeld
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description bmarcelly 2008-06-13 17:43:51 UTC
This macro deletes layer "myLayer" in a Draw document:

Dim allLayers As Object, thisLayer As Object
allLayers = ThisComponent.LayerManager
thisLayer = allLayers.getByName("myLayer")

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.
Comment 1 bmarcelly 2008-06-13 17:44:47 UTC
Created attachment 54463 [details]
Document with macro to delete myLayer
Comment 2 ab 2008-08-14 09:36:35 UTC
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.
Comment 3 Rob Weir 2013-07-30 02:38:48 UTC
Reset assignee on issues not touched by assignee in more than 1000 days.
Comment 4 Rainer Bielefeld 2013-12-27 16:43:59 UTC
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.
Comment 5 Rainer Bielefeld 2013-12-27 16:52:21 UTC
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