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; vcl::Window* GetAccessibleRelationMemberOf() const;
// to avoid sending accessibility events in cases like closing dialogs // to avoid sending accessibility events in cases like closing dialogs
// by default checks complete parent path // checks complete parent path
bool IsAccessibilityEventsSuppressed( bool bTraverseParentPath = true ); bool IsAccessibilityEventsSuppressed();
KeyEvent GetActivationKey() const; KeyEvent GetActivationKey() const;

View file

@ -606,22 +606,17 @@ vcl::Window* Window::GetAccessibleRelationLabeledBy() const
return nullptr; return nullptr;
} }
bool Window::IsAccessibilityEventsSuppressed( bool bTraverseParentPath ) bool Window::IsAccessibilityEventsSuppressed()
{ {
if( !bTraverseParentPath ) vcl::Window *pParent = this;
return mpWindowImpl->mbSuppressAccessibilityEvents; while (pParent && pParent->mpWindowImpl)
else
{ {
vcl::Window *pParent = this; if (pParent->mpWindowImpl->mbSuppressAccessibilityEvents)
while ( pParent && pParent->mpWindowImpl) return true;
{ else
if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents ) pParent = pParent->mpWindowImpl->mpParent; // do not use GetParent() to find borderwindows that are frames
return true;
else
pParent = pParent->mpWindowImpl->mpParent; // do not use GetParent() to find borderwindows that are frames
}
return false;
} }
return false;
} }
} /* namespace vcl */ } /* namespace vcl */