ScriptEventListener implements XMLConvertible { public static ScriptEventListener create(final ScriptEvent event, final String functionName) { return new ScriptEventListener("ooo:script", event, functionName, BASIC_LANG); } ScriptEventListener(final String genericLanguage, final ScriptEvent event,
                               final String functionName, final String language); static ScriptEventListener create(final ScriptEvent event, final String functionName); static ScriptEventListenerBuilder builder(final ScriptEvent event,
                                                     final String functionName); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable); static final String BASIC_LANG; static final String PYTHON_LANG; static final String JAVA_LANG; static final String JAVASCRIPT_LANG; }
@Test public void testCreate() throws IOException { final ScriptEventListener sel = ScriptEventListener.create(ScriptEvent.ON_LOAD, "func"); TestHelper.assertXMLEquals("<script:event-listener script:language=\"ooo:script\" " + "script:event-name=\"dom:load\" xlink:href=\"vnd.sun.star" + ".script:func?language=Basic&amp;location=document\" " + "xlink:type" + "=\"simple\"/>", sel); }