svtools a11y: Drop SvtRulerAccessible::getAccessibleIndexInParent
The base class implementation in OAccessibleComponentHelper::getAccessibleIndexInParent implements the same logic. Change-Id: I92958cc3186cabd2e302cf03a297c07bbd65f1b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184001 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -88,33 +88,6 @@ uno::Reference< XAccessible > SAL_CALL SvtRulerAccessible::getAccessibleParent()
|
||||
return mxParent;
|
||||
}
|
||||
|
||||
sal_Int64 SAL_CALL SvtRulerAccessible::getAccessibleIndexInParent()
|
||||
{
|
||||
SolarMutexGuard aSolarGuard;
|
||||
|
||||
// Use a simple but slow solution for now. Optimize later.
|
||||
|
||||
// Iterate over all the parent's children and search for this object.
|
||||
if( mxParent.is() )
|
||||
{
|
||||
uno::Reference< XAccessibleContext > xParentContext( mxParent->getAccessibleContext() );
|
||||
if( xParentContext.is() )
|
||||
{
|
||||
sal_Int64 nChildCount = xParentContext->getAccessibleChildCount();
|
||||
for( sal_Int64 i = 0 ; i < nChildCount ; ++i )
|
||||
{
|
||||
uno::Reference< XAccessible > xChild( xParentContext->getAccessibleChild( i ) );
|
||||
if( xChild.get() == static_cast<XAccessible*>(this) )
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Return -1 to indicate that this object's parent does not know about the
|
||||
// object.
|
||||
return -1;
|
||||
}
|
||||
|
||||
sal_Int16 SAL_CALL SvtRulerAccessible::getAccessibleRole()
|
||||
{
|
||||
SolarMutexGuard aSolarGuard;
|
||||
|
@@ -71,9 +71,6 @@ public:
|
||||
virtual css::uno::Reference< css::accessibility::XAccessible> SAL_CALL
|
||||
getAccessibleParent() override;
|
||||
|
||||
virtual sal_Int64 SAL_CALL
|
||||
getAccessibleIndexInParent() override;
|
||||
|
||||
virtual sal_Int16 SAL_CALL
|
||||
getAccessibleRole() override;
|
||||
|
||||
|
Reference in New Issue
Block a user