Apache OpenOffice (AOO) Bugzilla – Issue 24986
unable to intercept (via UNO) COMMAND_CONTEXTMENU notifications of compound controls
Last modified: 2006-05-31 14:29:06 UTC
*** autogenerated child task for Issue 24385 ***
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.
Created attachment 12830 [details] suggested patch
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 ...
change subcomponent to 'none'
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.
Created attachment 12927 [details] new patch
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).
fixed in CWS frmcontrols02 (after ssa's approval by phone)
works in CWS frmcontrols02
fix verified in 680 m66