vcl/unx/gtk3/a11y/atkwrapper.cxx | 44 ++++++++++----------------------------- 1 file changed, 12 insertions(+), 32 deletions(-)
New commits: commit 5f15f953f34eef1e165af4f935fab6533fd49bc6 Author: Michael Weghorn <[email protected]> AuthorDate: Fri Jun 27 10:33:26 2025 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Jun 27 12:35:29 2025 +0200 gtk3 a11y: Map DESCRIBED_BY relation This is used e.g. by the presentation title in Impress. This now causes the relation type to be reported on the AT-SPI level as expected when using the gtk3 VCL plugin, in the same way it is for the qt6 VCL plugin. Sample query with the presentation title object in an Impress slide selected in Accerciser: In [10]: acc.get_relation_set()[0].get_relation_type() Out[10]: <RelationType.DESCRIBED_BY: 18> Without this commit in place: In [9]: acc.get_relation_set()[0].get_relation_type() Out[9]: <RelationType.EXTENDED: 9> Change-Id: Id1dda799b0bdce74f9900673c1015fa9b6a6e5db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187085 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx index 3e72ff4a3cfe..c3845861d19e 100644 --- a/vcl/unx/gtk3/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx @@ -75,6 +75,8 @@ static AtkRelationType mapRelationType(accessibility::AccessibleRelationType eRe return ATK_RELATION_CONTROLLED_BY; case accessibility::AccessibleRelationType_CONTROLLER_FOR: return ATK_RELATION_CONTROLLER_FOR; + case accessibility::AccessibleRelationType_DESCRIBED_BY: + return ATK_RELATION_DESCRIBED_BY; case accessibility::AccessibleRelationType_LABEL_FOR: return ATK_RELATION_LABEL_FOR; case accessibility::AccessibleRelationType_LABELED_BY: commit eb54306ec6bc1004b117e4b63c34068fb7a37aa7 Author: Michael Weghorn <[email protected]> AuthorDate: Fri Jun 27 10:23:02 2025 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Jun 27 12:35:23 2025 +0200 gtk3 a11y: Return mapped relation type right away Change-Id: I70439eb23041c36f35e079d4fea3d2b0c76cf026 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187084 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx index 34c1c2f0fdab..3e72ff4a3cfe 100644 --- a/vcl/unx/gtk3/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx @@ -65,51 +65,29 @@ static GObjectClass *parent_class = nullptr; static AtkRelationType mapRelationType(accessibility::AccessibleRelationType eRelation) { - AtkRelationType type = ATK_RELATION_NULL; - switch (eRelation) { case accessibility::AccessibleRelationType_CONTENT_FLOWS_FROM: - type = ATK_RELATION_FLOWS_FROM; - break; - + return ATK_RELATION_FLOWS_FROM; case accessibility::AccessibleRelationType_CONTENT_FLOWS_TO: - type = ATK_RELATION_FLOWS_TO; - break; - + return ATK_RELATION_FLOWS_TO; case accessibility::AccessibleRelationType_CONTROLLED_BY: - type = ATK_RELATION_CONTROLLED_BY; - break; - + return ATK_RELATION_CONTROLLED_BY; case accessibility::AccessibleRelationType_CONTROLLER_FOR: - type = ATK_RELATION_CONTROLLER_FOR; - break; - + return ATK_RELATION_CONTROLLER_FOR; case accessibility::AccessibleRelationType_LABEL_FOR: - type = ATK_RELATION_LABEL_FOR; - break; - + return ATK_RELATION_LABEL_FOR; case accessibility::AccessibleRelationType_LABELED_BY: - type = ATK_RELATION_LABELLED_BY; - break; - + return ATK_RELATION_LABELLED_BY; case accessibility::AccessibleRelationType_MEMBER_OF: - type = ATK_RELATION_MEMBER_OF; - break; - + return ATK_RELATION_MEMBER_OF; case accessibility::AccessibleRelationType_SUB_WINDOW_OF: - type = ATK_RELATION_SUBWINDOW_OF; - break; - + return ATK_RELATION_SUBWINDOW_OF; case accessibility::AccessibleRelationType_NODE_CHILD_OF: - type = ATK_RELATION_NODE_CHILD_OF; - break; - + return ATK_RELATION_NODE_CHILD_OF; default: - break; + return ATK_RELATION_NULL; } - - return type; } AtkStateType mapAtkState( sal_Int64 nState )
