vcl/source/window/legacyaccessibility.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit ba3ac4735deeda1332f9c716a6f1b5f6cd4c9c4a Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Nov 25 10:35:13 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Nov 25 15:38:32 2024 +0100 a11y: Avoid const_cast in Window::getLegacyNonLayoutAccessibleRelationLabelFor Make the ImplGetLabelFor param const, so the const `this` can just be passed to it as is. Change-Id: Ie6f0c5100cc67050012d9165b436cbd76550d8d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177248 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx index 73195b286654..dc3275ff84ff 100644 --- a/vcl/source/window/legacyaccessibility.cxx +++ b/vcl/source/window/legacyaccessibility.cxx @@ -25,7 +25,7 @@ using namespace ::com::sun::star; -static vcl::Window* ImplGetLabelFor( vcl::Window* pFrameWindow, WindowType nMyType, vcl::Window* pLabel, sal_Unicode nAccel ) +static vcl::Window* ImplGetLabelFor(vcl::Window* pFrameWindow, WindowType nMyType, const vcl::Window* pLabel, sal_Unicode nAccel) { vcl::Window* pWindow = nullptr; @@ -100,9 +100,9 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabelFor() const sal_Unicode nAccel = getAccel( GetText() ); - Window* pWindow = ImplGetLabelFor( pFrameWindow, GetType(), const_cast<Window*>(this), nAccel ); + Window* pWindow = ImplGetLabelFor(pFrameWindow, GetType(), this, nAccel); if( ! pWindow && mpWindowImpl->mpRealParent ) - pWindow = ImplGetLabelFor( mpWindowImpl->mpRealParent, GetType(), const_cast<Window*>(this), nAccel ); + pWindow = ImplGetLabelFor(mpWindowImpl->mpRealParent, GetType(), this, nAccel); return pWindow; }