diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-05-30 07:55:54 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-05-30 07:55:54 +0000 |
commit | f68c66feb6b4c3154cb135e0097251fd99f864a4 (patch) | |
tree | 2fc4d9c4908b3f62b1ada6f38909b959c56859ae | |
parent | 3bd450291fe9d5aaa7437ffade2ca5095d8e1d6e (diff) |
INTEGRATION: CWS uaa06 (1.5.20); FILE MERGED
2008/05/08 12:39:09 obr 1.5.20.1: #i87426# repaired broken a11y hierarchy of a number of dialogs
-rw-r--r-- | vcl/unx/gtk/a11y/atkfactory.cxx | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/vcl/unx/gtk/a11y/atkfactory.cxx b/vcl/unx/gtk/a11y/atkfactory.cxx index 474d286036f4..530a11b03681 100644 --- a/vcl/unx/gtk/a11y/atkfactory.cxx +++ b/vcl/unx/gtk/a11y/atkfactory.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: atkfactory.cxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.6 $ * * This file is part of OpenOffice.org. * @@ -113,9 +113,9 @@ wrapper_factory_get_accessible_type(void) } static AtkObject* -wrapper_factory_create_accessible( GObject *pObj ) +wrapper_factory_create_accessible( GObject *obj ) { - GtkWidget* parent_widget = gtk_widget_get_parent( GTK_WIDGET( pObj ) ); + GtkWidget* parent_widget = gtk_widget_get_parent( GTK_WIDGET( obj ) ); // gail_container_real_remove_gtk tries to re-instanciate an accessible // for a widget that is about to vanish .. @@ -125,27 +125,18 @@ wrapper_factory_create_accessible( GObject *pObj ) GtkSalFrame* pFrame = GtkSalFrame::getFromWindow( GTK_WINDOW( parent_widget ) ); g_return_val_if_fail( pFrame != NULL, NULL ); - /* HACK: if the parent gtk window has an accessible already assigned, use - * this one to avoid endless recursion (see atkwindow.cxx). - */ - AtkObject* parent_accessible = (AtkObject *) g_object_get_data(G_OBJECT( parent_widget ), - "ooo:tooltip-accessible"); - - if( ! parent_accessible ) - parent_accessible = gtk_widget_get_accessible(parent_widget); - Window* pFrameWindow = pFrame->GetWindow(); if( pFrameWindow ) { - /* as we got the frame object from the gtk parent, the corresponding - * accessible is always the (only) child of the window associated - * with the frame. - */ + Window* pWindow = pFrameWindow; + + // skip accessible objects already exposed by the frame objects + if( WINDOW_BORDERWINDOW == pWindow->GetType() ) + pWindow = pFrameWindow->GetAccessibleChildWindow(0); - Window* pWindow = pFrameWindow->GetAccessibleChildWindow(0); if( pWindow ) { - uno::Reference< accessibility::XAccessible > xAccessible(pWindow->GetAccessible(true)); + uno::Reference< accessibility::XAccessible > xAccessible = pWindow->GetAccessible(true); if( xAccessible.is() ) { AtkObject *accessible = ooo_wrapper_registry_get( xAccessible ); @@ -153,7 +144,7 @@ wrapper_factory_create_accessible( GObject *pObj ) if( accessible ) g_object_ref( G_OBJECT(accessible) ); else - accessible = atk_object_wrapper_new( xAccessible, parent_accessible ); + accessible = atk_object_wrapper_new( xAccessible, gtk_widget_get_accessible(parent_widget) ); return accessible; } |