if (closeListeners == null)
closeListeners = new Hashtable();
XCloseable xCloseable = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, xComponent);
if (xCloseable != null) {
CloseListenerWrapper closeListenerWrapper = new CloseListenerWrapper(closeListener);
xCloseable.addCloseListener(closeListenerWrapper);
closeListeners.put(closeListener, closeListenerWrapper);
}
}