summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2014-06-25 11:40:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-06-26 16:29:11 +0100
commitaeeb125c4d64abe9fcc7f74b14e855a823bd74ae (patch)
tree1bd0884962ae8f6189e43a6e06116f0136d89134 /vcl
parent069ab2135d00f94ad098883561a7b7d895997937 (diff)
Related: #i122471# make the Mac lookup feature handle the correct word
(cherry picked from commit 0a4564b42de0fc61253ae4e69039860c09e53eba) Conflicts: vcl/osx/a11ytextattributeswrapper.mm Change-Id: I786815feb847a2a340d2e3d24c9a8a01bb7ace7c
Diffstat (limited to 'vcl')
-rw-r--r--vcl/osx/a11ytextwrapper.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/osx/a11ytextwrapper.mm b/vcl/osx/a11ytextwrapper.mm
index 29d525d8b7bf..bf69b226790a 100644
--- a/vcl/osx/a11ytextwrapper.mm
+++ b/vcl/osx/a11ytextwrapper.mm
@@ -204,7 +204,11 @@ using namespace ::rtl;
+(id)rangeForPositionAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)point {
NSValue * value = nil;
- sal_Int32 index = [ wrapper accessibleText ] -> getIndexAtPoint ( [ AquaA11yUtil nsPointToVclPoint: point ] );
+ Point aPoint( [ AquaA11yUtil nsPointToVclPoint: point ]);
+ const Point screenPos = [ wrapper accessibleComponent ] -> getLocationOnScreen();
+ aPoint.X -= screenPos.X;
+ aPoint.Y -= screenPos.Y;
+ sal_Int32 index = [ wrapper accessibleText ] -> getIndexAtPoint( aPoint );
if ( index > -1 ) {
value = [ AquaA11yTextWrapper rangeForIndexAttributeForElement: wrapper forParameter: [ NSNumber numberWithLong: index ] ];
}