Related: #i122471# make the Mac lookup feature handle the correct word
(cherry picked from commit 0a4564b42de0fc61253ae4e69039860c09e53eba) Conflicts: vcl/osx/a11ytextattributeswrapper.mm Change-Id: I786815feb847a2a340d2e3d24c9a8a01bb7ace7c
This commit is contained in:
parent
069ab2135d
commit
aeeb125c4d
1 changed files with 5 additions and 1 deletions
|
@ -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 ] ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue