diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-02-15 17:12:00 +0000 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-02-25 12:22:16 +0000 |
commit | b1bc16f5b342ac9c54201cfd30de3ea87bc20538 (patch) | |
tree | de8c33dd5cd75c139de9ae7903d78b5489b9cbba /accessibility | |
parent | 90ef7668265e7187d61842ec8950aa91770a53da (diff) |
Resolves: rhbz#895196 sc filter float a11y parent of itself loop/recurse
Change-Id: I3679e7cfcd32a78b40c6a7b803c92ff0abe6f32c
(cherry picked from commit 1b13c952f50aab2b907dab13395ab23d0955c238)
Reviewed-on: https://gerrit.libreoffice.org/2261
Reviewed-by: Eike Rathke <erack@redhat.com>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/helper/acc_factory.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx index dc16fe664992..93f6bf54912e 100644 --- a/accessibility/source/helper/acc_factory.cxx +++ b/accessibility/source/helper/acc_factory.cxx @@ -382,9 +382,11 @@ inline bool hasFloatingChild(Window *pWindow) } else if ( nType == WINDOW_BORDERWINDOW && hasFloatingChild( pWindow ) ) { - PopupMenuFloatingWindow* pChild = dynamic_cast<PopupMenuFloatingWindow*>( - pWindow->GetAccessibleChildWindow(0)); - if ( pChild && pChild->IsPopupMenu() ) + // The logic here has to match that of Window::GetAccessibleParentWindow in + // vcl/source/window/window.cxx to avoid PopupMenuFloatingWindow + // becoming a11y parents of themselves + Window* pChild = pWindow->GetAccessibleChildWindow(0); + if (PopupMenuFloatingWindow::isPopupMenu(pChild)) { // Get the accessible context from the child window. Reference<XAccessible> xAccessible = pChild->CreateAccessible(); |