Is it possible to gain an XInterface access to the currently viewed OoBasic library module. The purpose of this is to apply a macro to the macro source file. For the currently viewed document, the XInterface is already defined as ThisComponent. I don't know the origin of ThisComponent but if it is manufactured then there should be a similar process for manufacturing an XInterface for the macro source file. I know that macros can be invoked while viewing a library module but they can't do much if they don't know how to access the module as a document.
LibreOffice version 6.1.5.2 (x64) on Windows 10