libreoffice support started, still broken. Some updates to how wine-access gets called.

This commit is contained in:
Storm Dragon committed 2026-10-14 16:24:49 -04:00
1 parent 8e76d2341c
commit 7f78177786
26 files changed
+1173 -21

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
// Copyright (c) 2026 Storm Dragon
// Authors: Storm Dragon, Angus Kola
// SPDX-License-Identifier: GPL-3.0-or-later
package presentation
import (
"strings"
"git.stormux.org/storm/cthulhu/internal/atspi"
)
// Normalize only the presentation copy. Native names remain coordinates for
// ownership and diagnostics. Orca's soffice generator speaks contents first,
// then the coordinate; an empty Text value is a blank cell, not a missing name.
func libreOfficeFocusSnapshot(snapshot atspi.Snapshot, options Options) atspi.Snapshot {
context := snapshot.LibreOffice
if !atspi.IsLibreOfficeProcess(snapshot.ApplicationProcess) ||
context == nil || !context.InSpreadsheet {
return snapshot
}
if snapshot.Role == "table" {
// Orca omits table size for spreadsheets. These dimensions describe
// the sheet capacity, not the populated data.
snapshot.TableRowCount, snapshot.TableColumnCount = 0, 0
snapshot.Multiselectable, snapshot.SensitiveKnown = false, false
return snapshot
}
if context.CellEditor && snapshot.Role == "paragraph" {
snapshot.Role = ""
snapshot.SensitiveKnown = false
return snapshot
}
if snapshot.Role != "table cell" || !context.Cell {
return snapshot
}
snapshot.Name = strings.TrimSpace(context.CellText)
snapshot.Text = context.Coordinates
// Calc cell formatting in Orca omits container selection capabilities
// and insensitive-state chatter; these bits are not cell availability.
snapshot.Multiselectable = false
snapshot.SensitiveKnown = false
if reading_options(options).OnlySpeakDisplayedText {
snapshot.Text = ""
return snapshot
}
if snapshot.Name == "" {
snapshot.Name = "blank"
}
return snapshot
}