diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-31 11:03:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-31 22:06:17 +0200 |
commit | 66a1cec7366f28e9287ce88d64bb357bb9dd6c99 (patch) | |
tree | 169f0320a8e7b3b83fbf0aeb73db3624c84adb2b /svtools | |
parent | ea49b0f30d227df3d75991a3d3369aac70aa944d (diff) |
connect up accessibility location
Change-Id: I226e42cf6bd7aa455514439f7303b490aa6d192d
Reviewed-on: https://gerrit.libreoffice.org/55137
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/valueacc.cxx | 13 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 6 |
2 files changed, 8 insertions, 11 deletions
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 34cf5c41a0aa..093fd4d2de92 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -1373,18 +1373,15 @@ awt::Point SAL_CALL SvtValueItemAcc::getLocation() awt::Point SAL_CALL SvtValueItemAcc::getLocationOnScreen() { const SolarMutexGuard aSolarGuard; - uno::Reference<accessibility::XAccessible> xParent(getAccessibleParent()); awt::Point aRet; - if (mpParent && xParent) + if( mpParent ) { - uno::Reference<accessibility::XAccessibleContext> xParentContext(xParent->getAccessibleContext()); - uno::Reference<accessibility::XAccessibleComponent> xParentComponent(xParentContext, css::uno::UNO_QUERY_THROW); - awt::Point aParentScreenLoc(xParentComponent->getLocationOnScreen()); - const Point aOwnRelativeLoc = mpParent->mrParent.GetItemRect(mpParent->mnId).TopLeft(); + const Point aPos = mpParent->mrParent.GetItemRect(mpParent->mnId).TopLeft(); + const Point aScreenPos( mpParent->mrParent.GetDrawingArea()->get_accessible_location() ); - aRet.X = aParentScreenLoc.X + aOwnRelativeLoc.X(); - aRet.X = aParentScreenLoc.Y + aOwnRelativeLoc.Y(); + aRet.X = aPos.X() + aScreenPos.X(); + aRet.Y = aPos.Y() + aScreenPos.Y(); } return aRet; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index dc5e52896641..292c89a097b2 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -2824,7 +2824,7 @@ void SvtValueSet::SelectItem( sal_uInt16 nItemId ) if( nPos != VALUESET_ITEM_NOTFOUND ) { - ValueItemAcc* pItemAcc = ValueItemAcc::getImplementation( + SvtValueItemAcc* pItemAcc = SvtValueItemAcc::getImplementation( mItemList[nPos]->GetAccessible( false/*bIsTransientChildrenDisabled*/ ) ); if( pItemAcc ) @@ -2846,9 +2846,9 @@ void SvtValueSet::SelectItem( sal_uInt16 nItemId ) else pItem = mpNoneItem.get(); - ValueItemAcc* pItemAcc = nullptr; + SvtValueItemAcc* pItemAcc = nullptr; if (pItem != nullptr) - pItemAcc = ValueItemAcc::getImplementation( pItem->GetAccessible( false/*bIsTransientChildrenDisabled*/ ) ); + pItemAcc = SvtValueItemAcc::getImplementation( pItem->GetAccessible( false/*bIsTransientChildrenDisabled*/ ) ); if( pItemAcc ) { |