sd/source/ui/slideshow/showwin.cxx | 5 +---- sd/source/ui/view/sdwindow.cxx | 5 +---- sw/source/uibase/uiview/pview.cxx | 6 +----- vcl/source/app/salvtables.cxx | 2 -- 4 files changed, 3 insertions(+), 15 deletions(-)
New commits: commit c9d8f3f5df2b04c89cc13a3f6644058362e2725b Author: Michael Weghorn <[email protected]> AuthorDate: Thu Jun 26 15:20:20 2025 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Jun 27 09:09:20 2025 +0200 vcl a11y: Don't explicitly set SalInstanceIconView a11y in ctor IconView::CreateAccessible will be called on demand by vcl::Window::GetAccessible when an accessible is needed for the IconView, so there's no need to explicitly do so in the SalInstanceIconView ctor. No change in behavior intended or seen in a quick test using the "Insert" -> "Fontwork" dialog in Writer with the qt6 VCL plugin (without environment variable SAL_VCL_QT_USE_WELDED_WIDGETS set, so the VCL version is used) and Accerciser. Change-Id: Ida933abcfb319d632a0655162303852d17fac6c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187050 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 658258634ada..c99a3a8bf482 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5427,8 +5427,6 @@ SalInstanceIconView::SalInstanceIconView(::IconView* pIconView, SalInstanceBuild m_xIconView->SetDeselectHdl(LINK(this, SalInstanceIconView, DeSelectHdl)); m_xIconView->SetDoubleClickHdl(LINK(this, SalInstanceIconView, DoubleClickHdl)); m_xIconView->SetPopupMenuHdl(LINK(this, SalInstanceIconView, CommandHdl)); - - m_xIconView->SetAccessible(m_xIconView->CreateAccessible()); } int SalInstanceIconView::get_item_width() const { return m_xIconView->GetEntryWidth(); } commit 00e5ce13a531dfe12ef6b54c15119d35fc3e4c8c Author: Michael Weghorn <[email protected]> AuthorDate: Thu Jun 26 14:40:13 2025 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Fri Jun 27 09:09:11 2025 +0200 a11y: Drop redundant Window::SetAccessible calls These vcl::Window::CreateAccessible overrides only get called from vcl::Window::GetAccessible when no accessible has been set yet. vcl::Window::GetAccessible already takes care to set the window's accessible to the returned one, so there is no need to do that in the overrides as well. This simplifies this further after commit f84f7188bd55f38199b26f22bc76dcb247955b27 Author: Michael Weghorn <[email protected]> Date: Wed Jun 25 11:21:36 2025 +0200 sd a11y: Simplify ShowWindow::CreateAccessible Thanks to Noel Grandin for the comment in [1]. [1] https://gerrit.libreoffice.org/c/core/+/186963/comment/a99199e0_c4561445/ Change-Id: I3954845c942b8cf9f42b58ceb7962e1ce6ace5f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187048 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx index 004686a937e2..c932d29abb2f 100644 --- a/sd/source/ui/slideshow/showwin.cxx +++ b/sd/source/ui/slideshow/showwin.cxx @@ -619,10 +619,7 @@ css::uno::Reference<css::accessibility::XAccessible> { if (mpViewShell != nullptr) { - rtl::Reference<comphelper::OAccessible> pAcc - = mpViewShell->CreateAccessibleDocumentView(this); - SetAccessible(pAcc); - return pAcc; + return mpViewShell->CreateAccessibleDocumentView(this); } else { diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 5be821898053..d377ca825883 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -965,10 +965,7 @@ css::uno::Reference<css::accessibility::XAccessible> if (mpViewShell != nullptr) { - css::uno::Reference<css::accessibility::XAccessible> xAcc - = mpViewShell->CreateAccessibleDocumentView(this); - SetAccessible(xAcc); - return xAcc; + return mpViewShell->CreateAccessibleDocumentView(this); } else { diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 7f80247d81c5..ad7232280359 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1826,11 +1826,7 @@ uno::Reference< css::accessibility::XAccessible > #if !ENABLE_WASM_STRIP_ACCESSIBILITY OSL_ENSURE( GetViewShell() != nullptr, "We need a view shell" ); if (mpViewShell) - { - rtl::Reference<comphelper::OAccessible> pAccPreview = mpViewShell->CreateAccessiblePreview(); - SetAccessible(pAccPreview); - return pAccPreview; - } + return mpViewShell->CreateAccessiblePreview(); #endif return {}; }
