// .............................................................................................................
// scenario 3: assigning the script to some document event, and triggering this event
final XEventsSupplier eventSupplier = UnoRuntime.queryInterface( XEventsSupplier.class, m_currentDocument.getDocument() );
final XNameReplace events = UnoRuntime.queryInterface( XNameReplace.class, eventSupplier.getEvents() );
final NamedValue[] scriptDescriptor = new NamedValue[] {
new NamedValue( "EventType", "Script" ),
new NamedValue( "Script", scriptURI )
};
events.replaceByName( "OnViewCreated", scriptDescriptor );
// The below doesn't work: event notification is broken in m96, see http://www.openoffice.org/issues/show_bug.cgi?id=116313
m_callbackCalled = false;