[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Nov 4 10:53:39 UTC 2019


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

New commits:
commit aedd2198ee2d9a12eeacf15f6bdf3a0c5a4e267c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 4 09:40:35 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Nov 4 11:52:59 2019 +0100

    survive missing atk_object_set_accessible_id symbol
    
    Change-Id: If18380dfe3ab17a4584602869928b3ff50fc15d6
    Reviewed-on: https://gerrit.libreoffice.org/81987
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx b/vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx
index 15e2b2af08a9..ab011d9d0925 100644
--- a/vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx
+++ b/vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx
@@ -50,6 +50,7 @@
 #include "atktextattributes.hxx"
 
 #include <vector>
+#include <dlfcn.h>
 
 using namespace ::com::sun::star;
 
@@ -862,16 +863,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