Apache OpenOffice (AOO) Bugzilla – Issue 15552
cannot unassign script to event
Last modified: 2003-06-16 16:39:34 UTC
SframeworkInstall ed0.3 rc4 OpenOffice 1.1Beta2 and StarOffice 6.1 (m13s2) Error has been reprodcued on Solaris and win2000. Select tools, scripting add on's, assign script to event. Select location user, langugae java, script - HighLightText.showForm Choose event to assign to - Document, Save Document As. Select Assign, OK. Save the open document as e.g. testfile.The highlight text box is displayed. Select tools, scripting add on's, assign script to event. BUG -> the assignment has now disappeared, the user cannot unassign the script to this event for this document, i.e. the assignment is still functioning but the user cannot unassign it. Restarting StarOffice / OpenOffice does not fix the problem.
chaning priority to P3 as workaround is available. The user can unassign the script to the event using the standard tools, configure dialog.
Assign to duncan to investigate Note: Had a quick look at this, there is an error handler in the ReadEventsFromDoc() starbasic ScriptBinding.xba module. The behaviour in previous releases was that if the doc had no bindings the line "scriptProps = eventSupplier.getEvents().getByName( allEventTypes( n ).Name )" would fail and no bindings would be populated into the event list, this is ok. If events were present in the doc each event that had no binidng would return scriptProps with length ( or more precisely ubound scriptProps() ) would return -1. Now it appears that this call will fail even if the doc has events but event name supplied to getByName hasn't got a binding. May be necessary to put "eventSupplier.getEvents().getByName( allEventTypes( n ).Name )" in a seperate sub or method and return flag to indicate whether binding exists.
Fixed as per NP suggestion. ie Added separate function handler to check if ScriptProps is OK.
verified fixed on: solaris sparc SO 6.1beta windows SO 6.1beat windows OO 1.1beat2 closing issue