sc a11y: Drop redundant OAccessible::getAccessibleContext call
It returns a reference to itself, so is not needed here. Change-Id: If474740c54f50084ad6f32fde6727ef6df076a9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211209 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -495,20 +495,18 @@ tools::Rectangle ScAccessibleEditControlObject::GetBoundingBox()
|
||||
{
|
||||
tools::Rectangle aBounds( GetBoundingBoxOnScreen() );
|
||||
|
||||
uno::Reference<XAccessibleContext> xContext = getAccessibleContext();
|
||||
if ( xContext.is() )
|
||||
uno::Reference<XAccessible> xParent(getAccessibleParent());
|
||||
if (xParent.is())
|
||||
{
|
||||
uno::Reference< XAccessible > xParent( xContext->getAccessibleParent() );
|
||||
if ( xParent.is() )
|
||||
uno::Reference<XAccessibleComponent> xParentComponent(xParent->getAccessibleContext(),
|
||||
uno::UNO_QUERY);
|
||||
if (xParentComponent.is())
|
||||
{
|
||||
uno::Reference< XAccessibleComponent > xParentComponent( xParent->getAccessibleContext(), uno::UNO_QUERY );
|
||||
if ( xParentComponent.is() )
|
||||
{
|
||||
Point aScreenLoc = aBounds.TopLeft();
|
||||
awt::Point aParentScreenLoc = xParentComponent->getLocationOnScreen();
|
||||
Point aPos( aScreenLoc.getX() - aParentScreenLoc.X, aScreenLoc.getY() - aParentScreenLoc.Y );
|
||||
aBounds.SetPos( aPos );
|
||||
}
|
||||
Point aScreenLoc = aBounds.TopLeft();
|
||||
awt::Point aParentScreenLoc = xParentComponent->getLocationOnScreen();
|
||||
Point aPos(aScreenLoc.getX() - aParentScreenLoc.X,
|
||||
aScreenLoc.getY() - aParentScreenLoc.Y);
|
||||
aBounds.SetPos(aPos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user