Update ooo320-m1
[ooovba.git] / applied_patches / 0004-cws-koheidatapilot03-accessibility.diff
blob5b41a8dc65f4821209a7cec00307da40c9b418f3
1 diff --git accessibility/source/helper/acc_factory.cxx accessibility/source/helper/acc_factory.cxx
2 index aea02be..84c702a 100644
3 --- accessibility/source/helper/acc_factory.cxx
4 +++ accessibility/source/helper/acc_factory.cxx
5 @@ -72,6 +72,7 @@
6 #include <accessibility/extended/accessibleeditbrowseboxcell.hxx>
7 #include <vcl/lstbox.hxx>
8 #include <vcl/combobox.hxx>
9 +#include "vcl/popupmenuwindow.hxx"
11 #include <floatingwindowaccessible.hxx>
13 @@ -376,7 +377,17 @@ inline bool hasFloatingChild(Window *pWindow)
15 else if ( nType == WINDOW_BORDERWINDOW && hasFloatingChild( pWindow ) )
17 - xContext = new FloatingWindowAccessible( _pXWindow );
18 + PopupMenuFloatingWindow* pChild = dynamic_cast<PopupMenuFloatingWindow*>(
19 + pWindow->GetAccessibleChildWindow(0));
20 + if ( pChild && pChild->IsPopupMenu() )
21 + {
22 + // Get the accessible context from the child window.
23 + Reference<XAccessible> xAccessible = pChild->CreateAccessible();
24 + if (xAccessible.is())
25 + xContext = xAccessible->getAccessibleContext();
26 + }
27 + else
28 + xContext = new FloatingWindowAccessible( _pXWindow );
30 else if ( nType == WINDOW_HELPTEXTWINDOW )