include/svtools/brwbox.hxx | 2 +- include/vcl/accessibletableprovider.hxx | 2 +- include/vcl/toolkit/svtabbx.hxx | 2 +- svtools/source/brwbox/brwbox3.cxx | 2 +- vcl/source/accessibility/AccessibleBrowseBoxTableCell.cxx | 2 +- vcl/source/app/salvtables.cxx | 8 +++----- vcl/source/treelist/svtabbx.cxx | 2 +- vcl/source/window/window.cxx | 6 +++--- 8 files changed, 12 insertions(+), 14 deletions(-)
New commits: commit d56a43d82db02bae839fa714e259ffa410e407b6 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Wed Jul 30 08:21:37 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Jul 31 06:07:05 2025 +0200 a11y: Let IAccessibleTableProvider::GetAccessible return OAccessible ... instead of the abstract XAccessible UNO interface. This also removes the need to call XAccessible::getAccessibleContext in AccessibleBrowseBoxTableCell::implGetLocale because OAccessible implements that interface itself. Change-Id: I5f548b940276df073fc1c869677a2c6ccf84c4bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188578 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index e02c55cc8c3d..d7497bbc8aab 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -816,7 +816,7 @@ public: virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, std::vector< tools::Rectangle >& rVector ) override; virtual tools::Rectangle GetWindowExtentsRelative(const vcl::Window& rRelativeWindow) const override; virtual void GrabFocus() override; - virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> GetAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; virtual vcl::Window* GetWindowInstance() override; diff --git a/include/vcl/accessibletableprovider.hxx b/include/vcl/accessibletableprovider.hxx index b93ea6082c1e..d976f1d98111 100644 --- a/include/vcl/accessibletableprovider.hxx +++ b/include/vcl/accessibletableprovider.hxx @@ -111,7 +111,7 @@ public: // Window virtual tools::Rectangle GetWindowExtentsRelative(const vcl::Window& rRelativeWindow) const = 0; virtual void GrabFocus() = 0; - virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() = 0; + virtual rtl::Reference<comphelper::OAccessible> GetAccessible() = 0; virtual vcl::Window* GetAccessibleParentWindow() const = 0; virtual vcl::Window* GetWindowInstance() = 0; diff --git a/include/vcl/toolkit/svtabbx.hxx b/include/vcl/toolkit/svtabbx.hxx index 396f49ff7738..43b4cf388998 100644 --- a/include/vcl/toolkit/svtabbx.hxx +++ b/include/vcl/toolkit/svtabbx.hxx @@ -190,7 +190,7 @@ public: // Window virtual tools::Rectangle GetWindowExtentsRelative(const vcl::Window& rRelativeWindow) const override; virtual void GrabFocus() override; - virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> GetAccessible() override; /** Creates and returns the accessible object of the whole BrowseBox. */ virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index 30f8e1a05b1e..abdeb88a3264 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -476,7 +476,7 @@ void BrowseBox::GrabFocus() Control::GrabFocus(); } -Reference< XAccessible > BrowseBox::GetAccessible() +rtl::Reference<comphelper::OAccessible> BrowseBox::GetAccessible() { return Control::GetAccessible(); } diff --git a/vcl/source/accessibility/AccessibleBrowseBoxTableCell.cxx b/vcl/source/accessibility/AccessibleBrowseBoxTableCell.cxx index cb39bb28217a..49af2d3028f1 100644 --- a/vcl/source/accessibility/AccessibleBrowseBoxTableCell.cxx +++ b/vcl/source/accessibility/AccessibleBrowseBoxTableCell.cxx @@ -54,7 +54,7 @@ OUString AccessibleBrowseBoxTableCell::implGetText() css::lang::Locale AccessibleBrowseBoxTableCell::implGetLocale() { - return mpBrowseBox->GetAccessible()->getAccessibleContext()->getLocale(); + return mpBrowseBox->GetAccessible()->getLocale(); } void AccessibleBrowseBoxTableCell::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index 5882e37229bb..fa1f0a8f729f 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -1080,7 +1080,7 @@ void SvHeaderTabListBox::GrabFocus() Control::GrabFocus(); } -Reference< XAccessible > SvHeaderTabListBox::GetAccessible() +rtl::Reference<comphelper::OAccessible> SvHeaderTabListBox::GetAccessible() { return Control::GetAccessible(); } commit 5875d52a7e1a36ce78d3207350044388b03f5397 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Wed Jul 30 08:16:09 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Jul 31 06:06:57 2025 +0200 vcl: Use OAccessible in lcl_GetxText No need to call XAccessible::getAccessibleContext to get the the XAccessibleContext, because OAccessible implements that interface itself. Change-Id: Id08fc4ef63f9c1d291b137e792137852ef1961b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188577 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 9d402cf3fc3a..e2cea4f78891 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3804,9 +3804,9 @@ namespace uno::Reference<accessibility::XAccessibleEditableText> xText; try { - uno::Reference< accessibility::XAccessible > xAccessible( pFocusWin->GetAccessible() ); - if (xAccessible.is()) - xText = FindFocusedEditableText(xAccessible->getAccessibleContext()); + rtl::Reference<comphelper::OAccessible> pAccessible = pFocusWin->GetAccessible(); + if (pAccessible.is()) + xText = FindFocusedEditableText(pAccessible); } catch(const uno::Exception&) { commit 17213ad3b72cf6e7228019ec3b5a521030194127 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Wed Jul 30 08:13:07 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Jul 31 06:06:50 2025 +0200 vcl a11y: Use OAccessible in ~SalInstanceDrawingArea Change-Id: I0e011ff22a16b0bb8da70290171cf741fd56bd54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188576 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index e6122fc60135..0930618e5494 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -6374,12 +6374,10 @@ SalInstanceDrawingArea::~SalInstanceDrawingArea() // rather than waiting for `m_xDrawingArea` to get disposed, to prevent // unsafe use of the now potentially non-functional accessible until it // gets disposed with the VclDrawingArea - css::uno::Reference<css::accessibility::XAccessible> xAccessible - = m_xDrawingArea->GetAccessible(); - css::uno::Reference<css::lang::XComponent> xComp(xAccessible, css::uno::UNO_QUERY); - if (xComp.is()) + rtl::Reference<comphelper::OAccessible> pAccessible = m_xDrawingArea->GetAccessible(); + if (pAccessible.is()) { - xComp->dispose(); + pAccessible->dispose(); m_xDrawingArea->SetAccessible(nullptr); } }