documentListeners = new Hashtable();
if(eventBroadcaster == null) {
Object globalEventBroadcaster = officeConnection.getXMultiServiceFactory().createInstance( "com.sun.star.frame.GlobalEventBroadcaster" );
eventBroadcaster = (XEventBroadcaster) UnoRuntime.queryInterface(XEventBroadcaster.class, globalEventBroadcaster);
}
DocumentListenerWrapper documentListenerWrapper = new DocumentListenerWrapper(documentListener);
eventBroadcaster.addEventListener(documentListenerWrapper);
documentListeners.put(documentListener, documentListenerWrapper);
}
catch (Exception exception) {
throw new DesktopException(exception);