The following lines of Javascript, running under CScript on Windows 10 Professional (LibreOffice 5.3.4.2) always outputs com.sun.star.uno.XInterface
, no matter what object I pass to the getType
method:
var objServiceManager = new ActiveXObject('com.sun.star.ServiceManager');
var objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop");
var objDocument = objDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, []);
var objCoreReflection = objServiceManager.createInstance("com.sun.star.reflection.CoreReflection");
var classInfo = objCoreReflection.getType(objDocument);
WScript.Echo(classInfo.getName());
classInfo = objCoreReflection.getType(objDesktop);
WScript.Echo(classInfo.getName());
// outputs twice com.sun.star.uno.XInterface
How can I find out the actual type?