accessibility/inc/extended/accessiblelistbox.hxx    |    1 -
 accessibility/source/extended/accessiblelistbox.cxx |   19 -------------------
 svtools/source/uno/popupwindowcontroller.cxx        |    1 +
 3 files changed, 1 insertion(+), 20 deletions(-)

New commits:
commit e8028cbc11661effbb38ecb6146b9a9557b650da
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Aug 17 14:12:56 2023 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Aug 18 06:05:40 2023 +0200

    tdf#156561 svtools, a11y: Return created popup win for focus handling
    
    Actually return the popup window created in
    `PopupWindowController::createPopupWindow` instead of just
    an empty reference.
    
    With this in place, the popup window is initially announced
    by NVDA on Windows for the "Borders" toolbar item when expanded
    even after reverting
    
        commit dc0706cabfe39ddb6ea23d60ccfb756f2b9e6efb
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Wed Mar 15 17:00:27 2023 +0100
    
            tdf#140762 tdf#152671 Make dock win visible before showing popup
    
    , because the focus event is now sent when focus is
    set via `XWindow::setFocus` in
    `framework::ToolBarManager::OnDropdownClick`
    (s. frame 41 below), while the above commit previously
    ensured that the window was already visible earlier and
    thus the corresponding event would be
    sent earlier already.
    Related backtrace for the winaccessibility case:
    
        1  AccObjectWinManager::NotifyAccEvent               
AccObjectWinManager.cxx               185  0x7fffaac46118
        2  AccComponentEventListener::FireStateFocusedChange 
AccComponentEventListener.cxx         308  0x7fffaac4fddb
        3  AccComponentEventListener::SetComponentState      
AccComponentEventListener.cxx         171  0x7fffaac50c14
        4  AccEventListener::HandleStateChangedEvent         
AccEventListener.cxx                  166  0x7fffaac4ea44
        5  AccEventListener::notifyEvent                     
AccEventListener.cxx                  72   0x7fffaac4faaa
        6  AccComponentEventListener::notifyEvent            
AccComponentEventListener.cxx         82   0x7fffaac5123c
        7  AccDescendantManagerEventListener::notifyEvent    
AccDescendantManagerEventListener.cxx 70   0x7fffaac56686
        8  AccListEventListener::notifyEvent                 
AccListEventListener.cxx              66   0x7fffaac56ca2
        9  ValueSetAcc::FireAccessibleEvent                  valueacc.cxx       
                   430  0x7fffbad4578d
        10 ValueSetAcc::GetFocus                             valueacc.cxx       
                   452  0x7fffbad458ed
        11 ValueSet::GetFocus                                valueset.cxx       
                   271  0x7fffbad4f6b8
        12 weld::CustomWeld::DoGetFocus                      customweld.cxx     
                   72   0x7fffaf12b2ed
        13 weld::CustomWeld::LinkStubDoGetFocus              customweld.cxx     
                   72   0x7fffaf12b726
        14 Link<weld::Widget &,void>::Call                   link.hxx           
                   111  0x7fffaf16be63
        15 SalInstanceWidget::HandleEventListener            salvtables.cxx     
                   736  0x7fffaf16f436
        16 SalInstanceDrawingArea::HandleEventListener       salvtables.cxx     
                   6167 0x7fffaf16f3c7
        17 SalInstanceWidget::EventListener                  salvtables.cxx     
                   824  0x7fffaf16e805
        18 SalInstanceWidget::LinkStubEventListener          salvtables.cxx     
                   821  0x7fffaf170b86
        19 Link<VclWindowEvent &,void>::Call                 link.hxx           
                   111  0x7fffaea625c3
        20 vcl::Window::CallEventListeners                   event.cxx          
                   263  0x7fffaea62970
        21 vcl::Window::PreNotify                            event.cxx          
                   71   0x7fffaea649a3
        22 vcl::Window::CompatPreNotify                      window.cxx         
                   3921 0x7fffaeb730e8
        23 ImplCallPreNotify                                 winproc.cxx        
                   70   0x7fffaeb8eb00
        24 vcl::Window::ImplGrabFocus                        mouse.cxx          
                   383  0x7fffaeacff8c
        25 vcl::Window::ImplControlFocus                     dlgctrl.cxx        
                   560  0x7fffaea391b6
        26 vcl::Window::EventNotify                          event.cxx          
                   210  0x7fffaea633a5
        27 DockingWindow::EventNotify                        dockwin.cxx        
                   528  0x7fffaea58d21
        28 vcl::Window::CompatNotify                         window.cxx         
                   3929 0x7fffaeb73058
        29 vcl::Window::GetFocus                             window.cxx         
                   1852 0x7fffaeb75e94
        30 InterimToolbarPopup::GetFocus                     toolbarmenu.cxx    
                   187  0x7fffbad41eed
        31 vcl::Window::CompatGetFocus                       window.cxx         
                   3889 0x7fffaeb72f3d
        32 vcl::Window::ImplGrabFocus                        mouse.cxx          
                   385  0x7fffaeacffde
        33 vcl::Window::GrabFocus                            window.cxx         
                   2980 0x7fffaeb770ee
        34 vcl::Window::ImplGrabFocus                        mouse.cxx          
                   223  0x7fffaeacf4bb
        35 vcl::Window::GrabFocus                            window.cxx         
                   2980 0x7fffaeb770ee
        36 FloatingWindow::StartPopupMode                    floatwin.cxx       
                   845  0x7fffaea6dd90
        37 FloatingWindow::StartPopupMode                    floatwin.cxx       
                   880  0x7fffaea6e076
        38 ImplDockingWindowWrapper::StartPopupMode          dockmgr.cxx        
                   840  0x7fffaea543ae
        39 DockingManager::StartPopupMode                    dockmgr.cxx        
                   349  0x7fffaea54131
        40 svt::PopupWindowController::createPopupWindow     
popupwindowcontroller.cxx             240  0x7fffbae3648a
        41 framework::ToolBarManager::OnDropdownClick        toolbarmanager.cxx 
                   1772 0x7fffbc461a0c
        42 framework::ToolBarManager::DropdownClick          toolbarmanager.cxx 
                   1752 0x7fffbc45c4d3
        43 framework::ToolBarManager::LinkStubDropdownClick  toolbarmanager.cxx 
                   1749 0x7fffbc460026
        44 Link<ToolBox *,void>::Call                        link.hxx           
                   111  0x7fffaeb33e23
        45 ToolBox::ImplOpenItem                             toolbox.cxx        
                   4270 0x7fffaeb5277c
        46 ToolBox::KeyInput                                 toolbox.cxx        
                   4415 0x7fffaeb5357b
        47 ImplHandleKey                                     winproc.cxx        
                   1212 0x7fffaeb90b5e
        48 ImplWindowFrameProc                               winproc.cxx        
                   2724 0x7fffaeb9793e
        49 SalFrame::CallCallback                            salframe.hxx       
                   310  0x7fffae93a3f6
        50 ImplHandleKeyMsg                                  salframe.cxx       
                   3752 0x7fffab04568b
        51 SalFrameWndProc                                   salframe.cxx       
                   5723 0x7fffab04c689
        52 SalFrameWndProcW                                  salframe.cxx       
                   6043 0x7fffab04d360
        53 CallWindowProcW                                   USER32             
                        0x7ff8126be858
        54 DispatchMessageW                                  USER32             
                        0x7ff8126be299
        55 ImplSalDispatchMessage                            salinst.cxx        
                   474  0x7fffaafa01d8
        56 ImplSalYield                                      salinst.cxx        
                   551  0x7fffaafa08fd
        57 WinSalInstance::DoYield                           salinst.cxx        
                   580  0x7fffaaf9fe01
        58 ImplYield                                         svapp.cxx          
                   352  0x7fffaf1d513d
        59 Application::Yield                                svapp.cxx          
                   437  0x7fffaf1d9092
        60 Application::Execute                              svapp.cxx          
                   330  0x7fffaf1d247a
        61 desktop::Desktop::Main                            app.cxx            
                   1601 0x7fffbd5c96b2
        62 ImplSVMain                                        svmain.cxx         
                   204  0x7fffaf1ea8bc
        63 SVMain                                            svmain.cxx         
                   237  0x7fffaf1eb122
        64 soffice_main                                      sofficemain.cxx    
                   94   0x7fffbd618222
        65 sal_main                                          main.c             
                   51   0x7ff6751e1013
        66 main                                              main.c             
                   49   0x7ff6751e105a
        67 invoke_main                                       exe_common.inl     
                   79   0x7ff6751e1459
        68 __scrt_common_main_seh                            exe_common.inl     
                   288  0x7ff6751e137e
        69 __scrt_common_main                                exe_common.inl     
                   331  0x7ff6751e123e
        70 mainCRTStartup                                    exe_main.cpp       
                   17   0x7ff6751e14ce
        71 BaseThreadInitThunk                               KERNEL32           
                        0x7ff810cd7614
        72 RtlUserThreadStart                                ntdll              
                        0x7ff8128e26b1
    
    With this and all the previous tdf#156561-related commits, the
    above mentioned commit is no longer necessary for
    NVDA to announce the auto filter popup in Calc (tdf#152671)
    and many toolbar popups like the "Boders" toolbar item in
    Calc (tdf#140762) and will therefore be reverted in a
    follow-up commit.
    
    Change-Id: Ifbe27de01739103d1da04951475db32aa50d429d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155802
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/svtools/source/uno/popupwindowcontroller.cxx 
b/svtools/source/uno/popupwindowcontroller.cxx
index 41c8510c5f04..63326fcf570a 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -238,6 +238,7 @@ Reference< awt::XWindow > SAL_CALL 
PopupWindowController::createPopupWindow()
             pWin->EnableDocking();
             mxImpl->SetPopupWindow(pWin,pToolBox);
             vcl::Window::GetDockingManager()->StartPopupMode( pToolBox, pWin, 
eFloatFlags );
+            return VCLUnoHelper::GetInterface(pWin.get());
         }
     }
     return Reference< awt::XWindow >();
commit 581427c2d62f6bde5b843a1f89fea1914583b96a
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Aug 17 13:38:45 2023 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Aug 18 06:05:32 2023 +0200

    tdf#156561 a11y: Don't ignore child events in AccessibleListBox
    
    Don't ignore the `WindowShow` and `WindowHide` child events
    in `AccessibleListBox::ProcessWindowChildEvent`, but let the
    base class implemenation handle them just like all other
    child events.
    
    This causes them to be forwarded as `AccessibleEventId::CHILD`
    events to the a11y layer, which e.g. triggers registering
    a11y event listeners for newly created/shown child objects
    in winaccessibility.
    
    This makes the announcement of sub menu entries in Calc's auto
    filter work even after reverting
    
            commit dc0706cabfe39ddb6ea23d60ccfb756f2b9e6efb
            Author: Michael Weghorn <m.wegh...@posteo.de>
            Date:   Wed Mar 15 17:00:27 2023 +0100
    
                tdf#140762 tdf#152671 Make dock win visible before showing popup
    
    , which will be done in a follow-up commit.
    
    `AccessibleListBox` is the a11y class used for
    tree views in the non-gtk case (i.e. `SalInstanceTreeView`).
    A tree view is passed as the parent of the sub menus in
    the autofilter popup (s. `ScCheckListMenuControl::addSubMenuItem`),
    but due to ignoring the events, the submenu would not be
    announced by NVDA before the above-mentioned commit.
    
    The events were ignored since
    
        commit 4c01898e02d7b80f70f19de12f2598644fc421e3
        Author: Vladimir Glazounov <v...@openoffice.org>
        Date:   Mon Jan 28 13:14:03 2008 +0000
    
            INTEGRATION: CWS tbe32 (1.2.16); FILE MERGED
            2007/11/05 15:14:07 tbe 1.2.16.1: #i70908# [A11y] OOo crashes in 
Customize dialog - Add when large icons and A11y ONcommit 
4c01898e02d7b80f70f19de12f2598644fc421e3
    
    to fix a crash in the customization dialog,
    but that problem described in [1] is no longer
    reproducible for me with the change here
    in place.
    
    Comment 8 in the ticket mentions:
    
    > The problem was the accessible child event, which was sent for the
    > help text window. This event triggered some callbacks which caused
    > the dead lock. As the help text window is not exposed as accessible
    > child of the tree list box, I removed the accessible child event.
    
    The fact that extra children from the `vcl::Window`
    hierarchy (besides the entries in the `SvTreeListBox`
    are currently not exposed via
    `AccessibleListBox::getAccessibleChildCount` and
    `AccessibleListBox::getAccessibleChild` is still
    true, but not a problem in this context.
    (If necessary, handling for those should be easy to
    add by forwarding to the corresponding
    `VCLXAccessibleComponent` methods, and adapting
    the child index used as needed.)
    
    [1] https://bz.apache.org/ooo/show_bug.cgi?id=70908
    [2] https://bz.apache.org/ooo/show_bug.cgi?id=70908#c8
    
    Change-Id: If374032387babf41b28067d5df54d5f6ce682c48
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155801
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/accessibility/inc/extended/accessiblelistbox.hxx 
b/accessibility/inc/extended/accessiblelistbox.hxx
index ffb03ad6bd9f..5eeaf92d672c 100644
--- a/accessibility/inc/extended/accessiblelistbox.hxx
+++ b/accessibility/inc/extended/accessiblelistbox.hxx
@@ -52,7 +52,6 @@ namespace accessibility
     protected:
         // VCLXAccessibleComponent
         virtual void    ProcessWindowEvent( const VclWindowEvent& 
rVclWindowEvent ) override;
-        virtual void    ProcessWindowChildEvent( const VclWindowEvent& 
rVclWindowEvent ) override;
         virtual void    FillAccessibleStateSet( sal_Int64& rStateSet ) 
override;
 
     private:
diff --git a/accessibility/source/extended/accessiblelistbox.cxx 
b/accessibility/source/extended/accessiblelistbox.cxx
index 5561fa232dfc..f0651f05354f 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -240,25 +240,6 @@ namespace accessibility
         }
     }
 
-
-    void AccessibleListBox::ProcessWindowChildEvent( const VclWindowEvent& 
rVclWindowEvent )
-    {
-        switch ( rVclWindowEvent.GetId() )
-        {
-            case VclEventId::WindowShow:
-            case VclEventId::WindowHide:
-            {
-            }
-            break;
-            default:
-            {
-                VCLXAccessibleComponent::ProcessWindowChildEvent( 
rVclWindowEvent );
-            }
-            break;
-        }
-    }
-
-
     // XComponent
 
     void SAL_CALL AccessibleListBox::disposing()

Reply via email to