Issue 33972 - Problems raising Macro Selector from Basic dialog controls tab
Summary: Problems raising Macro Selector from Basic dialog controls tab
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: tomaisoc
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks: 34509
  Show dependency tree
 
Reported: 2004-09-08 15:10 UTC by duncan.foster
Modified: 2005-01-06 11:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description duncan.foster 2004-09-08 15:10:31 UTC
Office crashes when you try to add bindings to events generated by objects in a
Basic dialog.
Comment 1 duncan.foster 2004-09-08 15:16:51 UTC
set target
Comment 2 duncan.foster 2004-09-09 09:58:33 UTC
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.
Comment 3 duncan.foster 2004-09-13 10:29:14 UTC
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.
Comment 4 ab 2004-10-11 16:44:26 UTC
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.
Comment 5 duncan.foster 2004-10-13 16:55:56 UTC
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. 
Comment 6 duncan.foster 2004-10-14 11:51:25 UTC
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.
Comment 7 tomaisoc 2004-10-14 11:55:40 UTC
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
Comment 8 joerg.skottke 2004-10-22 13:53:41 UTC
verified
Comment 9 thomas.benisch 2004-10-28 15:55:27 UTC
*** Issue 32679 has been marked as a duplicate of this issue. ***
Comment 10 tomaisoc 2005-01-06 11:36:35 UTC
closing, fix verified in an m69 build