vcl/source/window/dlgctrl.cxx | 4 ++-- vcl/source/window/legacyaccessibility.cxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
New commits: commit 4401a0ee3efcf3a13d4ae83291f186aaf4c994e5 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Nov 25 10:32:24 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Nov 25 15:38:25 2024 +0100 vcl: Use non-const local var instead of const_casting later Change-Id: I34ddf601a4f48aa894e32ae0842fd30f4cfe823b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177247 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index c5575ef6e5fc..338b676257f6 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -76,7 +76,7 @@ static vcl::Window* ImplGetCurTabWindow(const vcl::Window* pWindow) // Check if the TabPage is a Child of the TabControl and still exists (by // walking all child windows); because it could be that the TabPage has been // destroyed already by a Dialog-Dtor, event that the TabControl still exists. - const TabPage* pTempTabPage = pTabControl->GetTabPage(pTabControl->GetCurPageId()); + TabPage* pTempTabPage = pTabControl->GetTabPage(pTabControl->GetCurPageId()); if (pTempTabPage) { vcl::Window* pTempWindow = pTabControl->GetWindow(GetWindowType::FirstChild); @@ -84,7 +84,7 @@ static vcl::Window* ImplGetCurTabWindow(const vcl::Window* pWindow) { if (pTempWindow->ImplGetWindow() == pTempTabPage) { - return const_cast<TabPage*>(pTempTabPage); + return pTempTabPage; } pTempWindow = nextLogicalChildOfParent(pTabControl, pTempWindow); } commit a3152312aca05b4ac0afd9f1640ba04c8ddbafce Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Nov 25 10:30:09 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Nov 25 15:38:17 2024 +0100 a11y: Make ImplGetLabeledBy param const and drop const_cast Change-Id: I7b9d61a5a6752985d17633f2a1aff80d86a7011a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177246 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 58410ed66d29..73195b286654 100644 --- a/vcl/source/window/legacyaccessibility.cxx +++ b/vcl/source/window/legacyaccessibility.cxx @@ -106,7 +106,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabelFor() const return pWindow; } -static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Window* pLabeled ) +static Window* ImplGetLabeledBy(Window* pFrameWindow, WindowType nMyType, const Window* pLabeled) { Window* pWindow = nullptr; if (pFrameWindow && nMyType != WindowType::GROUPBOX && nMyType != WindowType::FIXEDLINE) @@ -175,9 +175,9 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabeledBy() const // #i100833# MT 2010/02: Group box and fixed lines can also label a fixed text. // See tools/options/print for example. - Window* pWindow = ImplGetLabeledBy( pFrameWindow, GetType(), const_cast<Window*>(this) ); + Window* pWindow = ImplGetLabeledBy(pFrameWindow, GetType(), this); if( ! pWindow && mpWindowImpl->mpRealParent ) - pWindow = ImplGetLabeledBy( mpWindowImpl->mpRealParent, GetType(), const_cast<Window*>(this) ); + pWindow = ImplGetLabeledBy(mpWindowImpl->mpRealParent, GetType(), this); return pWindow; }