thisComponent and access its
findAll method (See e.g. p405 of OpenOffice.org Macros Explained)
importClass(Packages.com.sun.star.frame.XDesktop) var currentComp = XDesktop.getCurrentComponent()
to get the current document (as described in http://www.pitonyak.org/AndrewMacro.odt, section 126.96.36.199) but it failed silently.
I also tried
var desktop = XSCRIPTCONTEXT.getDesktop(); var comp = desktop.getCurrentComponent();
…which gives me something, but that returned object does not have the
How to run findAll() in a JS Macro?