diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2012-03-08 10:18:58 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-24 11:53:49 +0100 |
commit | 015bc43da010456460dd594d35118ce35d006469 (patch) | |
tree | aabe8181e87566fe2f7312c8b874b7debcac76a6 /src/plugins/platforms/windows/accessible/iaccessible2.cpp | |
parent | d86e101d1bbee6865aa78f131a072e732e2136ae (diff) |
API cleanup: remove CoordinateType enum
The bridge can do the mapping to and from screen position.
This is now done in the windows bridge.
Change-Id: I5ca5df0fbeeb58202539f55a0f62717fb1685092
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/accessible/iaccessible2.cpp')
-rw-r--r-- | src/plugins/platforms/windows/accessible/iaccessible2.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/accessible/iaccessible2.cpp b/src/plugins/platforms/windows/accessible/iaccessible2.cpp index f22349714f..719169f78f 100644 --- a/src/plugins/platforms/windows/accessible/iaccessible2.cpp +++ b/src/plugins/platforms/windows/accessible/iaccessible2.cpp @@ -1028,6 +1028,7 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_caretOffset(long *offset) return E_FAIL; } + HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_characterExtents(long offset, enum IA2CoordinateType coordType, long *x, @@ -1037,9 +1038,8 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_characterExtents(long offse { accessibleDebugClientCalls(accessible); if (QAccessibleTextInterface *text = textInterface()) { - const QRect rect = text->characterRect(offset, (QAccessible2::CoordinateType)coordType); - *x = rect.x(); - *y = rect.y(); + QRect rect = text->characterRect(offset); + mapFromScreenPos(coordType, rect.topLeft(), x, y); *width = rect.width(); *height = rect.height(); return S_OK; @@ -1064,7 +1064,8 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_offsetAtPoint(long x, { accessibleDebugClientCalls(accessible); if (QAccessibleTextInterface *text = textInterface()) { - *offset = text->offsetAtPoint(QPoint(x,y), (QAccessible2::CoordinateType)coordType); + QPoint screenPos = mapToScreenPos(coordType, x, y); + *offset = text->offsetAtPoint(screenPos); return (*offset >=0 ? S_OK : S_FALSE); } return E_FAIL; |