summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-11-25 10:35:13 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-11-25 15:38:32 +0100
commitba3ac4735deeda1332f9c716a6f1b5f6cd4c9c4a (patch)
treec8c376d691fc2734794706fed57bb301cb3afa80 /vcl
parent4401a0ee3efcf3a13d4ae83291f186aaf4c994e5 (diff)
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.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/legacyaccessibility.cxx6
1 files changed, 3 insertions, 3 deletions
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;
}