if (cols > 0) {
row = index / cols;
col = index % cols;
- QAccessibleTableCellInterface *cell = interface->tableInterface()->cellAt(row, col)->tableCellInterface();
- if (cell) {
- row = cell->rowIndex();
- col = cell->columnIndex();
- rowExtents = cell->rowExtent();
- colExtents = cell->columnExtent();
- isSelected = cell->isSelected();
+ QAccessibleInterface *cell = interface->tableInterface()->cellAt(row, col);
+ QAccessibleTableCellInterface *cellIface = cell ? cell->tableCellInterface() : nullptr;
+ if (cellIface) {
+ row = cellIface->rowIndex();
+ col = cellIface->columnIndex();
+ rowExtents = cellIface->rowExtent();
+ colExtents = cellIface->columnExtent();
+ isSelected = cellIface->isSelected();
success = true;
}
}
} else if (function == QLatin1String("GetColumnExtentAt")) {
int row = message.arguments().at(0).toInt();
int column = message.arguments().at(1).toInt();
- connection.send(message.createReply(interface->tableInterface()->cellAt(row, column)->tableCellInterface()->columnExtent()));
+ int columnExtent = 0;
+ QAccessibleInterface *cell = interface->tableInterface()->cellAt(row, column);
+ QAccessibleTableCellInterface *cellIface = cell ? cell->tableCellInterface() : nullptr;
+ if (cellIface)
+ columnExtent = cellIface->columnExtent();
+ connection.send(message.createReply(columnExtent));
} else if (function == QLatin1String("GetRowExtentAt")) {
int row = message.arguments().at(0).toInt();
int column = message.arguments().at(1).toInt();
- connection.send(message.createReply(interface->tableInterface()->cellAt(row, column)->tableCellInterface()->rowExtent()));
+ int rowExtent = 0;
+ QAccessibleInterface *cell = interface->tableInterface()->cellAt(row, column);
+ QAccessibleTableCellInterface *cellIface = cell ? cell->tableCellInterface() : nullptr;
+ if (cellIface)
+ rowExtent = cellIface->rowExtent();
+ connection.send(message.createReply(rowExtent));
} else if (function == QLatin1String("GetColumnHeader")) {
int column = message.arguments().at(0).toInt();
} else if (function == QLatin1String("IsSelected")) {
int row = message.arguments().at(0).toInt();
int column = message.arguments().at(1).toInt();
- QAccessibleTableCellInterface* cell = interface->tableInterface()->cellAt(row, column)->tableCellInterface();
- connection.send(message.createReply(cell->isSelected()));
+ bool isSelected = false;
+ QAccessibleInterface *cell = interface->tableInterface()->cellAt(row, column);
+ QAccessibleTableCellInterface *cellIface = cell ? cell->tableCellInterface() : nullptr;
+ if (cellIface)
+ isSelected = cellIface->isSelected();
+ connection.send(message.createReply(isSelected));
} else if (function == QLatin1String("AddColumnSelection")) {
int column = message.arguments().at(0).toInt();
connection.send(message.createReply(interface->tableInterface()->selectColumn(column)));