Apache OpenOffice (AOO) Bugzilla – Issue 33972
Problems raising Macro Selector from Basic dialog controls tab
Last modified: 2005-01-06 11:36:35 UTC
Office crashes when you try to add bindings to events generated by objects in a Basic dialog.
set target
Crash occurs because the list of events supplied is empty! Need some code to prevent attempts to select nul objects. Also need to determine why no events are provided.
In OPropertyBrowserController::ChangeEventProperty (extensions/source/propctrlr/formcontroller.cxx) the XScriptEventsDescriptor returns a sequence of zero events. This used to return as list of events even where there was no macro bound to the event.
I can't see any difference in the behaviour of XScriptEventsSupplier. XScriptEventsDescriptor does not exist anyway, only a struct type ScriptEventDescriptor. XScriptEventsSupplier provides a list of all EXISTING event bindings. If no binding is defined xEventsSupplier-> getEvents() returns an empty sequences (same in SO 7). Unlike this m_aObjectListenerTypes.getConstArray() really always returns the list of possible events defined by the supported UNO li- stener interfaces (e.g. XMouseMoveListener). Starting in line 1526 (in formcontroller.cxx 1.76) a search is performed if for a given com- bination of ListenerType/ListerMethod (e.g. XMouseMoveListener/ MouseMoved) a binding is defined. Valid ScriptEventDescriptor in- stances do always only exist if a binding is really defined. There's no change concerning this from SO 7 to 8, so I cannot see, where the problem really is. Is EventsNameReplace_Impl Scripting Framework related stuff? If yes, I wonder if it is correct, that in line 1614 events are added, even if no binding has been found. But I'm not sure, because I don't know the semantics of it. Please have a look or tell me more about the SF related code. If it's not SF related we will have to ask Frank Schönheit about the changes that obviously lead to the crash.
Yep, the EventsNameReplace_Impl was introduced when i had to work on the redesign of the Events configuration dialog. I though it would be easier to work with XEventsSupplier/XNameReplace that she SfxItemSet. I was sure that I did have this working, but obviously I'm mistaken. I'll look at the code that you've descibed and see what i can do.
Needed to move two lines of code adding the events to the EventNameReplace_Impl outside of that block (so all events are added regardless of whether they have a binding. Secondary problem with the init of UI strings in macropg.cxx.
Took a look at this with Duncan and it seems that some code needs to be moved into a different block in extensions/source/propctrlr/formcontroller.cxx and also InitResources() needs to be called in the constructor of SvxMacroAssignDlg in svx/source/dialog/macropg.cxx With these changes the events list is popluated correctly. Fixed in scriptingf6 CWS
verified
*** Issue 32679 has been marked as a duplicate of this issue. ***
closing, fix verified in an m69 build