summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-04 09:40:35 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2019-11-13 06:53:13 +0100
commita14036275e3fb1f9ef688b256b94bb9793e6558f (patch)
tree01128dce8484ee9476d42a4f2b6b68c39d38fd2f /vcl
parent881d176ec8baa2f00aa78236912db5fe346445f7 (diff)
survive missing atk_object_set_accessible_id symbol
Change-Id: If18380dfe3ab17a4584602869928b3ff50fc15d6 Reviewed-on: https://gerrit.libreoffice.org/81988 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 63b4cfa04430..d373b580447a 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -66,6 +66,7 @@
#include "atklistener.hxx"
#include "atktextattributes.hxx"
+#include <dlfcn.h>
#include <string.h>
#include <vector>
@@ -881,16 +882,16 @@ atk_object_wrapper_new( const css::uno::Reference< css::accessibility::XAccessib
OSL_ASSERT( false );
}
-#if ATK_CHECK_VERSION(2,33,1)
+ static auto func = reinterpret_cast<void(*)(AtkObject*, const gchar*)>(dlsym(nullptr, "atk_object_set_accessible_id"));
+ if (func)
{
css::uno::Reference<css::accessibility::XAccessibleContext2> xContext2(xContext, css::uno::UNO_QUERY);
if( xContext2.is() )
{
OString aId = OUStringToOString( xContext2->getAccessibleId(), RTL_TEXTENCODING_UTF8);
- atk_object_set_accessible_id(atk_obj, aId.getStr());
+ (*func)(atk_obj, aId.getStr());
}
}
-#endif
return ATK_OBJECT( pWrap );
}