Issue 91439 - XEnhancedMouseClickHandler and Keymodifiers
Summary: XEnhancedMouseClickHandler and Keymodifiers
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: 4.1.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-07 17:51 UTC by officista
Modified: 2017-05-20 09:32 UTC (History)
4 users (show)

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


Attachments
Proposed patch to fix this issue (810 bytes, patch)
2012-07-27 16:37 UTC, hanya
hanya.runo: review? (hanya.runo)
Details | Diff
Document contains macro to verify the patch (10.29 KB, application/octet-stream)
2012-07-27 16:51 UTC, hanya
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description officista 2008-07-07 17:51:03 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.
Comment 1 jsc 2008-07-09 14:19:39 UTC
jsc -> cd: probably one for you
Comment 2 hanya 2012-07-27 16:37:03 UTC
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.
Comment 3 hanya 2012-07-27 16:51:37 UTC
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.
Comment 4 Andre 2012-07-31 12:20:25 UTC
The patch looks like it is Calc only.  Can it be fixed for the applications as well?
Comment 5 hanya 2012-07-31 12:58:16 UTC
(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.
Comment 6 SVN Robot 2013-12-20 13:59:32 UTC
"jsc" committed SVN revision 1552675 into trunk:
#91439# apply patch to copy key modifiers as well
Comment 7 jsc 2013-12-20 14:00:43 UTC
patch reviewed, locally checked and applied on trunk

Thanks for the patch