[orca] Retrieve cell coords from TableCell interface when available
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Retrieve cell coords from TableCell interface when available
- Date: Fri, 2 Sep 2022 10:47:07 +0000 (UTC)
commit cb105d4d21c09d3e832273b493a407e8b48887fb
Author: Michael Weghorn <m weghorn posteo de>
Date: Fri Sep 2 10:47:06 2022 +0000
Retrieve cell coords from TableCell interface when available
src/orca/script_utilities.py | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index c603890fb..927be2d80 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -4561,6 +4561,12 @@ class Utilities:
cell = pyatspi.findAncestor(obj, lambda x: x and x.getRole() in roles)
return self.coordinatesForCell(cell, preferAttribute, False)
+ if 'TableCell' in pyatspi.listInterfaces(obj):
+ tableCell = obj.queryTableCell()
+ successful, row, col = tableCell.position
+ if successful:
+ return row, col
+
isTable = lambda x: x and 'Table' in pyatspi.listInterfaces(x)
parent = pyatspi.findAncestor(obj, isTable)
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]