winaccessibility/source/UAccCOM/AccTableCell.cxx | 23 +++++++++++++++++++++++ winaccessibility/source/UAccCOM/AccTableCell.h | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-)
New commits: commit c48742e5d13fd9c8edddcf5198344e9eba651fbf Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Aug 5 06:55:20 2022 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Aug 5 13:21:35 2022 +0200 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.wegh...@posteo.de> 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: