include/vcl/window.hxx              |    5 ++---
 sc/source/ui/app/inputhdl.cxx       |    4 ----
 vcl/source/window/accessibility.cxx |   26 ++++++++------------------
 3 files changed, 10 insertions(+), 25 deletions(-)

New commits:
commit b537e5b6d50988458aca8893393451d2c3d255e9
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Dec 2 04:27:33 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Dec 2 08:35:33 2024 +0100

    Drop Window::IsAccessibilityEventsSuppressed param
    
    All callers use the default of `true` for the
    `bTraverseParentPath` param since
    
        Change-Id: I88fe0e6ec9bb693710e3f7ab0c6c2e46686be720
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Mon Dec 2 03:28:50 2024 +0100
    
            sc a11y: Don't suppress a11y events when setting new pos
    
    , so simplify this by dropping the param altogether.
    
    Change-Id: If47333f096d31afc3fb2c57dcc03d8e342ae4aa5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177640
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 1c4486b0faf7..008415417350 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1160,8 +1160,8 @@ public:
     vcl::Window*                        GetAccessibleRelationMemberOf() const;
 
     // to avoid sending accessibility events in cases like closing dialogs
-    // by default checks complete parent path
-    bool                                IsAccessibilityEventsSuppressed( bool 
bTraverseParentPath = true );
+    // checks complete parent path
+    bool                                IsAccessibilityEventsSuppressed();
 
     KeyEvent                            GetActivationKey() const;
 
diff --git a/vcl/source/window/accessibility.cxx 
b/vcl/source/window/accessibility.cxx
index afeea0e23067..0015507f66f6 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -606,22 +606,17 @@ vcl::Window* Window::GetAccessibleRelationLabeledBy() 
const
     return nullptr;
 }
 
-bool Window::IsAccessibilityEventsSuppressed( bool bTraverseParentPath )
+bool Window::IsAccessibilityEventsSuppressed()
 {
-    if( !bTraverseParentPath )
-        return mpWindowImpl->mbSuppressAccessibilityEvents;
-    else
+    vcl::Window *pParent = this;
+    while (pParent && pParent->mpWindowImpl)
     {
-        vcl::Window *pParent = this;
-        while ( pParent && pParent->mpWindowImpl)
-        {
-            if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents )
-                return true;
-            else
-                pParent = pParent->mpWindowImpl->mpParent; // do not use 
GetParent() to find borderwindows that are frames
-        }
-        return false;
+        if (pParent->mpWindowImpl->mbSuppressAccessibilityEvents)
+            return true;
+        else
+            pParent = pParent->mpWindowImpl->mpParent; // do not use 
GetParent() to find borderwindows that are frames
     }
+    return false;
 }
 
 } /* namespace vcl */
commit a80d7dcb848438092895b6ad80cf6072478a1677
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Dec 2 03:46:38 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Dec 2 08:35:25 2024 +0100

    vcl a11y: Drop newly unused vcl::Window::SetAccessibilityEventsSuppressed
    
    Unused now after
    
        Change-Id: I88fe0e6ec9bb693710e3f7ab0c6c2e46686be720
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Mon Dec 2 03:28:50 2024 +0100
    
            sc a11y: Don't suppress a11y events when setting new pos
    
    Change-Id: I4359c903d1d1902671de87121161e0ca74b88251
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177639
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 95aba300f41e..1c4486b0faf7 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1162,7 +1162,6 @@ public:
     // to avoid sending accessibility events in cases like closing dialogs
     // by default checks complete parent path
     bool                                IsAccessibilityEventsSuppressed( bool 
bTraverseParentPath = true );
-    void                                SetAccessibilityEventsSuppressed(bool 
bSuppressed);
 
     KeyEvent                            GetActivationKey() const;
 
diff --git a/vcl/source/window/accessibility.cxx 
b/vcl/source/window/accessibility.cxx
index fb18ed81986e..afeea0e23067 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -624,11 +624,6 @@ bool Window::IsAccessibilityEventsSuppressed( bool 
bTraverseParentPath )
     }
 }
 
-void Window::SetAccessibilityEventsSuppressed(bool bSuppressed)
-{
-    mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed;
-}
-
 } /* namespace vcl */
 
 uno::Reference<accessibility::XAccessibleEditableText>
commit a0a22acced55c53a79aca74dceff7d3219f66769
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Dec 2 03:28:50 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Dec 2 08:35:18 2024 +0100

    sc a11y: Don't suppress a11y events when setting new pos
    
    Don't suppress a11y events when setting the new
    position string in the combobox in Calc's formula
    toolbar.
    
    Suppressing events was added in
    
        commit 38fe580341a3f1e379edada08db7e1aebab258f5
        Author: Malte Timmermann [mt] <malte.timmerm...@oracle.com>
        Date:   Thu Jan 20 16:34:26 2011 +0100
    
            accfixes: added more accessibility information and fixed tab orders 
in multiple dialogs (sc module)
    
    for unclear reasons.
    
    The only potential reason I can come up with could be
    to avoid announcement by screen readers, but they
    usually don't announce text/value changes to non-focused
    controls anyway, and neither Orca on Linux nor NVDA
    on Windows announcement changed with this change in place
    when moving focus between cells in Calc.
    
    Without this change in place, having the combobox's
    "text" child selected in Accerciser's treeview
    of LO's a11y hierarchy, the text shown in the "Text"
    interface section would not automatically update to display
    the newly selected location due to the missing
    event when using the qt6 VCL plugin. With this change in
    place, it is updated as expected.
    
    Change-Id: I88fe0e6ec9bb693710e3f7ab0c6c2e46686be720
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177638
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index b59ca0a4e2dc..0ad8ce05acb1 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -4385,11 +4385,7 @@ void ScInputHandler::NotifyChange( const 
ScInputHdlState* pState,
 
                     if (pInputWin)
                     {
-                        // Disable the accessible VALUE_CHANGE event
-                        bool bIsSuppressed = 
pInputWin->IsAccessibilityEventsSuppressed(false);
-                        pInputWin->SetAccessibilityEventsSuppressed(true);
                         pInputWin->SetPosString(aPosStr);
-                        
pInputWin->SetAccessibilityEventsSuppressed(bIsSuppressed);
                         pInputWin->SetSumAssignMode();
                     }
 

Reply via email to