Drop Window::IsAccessibilityEventsSuppressed param

All callers use the default of `true` for the
`bTraverseParentPath` param since

    Change-Id: I88fe0e6ec9bb693710e3f7ab0c6c2e46686be720
    Author: Michael Weghorn <m.weghorn@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.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn 2024-12-02 04:27:33 +01:00
parent a80d7dcb84
commit b537e5b6d5
2 changed files with 10 additions and 15 deletions

View file

@ -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;

View file

@ -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)
while (pParent && pParent->mpWindowImpl)
{
if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents )
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 */