Skip to content

Commit 7615c8e

Browse files
Merge e3f6f8b into 20d5a25
2 parents 20d5a25 + e3f6f8b commit 7615c8e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/appModules/soffice.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,16 @@ def announceSelectionChange(self):
208208

209209
def _get_cellCoordsText(self):
210210
if self.hasSelection and controlTypes.State.FOCUSED in self.states:
211+
count = self.table.IAccessibleTable2Object.nSelectedCells
212+
if count == self.table.childCount:
213+
return _('all cells')
214+
215+
if count > 2000:
216+
# only report number of cells, retrieving a11y objects for all cells
217+
# by calling IAccessibleTable2's 'reportedCells' method may take a long time
218+
print('too many cells selected: {}'.format(count))
219+
return _('{count} cells').format(count=count)
220+
211221
selected, count = self.table.IAccessibleTable2Object.selectedCells
212222
firstAccessible = selected[0].QueryInterface(IA2.IAccessible2)
213223
firstAddress = firstAccessible.accName(0)

0 commit comments

Comments
 (0)