Apache OpenOffice (AOO) Bugzilla – Issue 91439
XEnhancedMouseClickHandler and Keymodifiers
Last modified: 2017-05-20 09:32:09 UTC
XEnhancedMouseClickHandler provides a function mouseReleased with the arugment com.sun.star.awt.EnhancedMouseEvent. EnhancedMouseEvent inherits from MouseEvent and from InputEvent. InputEvent provides the value Modifiers, which contains the modifier keys which were pressed while the event occurred. Unfortunately the Modifiers is always zero for the EnhancedMouseEvent, so it is not possible to react on an ALT+click or CTRL+click. It would be nice to have that as well.
jsc -> cd: probably one for you
Created attachment 78762 [details] Proposed patch to fix this issue Modifiers is not copied from MouseEvent to EnhancedMouseEvent before calling mousePressed and mouseReleased method. Patch to copy Modifiers also.
Created attachment 78763 [details] Document contains macro to verify the patch To verify this problem on non-patched version, please follow: - open attached file - push "Push Button" placed on Sheet1 - push down Shift key and click mouse button on any cell -> "pressed: 0" - one more click with Shift -> "released: 0" These result should be 1 that is defined in css.awt.KeyModifier.SHIFT = 1 To verify with the attached patch, the same procedure can be used. But the shown results should be one of combination of key modifires.
The patch looks like it is Calc only. Can it be fixed for the applications as well?
(In reply to comment #4) > The patch looks like it is Calc only. Can it be fixed for the applications > as well? From IDL and OpenGrok, css.awt.XEnhancedMouseClickHandler interface is used only in css.awt.XEnhancedMouseClickBroadcaster interface. I couldn't find the use of css.awt.EnhancedMouseEvent struct in other place too.
"jsc" committed SVN revision 1552675 into trunk: #91439# apply patch to copy key modifiers as well
patch reviewed, locally checked and applied on trunk Thanks for the patch