diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-08-05 06:55:20 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-08-05 13:21:35 +0200 |
commit | c48742e5d13fd9c8edddcf5198344e9eba651fbf (patch) | |
tree | d8e4defa12fd1147e3f0ee23b5f35d77a7e10f89 /winaccessibility | |
parent | f5156b9e452a81e2daa4ecc67b5533c6911f77ec (diff) |
wina11y: Implement IAccessibleTableCell:get_rowColumnExtents
The doc says [1]:
> Gets the row and column indexes and extents of this cell accessible and
> whether or not it is selected.
>
> This is a convenience function. It is not mandatory to implement it.
Just use the existing methods to retrieve the information.
[1] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible_table_cell.html#a686348f0b7ecae19d4be5d7ef37ff201
Change-Id: If009c3913e6e837317255266251bd7696d423118
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137845
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/source/UAccCOM/AccTableCell.cxx | 23 | ||||
-rw-r--r-- | winaccessibility/source/UAccCOM/AccTableCell.h | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/winaccessibility/source/UAccCOM/AccTableCell.cxx b/winaccessibility/source/UAccCOM/AccTableCell.cxx index 90c450735008..b8db728009ea 100644 --- a/winaccessibility/source/UAccCOM/AccTableCell.cxx +++ b/winaccessibility/source/UAccCOM/AccTableCell.cxx @@ -183,4 +183,27 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTableCell::get_isSelected(boolean* pIsSele } } +COM_DECLSPEC_NOTHROW STDMETHODIMP CAccTableCell::get_rowColumnExtents(long* pRow, long* pColumn, + long* pRowExtents, + long* pColumnExtents, + boolean* pIsSelected) +{ + SolarMutexGuard g; + + if (!pRow || !pColumn || !pRowExtents || !pColumnExtents || !pIsSelected) + return E_INVALIDARG; + + if (get_rowIndex(pRow) != S_OK) + return E_FAIL; + if (get_columnIndex(pColumn) != S_OK) + return E_FAIL; + if (get_rowExtent(pRowExtents) != S_OK) + return E_FAIL; + if (get_columnExtent(pColumnExtents) != S_OK) + return E_FAIL; + if (get_isSelected(pIsSelected) != S_OK) + return E_FAIL; + return S_OK; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/winaccessibility/source/UAccCOM/AccTableCell.h b/winaccessibility/source/UAccCOM/AccTableCell.h index 2c7d1a79aeb6..914794a04f66 100644 --- a/winaccessibility/source/UAccCOM/AccTableCell.h +++ b/winaccessibility/source/UAccCOM/AccTableCell.h @@ -76,7 +76,7 @@ public: STDMETHOD(get_rowHeaderCells)(IUnknown***, long*) override { return E_FAIL; } STDMETHOD(get_rowIndex)(long*) override; STDMETHOD(get_isSelected)(boolean*) override; - STDMETHOD(get_rowColumnExtents)(long*, long*, long*, long*, boolean*) { return E_FAIL; } + STDMETHOD(get_rowColumnExtents)(long*, long*, long*, long*, boolean*) override; STDMETHOD(get_table)(IUnknown**) { return E_FAIL; } private: |