[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 13 05:53:47 UTC 2019


 vcl/unx/gtk/a11y/atkwrapper.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit a14036275e3fb1f9ef688b256b94bb9793e6558f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 4 09:40:35 2019 +0000
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Wed Nov 13 06:53:13 2019 +0100

    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 at ubuntu.com>

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 );
     }


More information about the Libreoffice-commits mailing list