toolkit a11y: Stop declaring support for AccessibleContext service
The com.sun.star.accessibility.AccessibleContext UNO service is unnecessary and not really used for implementing a11y support, apart from some a11y implementations declaring support for it. What is relevant is the com.sun.star.accessibility.XAccessibleContext interface instead. Stop declaring support for the com.sun.star.accessibility.AccessibleContext service in AccessibleGridControlBase (and drop related XServiceInfo::getImplementationName overrides in subclasses), in preparation of dropping the service altogether in an upcoming commit. Change-Id: I66e6390ad77e3ff0febfb335c312954815c6581c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210400 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -63,13 +63,6 @@ namespace accessibility {
|
||||
/** Grabs the focus to the Grid Control. */
|
||||
virtual void SAL_CALL grabFocus() override;
|
||||
|
||||
// XServiceInfo -----------------------------------------------------------
|
||||
|
||||
/** @return
|
||||
The name of this class.
|
||||
*/
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
|
||||
public:
|
||||
AccessibleGridControl(
|
||||
const css::uno::Reference< css::accessibility::XAccessible >& _rxParent,
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#include <cppuhelper/implbase1.hxx>
|
||||
#include <cppuhelper/basemutex.hxx>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/accessibility/XAccessible.hpp>
|
||||
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
|
||||
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
|
||||
@@ -42,8 +41,7 @@ namespace accessibility {
|
||||
|
||||
/** The GridControl accessible objects inherit from this base class. It
|
||||
implements basic functionality. */
|
||||
class AccessibleGridControlBase
|
||||
: public cppu::ImplInheritanceHelper<comphelper::OAccessible, css::lang::XServiceInfo>
|
||||
class AccessibleGridControlBase : public comphelper::OAccessible
|
||||
{
|
||||
public:
|
||||
/** Constructor.
|
||||
@@ -115,18 +113,6 @@ public:
|
||||
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
|
||||
getAccessibleAtPoint( const css::awt::Point& rPoint ) override;
|
||||
|
||||
// XServiceInfo
|
||||
|
||||
/** @return Whether the specified service is supported by this class. */
|
||||
virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override;
|
||||
|
||||
/** @return a list of all supported services. */
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL
|
||||
getSupportedServiceNames() override;
|
||||
|
||||
/* Derived classes have to implement:
|
||||
- getImplementationName. */
|
||||
|
||||
// helper methods
|
||||
|
||||
/** @return The GridControl object type. */
|
||||
|
||||
@@ -106,11 +106,6 @@ public:
|
||||
/** @return TRUE, if the specified cell is selected. */
|
||||
virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) override;
|
||||
|
||||
// XServiceInfo
|
||||
|
||||
/** @return The name of this class. */
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
|
||||
private:
|
||||
/** Returns the specified row or column. Uses one of the parameters,
|
||||
depending on object type.
|
||||
|
||||
@@ -44,11 +44,6 @@ namespace accessibility
|
||||
/** Grabs the focus to the GridControl. */
|
||||
virtual void SAL_CALL grabFocus() override;
|
||||
|
||||
/** @return
|
||||
The name of this class.
|
||||
*/
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
|
||||
/** Return a bitset of states of the current object.
|
||||
*/
|
||||
sal_Int64 implCreateStateSet() override;
|
||||
|
||||
@@ -124,11 +124,6 @@ public:
|
||||
/** Removes the specified row/column from the selection. */
|
||||
virtual void SAL_CALL deselectAccessibleChild( sal_Int64 nSelectedChildIndex ) override;
|
||||
|
||||
// XServiceInfo
|
||||
|
||||
/** @return The name of this class. */
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
|
||||
// XComponent
|
||||
virtual void SAL_CALL dispose() override;
|
||||
|
||||
|
||||
@@ -78,11 +78,6 @@ public:
|
||||
/** @return The index of this object among the parent's children. */
|
||||
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
|
||||
|
||||
/** @return
|
||||
The name of this class.
|
||||
*/
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
|
||||
/** @return
|
||||
The count of visible children.
|
||||
*/
|
||||
|
||||
@@ -167,12 +167,6 @@ void SAL_CALL AccessibleGridControl::grabFocus()
|
||||
m_aTable.GrabFocus();
|
||||
}
|
||||
|
||||
// XServiceInfo ---------------------------------------------------------------
|
||||
OUString SAL_CALL AccessibleGridControl::getImplementationName()
|
||||
{
|
||||
return u"com.sun.star.accessibility.AccessibleGridControl"_ustr;
|
||||
}
|
||||
|
||||
// internal virtual methods ---------------------------------------------------
|
||||
|
||||
AbsoluteScreenPixelRectangle AccessibleGridControl::implGetBoundingBoxOnScreen()
|
||||
|
||||
@@ -124,18 +124,6 @@ lang::Locale SAL_CALL AccessibleGridControlBase::getLocale()
|
||||
throw IllegalAccessibleComponentStateException();
|
||||
}
|
||||
|
||||
// XServiceInfo
|
||||
|
||||
sal_Bool SAL_CALL AccessibleGridControlBase::supportsService(
|
||||
const OUString& rServiceName )
|
||||
{
|
||||
return cppu::supportsService(this, rServiceName);
|
||||
}
|
||||
|
||||
Sequence< OUString > SAL_CALL AccessibleGridControlBase::getSupportedServiceNames()
|
||||
{
|
||||
return { u"com.sun.star.accessibility.AccessibleContext"_ustr };
|
||||
}
|
||||
// internal virtual methods
|
||||
|
||||
bool AccessibleGridControlBase::implIsShowing()
|
||||
|
||||
@@ -165,13 +165,6 @@ sal_Bool SAL_CALL AccessibleGridControlHeader::isAccessibleSelected(
|
||||
return false;
|
||||
}
|
||||
|
||||
// XServiceInfo ---------------------------------------------------------------
|
||||
|
||||
OUString SAL_CALL AccessibleGridControlHeader::getImplementationName()
|
||||
{
|
||||
return u"com.sun.star.accessibility.AccessibleGridControlHeader"_ustr;
|
||||
}
|
||||
|
||||
// internal virtual methods ---------------------------------------------------
|
||||
|
||||
AbsoluteScreenPixelRectangle AccessibleGridControlHeader::implGetBoundingBoxOnScreen()
|
||||
|
||||
@@ -90,14 +90,6 @@ void SAL_CALL AccessibleGridControlHeaderCell::grabFocus()
|
||||
{
|
||||
}
|
||||
|
||||
/** @return
|
||||
The name of this class.
|
||||
*/
|
||||
OUString SAL_CALL AccessibleGridControlHeaderCell::getImplementationName()
|
||||
{
|
||||
return u"com.sun.star.accessibility.AccessibleGridControlHeaderCell"_ustr;
|
||||
}
|
||||
|
||||
AbsoluteScreenPixelRectangle AccessibleGridControlHeaderCell::implGetBoundingBoxOnScreen()
|
||||
{
|
||||
AbsoluteScreenPixelRectangle aGridRect( m_aTable.GetWindowExtentsAbsolute() );
|
||||
|
||||
@@ -270,13 +270,6 @@ void SAL_CALL AccessibleGridControlTable::deselectAccessibleChild(
|
||||
ensureAlive();
|
||||
}
|
||||
|
||||
// XServiceInfo ---------------------------------------------------------------
|
||||
|
||||
OUString SAL_CALL AccessibleGridControlTable::getImplementationName()
|
||||
{
|
||||
return u"com.sun.star.accessibility.AccessibleGridControlTable"_ustr;
|
||||
}
|
||||
|
||||
void AccessibleGridControlTable::dispose()
|
||||
{
|
||||
for (rtl::Reference<AccessibleGridControlTableCell>& rxCell : m_aCellVector)
|
||||
|
||||
@@ -123,14 +123,6 @@ sal_Int32 SAL_CALL AccessibleGridControlTableCell::getIndexAtPoint(const css::aw
|
||||
return m_aTable.GetIndexForPoint(vcl::unohelper::ConvertToVCLPoint(_aPoint));
|
||||
}
|
||||
|
||||
/** @return
|
||||
The name of this class.
|
||||
*/
|
||||
OUString SAL_CALL AccessibleGridControlTableCell::getImplementationName()
|
||||
{
|
||||
return u"com.sun.star.accessibility.AccessibleGridControlTableCell"_ustr;
|
||||
}
|
||||
|
||||
/** @return The count of visible children. */
|
||||
sal_Int64 SAL_CALL AccessibleGridControlTableCell::getAccessibleChildCount() { return 0; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user