More work on LibreOffice support.
This commit is contained in:
1 parent
e0c8c6198c
commit
4ac59d4ced
25 files changed
+392
-57
No files matched your search
@@ -120,6 +120,9 @@ func captureLibreOfficeContext(source *C.AtspiAccessible, snapshot *Snapshot) {
|
||||
grandparentRole == C.ATSPI_ROLE_DOCUMENT_SPREADSHEET
|
||||
if context.Cell {
|
||||
context.Coordinates = snapshot.Name
|
||||
// Orca requests uncached attributes: editing can replace a formula
|
||||
// without replacing the accessible cell.
|
||||
C.atspi_accessible_clear_cache_single(source)
|
||||
attributes := C.atspi_accessible_get_attributes(source, nil)
|
||||
if attributes != nil {
|
||||
columnKey, rowKey := C.CString("colindextext"), C.CString("rowindextext")
|
||||
@@ -130,6 +133,16 @@ func captureLibreOfficeContext(source *C.AtspiAccessible, snapshot *Snapshot) {
|
||||
if column != "" && row != "" {
|
||||
context.Coordinates = sanitizeSnapshotField(column + row)
|
||||
}
|
||||
// Current providers use lowercase; Orca also accepts Formula.
|
||||
for _, key := range []string{"formula", "Formula"} {
|
||||
name := C.CString(key)
|
||||
value := C.g_hash_table_lookup(attributes, C.gconstpointer(name))
|
||||
C.free(unsafe.Pointer(name))
|
||||
if value != nil {
|
||||
context.Formula = sanitizeLibreOfficeFormula(C.GoString((*C.gchar)(value)))
|
||||
break
|
||||
}
|
||||
}
|
||||
C.g_hash_table_unref(attributes)
|
||||
}
|
||||
text := C.atspi_accessible_get_text_iface(source)
|
||||
|
||||
Reference in new issue
Block a user