From 7e64aaebce8667f7ab173ea3807c62f81138b4af Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 2 May 2018 12:39:43 +0100 Subject: weld SvxTextAttrPage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit with a a11y rework to be more like the insert special char a11y also, route a11y questions about a custom widgets parent to the gtk toolkits underlying default implementation, keeping only questions about ourself to be handled by the XAccessible focus rectangles in RectCtl work again, seems that got lost somewhere along the way Change-Id: I62237d45668f4438aec6031cc5a48c38de21bf98 Reviewed-on: https://gerrit.libreoffice.org/53767 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/unx/gtk/a11y/atkwrapper.cxx | 13 ++++++++++++- vcl/unx/gtk/a11y/atkwrapper.hxx | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'vcl/unx/gtk/a11y') diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx index 33ec9caabb14..baae426bc6d1 100644 --- a/vcl/unx/gtk/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk/a11y/atkwrapper.cxx @@ -468,6 +468,11 @@ static gint wrapper_get_index_in_parent( AtkObject *atk_obj ) { AtkObjectWrapper *obj = ATK_OBJECT_WRAPPER (atk_obj); + + //if we're a native GtkDrawingArea with custom a11y, use the default toolkit index in parent + if (obj->mpOrig) + return atk_object_get_index_in_parent(obj->mpOrig); + gint i = -1; if( obj->mpContext.is() ) @@ -488,6 +493,11 @@ static AtkRelationSet * wrapper_ref_relation_set( AtkObject *atk_obj ) { AtkObjectWrapper *obj = ATK_OBJECT_WRAPPER (atk_obj); + + //if we're a native GtkDrawingArea with custom a11y, use the default toolkit relation set impl + if (obj->mpOrig) + return atk_object_ref_relation_set(obj->mpOrig); + AtkRelationSet *pSet = atk_relation_set_new(); if( obj->mpContext.is() ) @@ -797,7 +807,7 @@ atk_object_wrapper_ref( const uno::Reference< accessibility::XAccessible > &rxAc AtkObject * atk_object_wrapper_new( const css::uno::Reference< css::accessibility::XAccessible >& rxAccessible, - AtkObject* parent ) + AtkObject* parent, AtkObject* orig ) { g_return_val_if_fail( rxAccessible.get() != nullptr, nullptr ); @@ -818,6 +828,7 @@ atk_object_wrapper_new( const css::uno::Reference< css::accessibility::XAccessib pWrap->child_about_to_be_removed = nullptr; pWrap->mpContext = xContext; + pWrap->mpOrig = orig; AtkObject* atk_obj = ATK_OBJECT(pWrap); atk_obj->role = mapToAtkRole( xContext->getAccessibleRole() ); diff --git a/vcl/unx/gtk/a11y/atkwrapper.hxx b/vcl/unx/gtk/a11y/atkwrapper.hxx index e8ab83b5c778..0cb3f7b1c907 100644 --- a/vcl/unx/gtk/a11y/atkwrapper.hxx +++ b/vcl/unx/gtk/a11y/atkwrapper.hxx @@ -43,6 +43,7 @@ namespace com { namespace sun { namespace star { namespace accessibility { struct AtkObjectWrapper { AtkObject aParent; + AtkObject* mpOrig; //if we're a GtkDrawingArea acting as a custom LibreOffice widget, this is the toolkit default impl css::uno::Reference mpAccessible; css::uno::Reference mpContext; @@ -79,7 +80,7 @@ AtkObject * atk_object_wrapper_ref( AtkObject * atk_object_wrapper_new( const css::uno::Reference< css::accessibility::XAccessible >& rxAccessible, - AtkObject* parent = nullptr ); + AtkObject* parent = nullptr, AtkObject* orig = nullptr ); void atk_object_wrapper_add_child(AtkObjectWrapper* wrapper, AtkObject *child, gint index); void atk_object_wrapper_remove_child(AtkObjectWrapper* wrapper, AtkObject *child, gint index); -- cgit v1.2.3