diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-09-08 14:05:48 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-09-08 20:05:47 +0200 |
commit | 839dbf9ecf9f8fbec7de983d1a2e16d7de6f868c (patch) | |
tree | 5fc8ffe6cc669b1ae4e0bfa0f569df32623e935c /winaccessibility/source/UAccCOM/AccTable.h | |
parent | b298885ceaab0c892ffc449e09c2967a3a9e3ea6 (diff) |
tdf#100086 tdf#124832 wina11y: Implement IAccessibleTable2
Extend 'CAccTable' to implement the 'IAccessibleTable2'
interface in addition to the (deprecated)
'IAccessibleTable' interface from the IAccessible2 spec.
'IAccessibleTable2::get_cellAt' and
'IAccessibleTable2:get_nSelectedCells' are basically
the same as 'IAccessibleTable::get_accessibleAt' and
'IAccessibleTable::get_nSelectedChildren' under
new names.
'IAccessibleTable2::get_selectedRows' and
'IAccessibleTable2::getSelectedColumns' are
essentially the same as their 'IAccessibleTable'
counterparts, except that they have the first
param removed (which is ignored in the
IAccessibleTable version anyway).
'IAccessibleTable2::get_selectedCells' is similar
to 'IAccessibleTable::get_selectedChildren', but
returns an array of references to selected cells,
while the latter just returns an array of their
indices.
Note: Just having the IAccessibleTable2 interface,
but not the IAccessibleTableCell one implemented makes
the experience when using the NVDA screen reader
temporarily worse, e.g. it now only says "selected" instead of
the name of the currently focused cell in Calc.
Implementation of IAccessibleTableCell is added
in an upcoming commit
(Change-Id: I0f53212d14ee17c760b9e6c91be2154a1b25d862,
"tdf#100086 tdf#124832 wina11y: Implement IAccessibleTableCell")
and makes NVDA announce the name of the cell again.
Change-Id: I75346efc3b6e79d5ebf5e1954e9c516244efb887
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121820
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility/source/UAccCOM/AccTable.h')
-rw-r--r-- | winaccessibility/source/UAccCOM/AccTable.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/winaccessibility/source/UAccCOM/AccTable.h b/winaccessibility/source/UAccCOM/AccTable.h index b373339bc369..d4062986147c 100644 --- a/winaccessibility/source/UAccCOM/AccTable.h +++ b/winaccessibility/source/UAccCOM/AccTable.h @@ -26,12 +26,13 @@ #include "UNOXWrapper.h" /** - * CAccTable implements IAccessibleTable interface. + * CAccTable implements the IAccessibleTable and IAccessibleTable2 interfaces. */ class ATL_NO_VTABLE CAccTable : public CComObjectRoot, public CComCoClass<CAccTable, &CLSID_AccTable>, public IAccessibleTable, + public IAccessibleTable2, public CUNOXWrapper { @@ -45,6 +46,7 @@ public: BEGIN_COM_MAP(CAccTable) COM_INTERFACE_ENTRY(IAccessibleTable) + COM_INTERFACE_ENTRY(IAccessibleTable2) COM_INTERFACE_ENTRY(IUNOXWrapper) COM_INTERFACE_ENTRY_FUNC_BLIND(NULL,SmartQI_) #if defined __clang__ @@ -72,11 +74,14 @@ public: DECLARE_NO_REGISTRY() public: - // IAccessibleTable + // IAccessibleTable and IAccessibleTable2 - // Gets accessible table cell. + // Gets accessible table cell (IAccessibleTable version). STDMETHOD(get_accessibleAt)(long row, long column, IUnknown * * accessible) override; + // Gets accessible table cell (IAccessibleTable2 version). + STDMETHOD(get_cellAt)(long row, long column, IUnknown * * cell) override; + // Gets accessible table caption. STDMETHOD(get_caption)(IUnknown * * accessible) override; @@ -111,9 +116,11 @@ public: STDMETHOD(get_rowHeader)(IAccessibleTable __RPC_FAR *__RPC_FAR *accessibleTable, long *startingColumnIndex) override; // Gets list of row indexes currently selected (0-based). + STDMETHOD(get_selectedRows)(long **rows, long * nRows) override; STDMETHOD(get_selectedRows)(long maxRows, long **rows, long * nRows) override; // Gets list of column indexes currently selected (0-based). + STDMETHOD(get_selectedColumns)(long **columns, long * numColumns) override; STDMETHOD(get_selectedColumns)(long maxColumns, long **columns, long * numColumns) override; // Gets accessible table summary. @@ -149,10 +156,15 @@ public: STDMETHOD(get_childIndex)(long rowIndex,long columnIndex, long * childIndex) override; + // get total number of selected cells STDMETHOD(get_nSelectedChildren)(long *childCount) override; + STDMETHOD(get_nSelectedCells)(long *childCount) override; STDMETHOD(get_selectedChildren)(long maxChildren, long **children, long *nChildren) override; + // Returns a list of accessibles currently selected + STDMETHOD(get_selectedCells)(IUnknown * * * cells, long *nSelectedCells) override; + STDMETHOD(get_rowColumnExtentsAtIndex)( long index, long *row, long *column, |