include/vcl/accessiblefactory.hxx | 8 -------- vcl/source/accessibility/acc_factory.cxx | 14 -------------- vcl/source/treelist/iconview.cxx | 9 ++++----- vcl/source/treelist/treelistbox.cxx | 9 ++++----- 4 files changed, 8 insertions(+), 32 deletions(-)
New commits: commit e75bc84d254f022a01bd7bc5444bdfa6cf7deda5 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Sat Mar 15 20:40:24 2025 -0700 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Mar 17 01:30:01 2025 +0100 vcl a11y: Call AccessibleIconView ctor directly No longer use AccessibleFactory for this, which was needed in the past to break a dependency cycle, which is no longer the case since commit 9283da858506fe3b4383e4cfe0506e470a4356f6 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Tue Dec 17 12:04:04 2024 +0100 a11y: Merge accessibility module into vcl The // need to be done here to get the vclxwindow later on in the accessible css::uno::Reference<css::awt::XVclWindowPeer> xHoldAlive(GetComponentInterface()); part is also obsolete, since the VCLXWindow is no longer used by the a11y implementation class. Change-Id: I36831850da4934c78a8f7a754bca82a02a50f6ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182988 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/include/vcl/accessiblefactory.hxx b/include/vcl/accessiblefactory.hxx index 2354e43098f4..29cd8c3635c2 100644 --- a/include/vcl/accessiblefactory.hxx +++ b/include/vcl/accessiblefactory.hxx @@ -91,10 +91,6 @@ public: static css::uno::Reference<css::accessibility::XAccessibleContext> createAccessibleTextWindowContext(vcl::Window* pWindow, TextEngine& rEngine, TextView& rView); - - static css::uno::Reference<css::accessibility::XAccessible> - createAccessibleIconView(SvTreeListBox& _rListBox, - const css::uno::Reference<css::accessibility::XAccessible>& _xParent); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/accessibility/acc_factory.cxx b/vcl/source/accessibility/acc_factory.cxx index a0cf5a04e062..8069d2f9e7dc 100644 --- a/vcl/source/accessibility/acc_factory.cxx +++ b/vcl/source/accessibility/acc_factory.cxx @@ -187,11 +187,4 @@ AccessibleFactory::createAccessibleTextWindowContext(vcl::Window* pWindow, TextE return new Document(pWindow, rEngine, rView ); } -Reference<XAccessible> -AccessibleFactory::createAccessibleIconView(SvTreeListBox& _rListBox, - const Reference<XAccessible>& _xParent) -{ - return new AccessibleIconView( _rListBox, _xParent ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx index 9dc4e45727b5..fb204743f642 100644 --- a/vcl/source/treelist/iconview.cxx +++ b/vcl/source/treelist/iconview.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <accessibility/AccessibleIconView.hxx> + #include <vcl/filter/PngImageWriter.hxx> #include <vcl/toolkit/treelistentry.hxx> #include <vcl/toolkit/viewdataentry.hxx> @@ -234,11 +236,8 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n css::uno::Reference<css::accessibility::XAccessible> IconView::CreateAccessible() { if (auto xAccParent = GetAccessibleParent()) - { - // need to be done here to get the vclxwindow later on in the accessible - css::uno::Reference<css::awt::XVclWindowPeer> xHoldAlive(GetComponentInterface()); - return AccessibleFactory::createAccessibleIconView(*this, xAccParent); - } + return new AccessibleIconView(*this, xAccParent); + return {}; } commit 62e9923b78d6b53757b15d815229ebc201ab5470 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Sat Mar 15 20:35:01 2025 -0700 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Mon Mar 17 01:29:51 2025 +0100 vcl a11y: Call AccessibleListBox ctor directly No longer use AccessibleFactory for this, which was needed in the past to break a dependency cycle, which is no longer the case since commit 9283da858506fe3b4383e4cfe0506e470a4356f6 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Tue Dec 17 12:04:04 2024 +0100 a11y: Merge accessibility module into vcl The // need to be done here to get the vclxwindow later on in the accessible css::uno::Reference< css::awt::XVclWindowPeer > xHoldAlive(GetComponentInterface()); part is also obsolete, since the VCLXWindow is no longer used by the a11y implementation class. Change-Id: I9b6a1a3f000434c2b0d3d856f2ac2ff34ab5ebe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182987 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/include/vcl/accessiblefactory.hxx b/include/vcl/accessiblefactory.hxx index 553a1bafcb5c..2354e43098f4 100644 --- a/include/vcl/accessiblefactory.hxx +++ b/include/vcl/accessiblefactory.hxx @@ -92,10 +92,6 @@ public: static css::uno::Reference<css::accessibility::XAccessibleContext> createAccessibleTextWindowContext(vcl::Window* pWindow, TextEngine& rEngine, TextView& rView); - static css::uno::Reference<css::accessibility::XAccessible> createAccessibleTreeListBox( - SvTreeListBox& _rListBox, - const css::uno::Reference<css::accessibility::XAccessible>& _xParent); - static css::uno::Reference<css::accessibility::XAccessible> createAccessibleIconView(SvTreeListBox& _rListBox, const css::uno::Reference<css::accessibility::XAccessible>& _xParent); diff --git a/vcl/source/accessibility/acc_factory.cxx b/vcl/source/accessibility/acc_factory.cxx index c99ca226231c..a0cf5a04e062 100644 --- a/vcl/source/accessibility/acc_factory.cxx +++ b/vcl/source/accessibility/acc_factory.cxx @@ -187,13 +187,6 @@ AccessibleFactory::createAccessibleTextWindowContext(vcl::Window* pWindow, TextE return new Document(pWindow, rEngine, rView ); } -Reference<XAccessible> -AccessibleFactory::createAccessibleTreeListBox(SvTreeListBox& _rListBox, - const Reference<XAccessible>& _xParent) -{ - return new AccessibleListBox( _rListBox, _xParent ); -} - Reference<XAccessible> AccessibleFactory::createAccessibleIconView(SvTreeListBox& _rListBox, const Reference<XAccessible>& _xParent) diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 440e09730fc8..0448222b4685 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -23,6 +23,8 @@ - SelectAll( false ) => only repaint the deselected entries */ +#include <accessibility/accessiblelistbox.hxx> + #include <vcl/toolkit/treelistbox.hxx> #include <vcl/accessiblefactory.hxx> #include <com/sun/star/accessibility/AccessibleStateType.hpp> @@ -3449,11 +3451,8 @@ css::uno::Reference< XAccessible > SvTreeListBox::CreateAccessible() css::uno::Reference< XAccessible > xAccessible; css::uno::Reference<XAccessible> xAccParent = GetAccessibleParent(); if ( xAccParent.is() ) - { - // need to be done here to get the vclxwindow later on in the accessible - css::uno::Reference< css::awt::XVclWindowPeer > xHoldAlive(GetComponentInterface()); - xAccessible = AccessibleFactory::createAccessibleTreeListBox( *this, xAccParent ); - } + xAccessible = new AccessibleListBox(*this, xAccParent); + return xAccessible; }