diff options
-rw-r--r-- | svx/source/dialog/weldeditview.cxx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 5c6c81c9aa60..ebd608ff3624 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -561,22 +561,11 @@ public: css::awt::Point aScreenLoc(0, 0); - css::uno::Reference<css::accessibility::XAccessible> xParent(getAccessibleParent()); - if (xParent) + if (weld::DrawingArea* pDrawingArea = m_pController->GetDrawingArea()) { - css::uno::Reference<css::accessibility::XAccessibleContext> xParentContext( - xParent->getAccessibleContext()); - css::uno::Reference<css::accessibility::XAccessibleComponent> xParentComponent( - xParentContext, css::uno::UNO_QUERY); - OSL_ENSURE(xParentComponent.is(), - "WeldEditAccessible::getLocationOnScreen: no parent component!"); - if (xParentComponent.is()) - { - css::awt::Point aParentScreenLoc(xParentComponent->getLocationOnScreen()); - css::awt::Point aOwnRelativeLoc(getLocation()); - aScreenLoc.X = aParentScreenLoc.X + aOwnRelativeLoc.X; - aScreenLoc.Y = aParentScreenLoc.Y + aOwnRelativeLoc.Y; - } + Point aPos = pDrawingArea->get_accessible_location_on_screen(); + aScreenLoc.X = aPos.X(); + aScreenLoc.Y = aPos.Y(); } return aScreenLoc; |