include/vcl/headbar.hxx | 6 +++--- sc/source/ui/view/gridwin5.cxx | 8 +------- vcl/source/treelist/headbar.cxx | 12 ++++++------ vcl/source/treelist/svtabbx.cxx | 4 ++-- 4 files changed, 12 insertions(+), 18 deletions(-)
New commits: commit bb70ec328ba42c3afe1c7944b7c1464af94f3bff Author: Michael Weghorn <[email protected]> AuthorDate: Wed Jun 25 11:08:08 2025 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Thu Jun 26 13:10:30 2025 +0200 sc a11y: Simplify ScGridWindow::CreateAccessible As a vcl::Window::CreateAccessible override, it only gets called from vcl::Window::GetAccessible when no accessible has been set yet, so there's no need to check that inside of the method implementation again. Change-Id: Ibb101930750e816007adf9e71d0a1cb41e2c6d9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186959 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index 3b9e689206ff..40edc0844e75 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -374,18 +374,12 @@ void ScGridWindow::HideNoteOverlay() css::uno::Reference< css::accessibility::XAccessible > ScGridWindow::CreateAccessible() { - css::uno::Reference< css::accessibility::XAccessible > xAcc= GetAccessible(false); - if (xAcc.is()) - { - return xAcc; - } - rtl::Reference<ScAccessibleDocument> pAccessibleDocument = new ScAccessibleDocument(GetAccessibleParent(), mrViewData.GetViewShell(), eWhich); pAccessibleDocument->PreInit(); - xAcc = pAccessibleDocument; + css::uno::Reference<css::accessibility::XAccessible> xAcc = pAccessibleDocument; SetAccessible(xAcc); pAccessibleDocument->Init(); commit c9ac5aacb2ad7021a7f7cfd1c483cfe2198d3e5e Author: Michael Weghorn <[email protected]> AuthorDate: Wed Jun 25 11:01:53 2025 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Thu Jun 26 13:10:23 2025 +0200 vcl a11y: Switch HeaderBar::mxAccessible to OAccessible Change-Id: I7af76e8b9f17c0ae7d629fae63a5b3ae6c8837da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186958 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/include/vcl/headbar.hxx b/include/vcl/headbar.hxx index 99468e6af9c7..0caa7d7bd893 100644 --- a/include/vcl/headbar.hxx +++ b/include/vcl/headbar.hxx @@ -228,8 +228,7 @@ private: Link<HeaderBar*,void> maSelectHdl; Link<HeaderBar*,void> maCreateAccessibleHdl; - css::uno::Reference< css::accessibility::XAccessible > - mxAccessible; + rtl::Reference<comphelper::OAccessible> mpAccessible; using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( WinBits nWinStyle ); diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx index 20952c910751..288bee3f39c2 100644 --- a/vcl/source/treelist/headbar.cxx +++ b/vcl/source/treelist/headbar.cxx @@ -1278,20 +1278,20 @@ Size HeaderBar::CalcWindowSizePixel() const css::uno::Reference< css::accessibility::XAccessible > HeaderBar::CreateAccessible() { - if ( !mxAccessible.is() ) + if (!mpAccessible.is()) { maCreateAccessibleHdl.Call( this ); - if ( !mxAccessible.is() ) - mxAccessible = new VCLXAccessibleHeaderBar(this); + if (!mpAccessible.is()) + mpAccessible = new VCLXAccessibleHeaderBar(this); } - return mxAccessible; + return mpAccessible; } void HeaderBar::SetAccessible(rtl::Reference<comphelper::OAccessible>& rAccessible) { - mxAccessible = rAccessible; + mpAccessible = rAccessible; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 4c7fb3942b107d1068d048f33918694ce26e221c Author: Michael Weghorn <[email protected]> AuthorDate: Wed Jun 25 11:00:12 2025 +0200 Commit: Michael Weghorn <[email protected]> CommitDate: Thu Jun 26 13:10:17 2025 +0200 vcl a11y: Switch HeaderBar::SetAccessible param to OAccessible Change-Id: I4e10cb312dc677d72c7ef16b2c96310bfc6fd606 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186957 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/include/vcl/headbar.hxx b/include/vcl/headbar.hxx index b94815bce7ce..99468e6af9c7 100644 --- a/include/vcl/headbar.hxx +++ b/include/vcl/headbar.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_VCL_HEADBAR_HXX #define INCLUDED_VCL_HEADBAR_HXX +#include <comphelper/OAccessible.hxx> #include <vcl/dllapi.h> #include <tools/link.hxx> #include <vcl/window.hxx> @@ -311,7 +312,7 @@ public: /** Creates and returns the accessible object of the header bar. */ virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; - void SetAccessible( const css::uno::Reference< css::accessibility::XAccessible >& ); + void SetAccessible(rtl::Reference<comphelper::OAccessible>& rAccessible); }; #endif // INCLUDED_VCL_HEADBAR_HXX diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx index 03f60f9a8c4b..20952c910751 100644 --- a/vcl/source/treelist/headbar.cxx +++ b/vcl/source/treelist/headbar.cxx @@ -1289,9 +1289,9 @@ css::uno::Reference< css::accessibility::XAccessible > HeaderBar::CreateAccessib return mxAccessible; } -void HeaderBar::SetAccessible( const css::uno::Reference< css::accessibility::XAccessible >& _xAccessible ) +void HeaderBar::SetAccessible(rtl::Reference<comphelper::OAccessible>& rAccessible) { - mxAccessible = _xAccessible; + mxAccessible = rAccessible; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index e9084cd06b65..3e26b21daae4 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -624,9 +624,9 @@ IMPL_LINK_NOARG(SvHeaderTabListBox, CreateAccessibleHdl_Impl, HeaderBar*, void) css::uno::Reference< XAccessible > xAccParent = m_xHeaderBar->GetAccessibleParent(); if ( xAccParent.is() ) { - Reference<XAccessible> xAccessible = new AccessibleBrowseBoxHeaderBar( + rtl::Reference<comphelper::OAccessible> pAccessible = new AccessibleBrowseBoxHeaderBar( xAccParent, *this, AccessibleBrowseBoxObjType::ColumnHeaderBar); - m_xHeaderBar->SetAccessible(xAccessible); + m_xHeaderBar->SetAccessible(pAccessible); } }
