summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/valueacc.cxx13
-rw-r--r--svtools/source/control/valueset.cxx6
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 )
{