diff options
author | Kohei Yoshida <kohei@openoffice.org> | 2009-08-20 13:52:04 +0000 |
---|---|---|
committer | Kohei Yoshida <kohei@openoffice.org> | 2009-08-20 13:52:04 +0000 |
commit | b30732a7e8691804e9b0a0f4d10dd1e9054983fc (patch) | |
tree | 8dda70aa7a1d2d6d2dcf0a60571801a8d745ec43 /accessibility/source/helper | |
parent | 248062948617ccf78e13254b78017f3eeb102582 (diff) |
When creating an accessible object for a border window, create one from the child window instance unless it's a menu popup.
Diffstat (limited to 'accessibility/source/helper')
-rw-r--r-- | accessibility/source/helper/acc_factory.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx index 5c8b742db53c..ba36bef7f065 100644 --- a/accessibility/source/helper/acc_factory.cxx +++ b/accessibility/source/helper/acc_factory.cxx @@ -376,7 +376,18 @@ inline bool hasFloatingChild(Window *pWindow) } else if ( nType == WINDOW_BORDERWINDOW && hasFloatingChild( pWindow ) ) { - xContext = new FloatingWindowAccessible( _pXWindow ); + // TODO: better way to handle this? + Window* pChild = pWindow->GetAccessibleChildWindow(0); + if ( pChild->IsMenuFloatingWindow() ) + // Menu popup window handles accessibility differently. + xContext = new FloatingWindowAccessible( _pXWindow ); + else + { + // Get the accessible context from the child window. + Reference<XAccessible> xAccessible = pChild->CreateAccessible(); + if (xAccessible.is()) + xContext = xAccessible->getAccessibleContext(); + } } else if ( nType == WINDOW_HELPTEXTWINDOW ) { |