diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk4/a11y.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk4/gtkaccessibletext.cxx | 22 | ||||
-rw-r--r-- | vcl/unx/gtk4/gtkaccessibletext.hxx | 2 |
3 files changed, 23 insertions, 3 deletions
diff --git a/vcl/unx/gtk4/a11y.cxx b/vcl/unx/gtk4/a11y.cxx index 41e49bf2845b..bfb6e38b0038 100644 --- a/vcl/unx/gtk4/a11y.cxx +++ b/vcl/unx/gtk4/a11y.cxx @@ -411,7 +411,7 @@ const struct GetGIfaceType const aGetGIfaceType; const css::uno::Type& (*aGetUnoType)(); } TYPE_TABLE[] = { -#if GTK_CHECK_VERSION(4, 13, 8) +#if GTK_CHECK_VERSION(4, 14, 0) { "Text", reinterpret_cast<GInterfaceInitFunc>(lo_accessible_text_init), gtk_accessible_text_get_type, cppu::UnoType<css::accessibility::XAccessibleText>::get }, #endif diff --git a/vcl/unx/gtk4/gtkaccessibletext.cxx b/vcl/unx/gtk4/gtkaccessibletext.cxx index 4d7853c054d4..51091e735327 100644 --- a/vcl/unx/gtk4/gtkaccessibletext.cxx +++ b/vcl/unx/gtk4/gtkaccessibletext.cxx @@ -19,7 +19,7 @@ #include "a11y.hxx" #include "gtkaccessibletext.hxx" -#if GTK_CHECK_VERSION(4, 13, 8) +#if GTK_CHECK_VERSION(4, 14, 0) namespace { @@ -202,6 +202,25 @@ static gboolean lo_accessible_text_get_attributes(GtkAccessibleText* self, unsig return true; } +static void lo_accessible_text_get_default_attributes(GtkAccessibleText* self, + char*** attribute_names, + char*** attribute_values) +{ + css::uno::Reference<css::accessibility::XAccessibleText> xText = getXText(self); + if (!xText.is()) + return; + + css::uno::Reference<css::accessibility::XAccessibleTextAttributes> xAttributes( + xText, com::sun::star::uno::UNO_QUERY); + if (!xAttributes.is()) + return; + + css::uno::Sequence<css::beans::PropertyValue> aAttribs + = xAttributes->getDefaultAttributes(css::uno::Sequence<OUString>()); + + convertUnoTextAttributesToGtk(aAttribs, attribute_names, attribute_values); +} + void lo_accessible_text_init(GtkAccessibleTextInterface* iface) { iface->get_contents = lo_accessible_text_get_contents; @@ -209,6 +228,7 @@ void lo_accessible_text_init(GtkAccessibleTextInterface* iface) iface->get_caret_position = lo_accessible_text_get_caret_position; iface->get_selection = lo_accessible_text_get_selection; iface->get_attributes = lo_accessible_text_get_attributes; + iface->get_default_attributes = lo_accessible_text_get_default_attributes; } #endif diff --git a/vcl/unx/gtk4/gtkaccessibletext.hxx b/vcl/unx/gtk4/gtkaccessibletext.hxx index 3e8a08db0d73..82acc7db418f 100644 --- a/vcl/unx/gtk4/gtkaccessibletext.hxx +++ b/vcl/unx/gtk4/gtkaccessibletext.hxx @@ -11,7 +11,7 @@ #include <gtk/gtk.h> -#if GTK_CHECK_VERSION(4, 13, 8) +#if GTK_CHECK_VERSION(4, 14, 0) void lo_accessible_text_init(GtkAccessibleTextInterface* iface); |