xMSF = _xMSF;
}
public static void attachEventCall(XComponent xComponent, String EventName, String EventType, String EventURL) {
try {
XEventsSupplier xEventsSuppl = (XEventsSupplier) UnoRuntime.queryInterface(XEventsSupplier.class, xComponent);
PropertyValue[] oEventProperties = new PropertyValue[2];
oEventProperties[0] = new PropertyValue();
oEventProperties[0].Name = "EventType";
oEventProperties[0].Value = EventType; // "Service", "StarBasic"
oEventProperties[1] = new PropertyValue();
oEventProperties[1].Name = "Script"; //"URL";
oEventProperties[1].Value = EventURL;
xEventsSuppl.getEvents().replaceByName(EventName, oEventProperties);
} catch (Exception exception) {
exception.printStackTrace(System.out);
}
}