Apache OpenOffice (AOO) Bugzilla – Issue 85078
ThisComponent returns null when debugged in the Basic IDE
Last modified: 2008-03-11 15:11:42 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.
Since this is a regression compared with 2.3/.1, it should be fixed in 2.4.
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
fs-> jsk: please verify in CWS thiscomponent
ThisComponent.getIdentifier now returns the document type from which the Basic IDE has been called which i believe is the correct behavior. Verified
closed