Issue 85078 - ThisComponent returns null when debugged in the Basic IDE
Summary: ThisComponent returns null when debugged in the Basic IDE
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: 680m241
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.4
Assignee: joerg.skottke
QA Contact: issues@framework
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2008-01-08 11:27 UTC by Ariel Constenla-Haile
Modified: 2008-03-11 15:11 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2008-01-08 11:27:41 UTC
ThisComponent does not work when debuggin a macro in the Basic IDE, if this
macro is NOT located inside a document, that is, it is located in one of the
user's libraries:

 * open a Writer document
 * open the Basic IDE
 * write a macro in any of the USER's libraries (NOT the document's) like
 	Sub Main
 		oDoc = ThisComponent.CurrentController
 	End Sub
 
In previous versions, you could run this macro in/from the IDE.
ThisComponent will point to the Writer doc. 

NOW it returns null and trying to get the current controller throws an
exception. To get a valid reference you have to run the "outer"-macro from the
Writer doc's Tools - Macro - Run macro... menu.

IIRC ThisComponent could also get a NOT NULL reference to the BasicIDE module,
if it was the only component in the Desktop, now it does not.
Comment 1 Frank Schönheit 2008-01-08 13:48:54 UTC
Since this is a regression compared with 2.3/.1, it should be fixed in 2.4.
Comment 2 Frank Schönheit 2008-01-08 20:20:41 UTC
fixed in CWS thiscomponent

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Fthiscomponent
Comment 3 Frank Schönheit 2008-01-08 20:26:20 UTC
fs-> jsk: please verify in CWS thiscomponent
Comment 4 joerg.skottke 2008-01-10 13:48:00 UTC
ThisComponent.getIdentifier now returns the document type from which the Basic
IDE has been called which i believe is the correct behavior.

Verified
Comment 5 joerg.skottke 2008-03-11 15:11:42 UTC
closed