Reflection always returns typename as com.sun.star.uno.XInterface [closed]

asked 2017-08-30 01:48:51 +0200

Zev Spitz gravatar image

updated 2020-08-05 23:41:58 +0200

Alex Kemp gravatar image

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?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2020-08-05 23:41:37.673659