Issue 24986 - unable to intercept (via UNO) COMMAND_CONTEXTMENU notifications of compound controls
Summary: unable to intercept (via UNO) COMMAND_CONTEXTMENU notifications of compound c...
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: Frank Schönheit
QA Contact: issues@dba
URL:
Keywords:
Depends on:
Blocks: 24387
  Show dependency tree
 
Reported: 2004-02-02 09:21 UTC by Frank Schönheit
Modified: 2006-05-31 14:29 UTC (History)
1 user (show)

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


Attachments
suggested patch (2.17 KB, patch)
2004-02-02 09:27 UTC, Frank Schönheit
no flags Details | Diff
new patch (2.71 KB, patch)
2004-02-06 10:53 UTC, Frank Schönheit
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2004-02-02 09:21:53 UTC
*** autogenerated child task for Issue 24385 ***
Comment 1 Frank Schönheit 2004-02-02 09:26:45 UTC
fs->ssa:
It's currently not possible to intercept notifications about a context menu
request in a compound control (such as a combo box) via UNO.
Normally, the COMMAND_CONTEXTMENU is multiplexed in
VCLXWindow::ProcessWindowEvent( VCLEVENT_WINDOW_COMMAND ), however, this does
work only for controls which are no compound controls, since all others do not
properly notify the VCLEVENT_WINDOW_COMMAND event.

I talked about it with MT, and as a result, I created something which I think
could be a patch. It uses a similar mechanisms as is currently in place for
notifying key and mouse events (in Window::ImplNotifyKeyMouseEventListeners,
which is called from winproc.cxx).
According to MT, you would be the best person to review this.

I am going to attach a patch here, and would ask you for feedback.
Comment 2 Frank Schönheit 2004-02-02 09:27:27 UTC
Created attachment 12830 [details]
suggested patch
Comment 3 Frank Schönheit 2004-02-02 09:29:35 UTC
The patch fixes the problem for me, and it's as minimal invasive as possible
(well, I hope so :).
The only thing left would probably be renaming the
ImplNotifyKeyMouseEventListeners to something else then ...

fs->ssa: If you find some time, I'd be grateful if you'd review this ...
Comment 4 hans_werner67 2004-02-02 12:18:51 UTC
change subcomponent to 'none'
Comment 5 stephan_schaefer 2004-02-04 13:21:30 UTC
ssa->fs: in general the patch is ok. however, as the whole method is defined to
be recursive and already visits all parents, wouldn't it be nice to use that
functionality instead of doing it locally and then returning? Additionally,
translating mousecoordinates can be done using ImplTranslateMouseEvent, as for
the other event types below.
Comment 6 Frank Schönheit 2004-02-06 10:53:38 UTC
Created attachment 12927 [details]
new patch
Comment 7 Frank Schönheit 2004-02-06 10:54:51 UTC
fs->ssa: what about the new version? :)
I now use the recursiveness of the method, and introduced an
ImplTranslateCommandEvent (ImplTranslateMouseEvent wasn't usable because it
handles, well, MouseEvents).
Comment 8 Frank Schönheit 2004-02-18 16:29:56 UTC
fixed in CWS frmcontrols02 (after ssa's approval by phone)
Comment 9 Frank Schönheit 2004-04-06 13:49:10 UTC
works in CWS frmcontrols02
Comment 10 Frank Schönheit 2004-12-30 08:33:21 UTC
fix verified in 680 m66