gtk4 a11y: Use existing a11y attr name constants

Use the existing string constant as they are available
since previous commit

    Change-Id: I78e783df2b47bc8af54fbad570cb0aeb0b6a8629
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Mar 5 18:06:22 2026 +0100

        tdf#171086 a11y: Move "{row,col}indextext" strings to vcl header

Change-Id: I1d8732ec2b3816dc0504e5b048248558b60fe1a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201066
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2026-03-06 07:20:03 +01:00
parent 43bf1cab57
commit 8a8439d088
+4 -2
View File
@@ -16,6 +16,8 @@
#include <com/sun/star/accessibility/XAccessibleText.hpp>
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
#include <comphelper/OAccessible.hxx>
#include <vcl/accessibility/AccessibleAttribute.hxx>
#include <unx/gtk/gtkframe.hxx>
#include <gtk/gtk.h>
#include <o3tl/string_view.hxx>
@@ -343,7 +345,7 @@ static void applyObjectAttribute(GtkAccessible* pGtkAccessible, std::u16string_v
{
assert(pGtkAccessible);
if (rName == u"colindextext")
if (rName == AccessibleAttribute::ColIndexText)
{
gtk_accessible_update_relation(pGtkAccessible, GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT,
rValue.toUtf8().getStr(), -1);
@@ -353,7 +355,7 @@ static void applyObjectAttribute(GtkAccessible* pGtkAccessible, std::u16string_v
const int nLevel = o3tl::toInt32(rValue);
gtk_accessible_update_property(pGtkAccessible, GTK_ACCESSIBLE_PROPERTY_LEVEL, nLevel, -1);
}
else if (rName == u"rowindextext")
else if (rName == AccessibleAttribute::RowIndexText)
{
gtk_accessible_update_relation(pGtkAccessible, GTK_ACCESSIBLE_RELATION_ROW_INDEX_TEXT,
rValue.toUtf8().getStr(), -1);