Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Selecting lines in the beamer blocks event execution on dialog buttons | ||
---|---|---|---|
Product: | Writer | Reporter: | sos <sos> |
Component: | ui | Assignee: | marc.neumann |
Status: | CLOSED FIXED | QA Contact: | issues@sw <issues> |
Severity: | Trivial | ||
Priority: | P3 | CC: | ab, cno, issues, marcelly.bernard |
Version: | OOO310m8 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- | ||
Issue Depends on: | |||
Issue Blocks: | 99999 | ||
Attachments: |
Description
sos
2009-04-01 19:46:58 UTC
Created attachment 61344 [details]
File demonstrating Beamer slection blocking event execution in dialogs
Reassigned to JSK Here we have a serious problem. ALL custom dialogs are blocked when the beamer is opened en the users select and deselect some lines !! also Non-modal dialogs are infected see new attachement with a non-modal dialog Created attachment 61353 [details]
Document with Non-modal dialog blocked by beamer
could be a duplicate of 100956 cannot reproduce in OOO310.m9. No matter what I try, the send mail button always works (i.e. raises a message box). I di some more testing witht the RC 3.1 (m9) and have still the same problem Frank, Drew did you trie select more than one line in the beamer ? so I open the beamer > open the dialog > events works close the dialog slect one line in the beamer open the dialog > events still works close the dialog select more lines in the beamer leaving the first one slected open the dialog > events do not works anymore close the dialog close te beamer open the beamer open the dialog > events works again I also tried selecting multiple lines, to no avail - the macro in the dialog seems to work all the time. triggered by your recent post in dev@api I tried this again ... and I am *sometimes* able to reproduce it. Estimated 1 out of 5 cases, or so. I did not find a pattern when this does/not happen, but will continue trying. Perhaps I can reproduce it inside a debugger. I can reproduce the bug with a very simple dialog (next attachment). It only happens if the dialog macro is run from a toolbar or from menu Tools > Macros. Hope this helps. Created attachment 65938 [details]
A demo with a simple dialog
This has nothing to do with selected lines. For instance, I seem to be able to reliably reproduce the problem by doing the following: - press F4 to open the beamer - with the mouse, click into an arbitrary table cell - click into the Writer document - click into *the same* table cell => now if you use the SEND MAIL button in the toolbar to open the dialog, the buttons therein don't work. This looks like an unfortunate combination of multiple problems, but I need further investigations on it. fs->sos: I think I could fix this, though I am not yet sure whether this is primarily a Base or Basic or framework problem. Anyway, I suppose you might want to have this for 3.2. In this case, it's yours to speak up in releases@ooo. Though it might still be possible the fix is too risky or difficult for 3.2 ... fs->ab: That's a combination of two problems, one of them lies in Basic, and I'd like to get your opinion on this one ... Beforehand, to the anatomy of the bug: The macro is not executed because the event attacher for the dialog (an DialogEventsAttacherImpl) is constructed with a NULL model. Thus, when it is asked to execute a document-local macro, it cannot do this, since it does not known the document. Now this NULL model originates from getModelFromBasic in basic/source/classes/eventatt.cxx. What's passed into this function is the StarBASIC instance for the "MailMerge" library in the document. The function examines the *parent of the parent* of the given StarBASIC for a ThisComponent variable. Unfortunately, this is the *application Basic*, not the document Basic anymore. And ThisComponent in the application Basic, at this point in time, is not the Writer document, but the Beamer component (more on this below). What I think is the bug here is that getModelFromBasic asks the parent's parent, instead of walking up the ancestor chain. That is, if the parent already has a ThisComponent variable, then this one should be taken. Only if it hasn't, then it should go to the parent's parent (and perhaps further). Doing this fixes the bug. I *think* it is a proper fix, but would like to get your opinion on that. Created attachment 65939 [details]
suggested patch
Now for the second problem: The fact that the beamer (aka DataSourceBrowser displayed in the beamer) registers itself as "ThisComponent" in the application-wide Basic: This another bug, whose fixing would also fix the problem here. There is code in there which should prevent the ThisComponent registration if the DataSourceBrowser does not live in a top level window, however, obviously this code doesn't work sufficiently. I'll investigate this on a separate track. I committed a fix to the second part of the problem (the beamer registering itself as ThisComponent in the global Application Basic) to CWS dba33b. So, strictly, the bug is fixed. fs->ab: Despite the bug fixing fixed on dbaccess side, I think the problem in Basic should be fixed, too, so I leave the issue open for the moment, until you find time to review the patch. fs->sos: Please tell me whether or not you intend to nominate this issue as 3.2-blocker in releases@openoffice.org. Personally, I am somewhat undecided. You are the one having strong arguments (namely the OOo-based applications in your company which are broken by this bug), so I think you should be the one to nominate the issue, if anybody at all. sos->fs First of all thanks for the fix Honestly, for the moment I fixed the most urgent problems here by replacing the events by a listener. But we have still a lot of applications where the user can or cannot open a Beamer... So if its OK for you I make it a 3.2 stopper (i am back in office tomorrow) That'd be fine with me. After some discuss, accepted as 3.2 stopper. From me (who saves a lot of time) and all our users : thanks ! 3.2 stopper issue, adjusted target dbaccess-part of the fix committed to CWS dba32j committed the Basic part (after removing one assertion) to CWS dba32j, too, with AB's approval. Created attachment 66102 [details]
Document to test event binding in document dialogs
Created attachment 66103 [details]
Extension containing a Basic and dialog library to test event binding
The attachments contain dialogs to test the event binding. Each dialog can be executed with the main macro contained in the same library and clicking the buttons should call the appropriate macros. fs->misheto: please verify in CWS dba32j fs->msc: please verify in CWS dba32j verified in cws dba32j |