basctl/source/basicide/baside2.hxx | 2 basctl/source/basicide/baside2b.cxx | 2 basctl/source/basicide/baside3.cxx | 2 basctl/source/inc/baside3.hxx | 2 chart2/source/controller/inc/ChartWindow.hxx | 2 chart2/source/controller/main/ChartController.cxx | 12 ++-- chart2/source/controller/main/ChartWindow.cxx | 4 - dbaccess/source/ui/inc/JoinTableView.hxx | 4 - dbaccess/source/ui/inc/TableConnection.hxx | 2 dbaccess/source/ui/inc/TableWindow.hxx | 3 - dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx | 2 dbaccess/source/ui/querydesign/JAccess.cxx | 8 +-- dbaccess/source/ui/querydesign/JoinTableView.cxx | 26 +++++----- dbaccess/source/ui/querydesign/QueryTableView.cxx | 14 ++--- dbaccess/source/ui/querydesign/TableWindow.cxx | 2 dbaccess/source/ui/querydesign/TableWindowAccess.cxx | 16 +++--- dbaccess/source/ui/relationdesign/RelationTableView.cxx | 6 +- include/svtools/brwbox.hxx | 3 - include/svtools/editbrowsebox.hxx | 2 include/svtools/ruler.hxx | 2 include/svtools/tabbar.hxx | 2 include/vcl/headbar.hxx | 2 include/vcl/toolbox.hxx | 2 include/vcl/toolkit/button.hxx | 6 +- include/vcl/toolkit/combobox.hxx | 2 include/vcl/toolkit/edit.hxx | 2 include/vcl/toolkit/fixed.hxx | 2 include/vcl/toolkit/fixedhyper.hxx | 2 include/vcl/toolkit/fmtfield.hxx | 2 include/vcl/toolkit/ivctrl.hxx | 2 include/vcl/toolkit/lstbox.hxx | 2 include/vcl/toolkit/scrbar.hxx | 2 include/vcl/toolkit/svtabbx.hxx | 2 include/vcl/toolkit/treelistbox.hxx | 2 include/vcl/window.hxx | 6 -- sc/source/ui/inc/gridwin.hxx | 2 sc/source/ui/inc/preview.hxx | 2 sc/source/ui/view/gridwin5.cxx | 3 - sc/source/ui/view/preview.cxx | 2 sd/source/ui/inc/Window.hxx | 2 sd/source/ui/slideshow/showwin.cxx | 3 - sd/source/ui/slideshow/showwindow.hxx | 3 - sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 7 +- sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 8 +-- sd/source/ui/view/sdwindow.cxx | 3 - sfx2/source/view/viewsh.cxx | 1 svtools/source/brwbox/brwbox3.cxx | 2 svtools/source/brwbox/ebbcontrols.cxx | 2 svtools/source/control/ruler.cxx | 4 - svtools/source/control/tabbar.cxx | 2 svx/source/tbxctrls/tbcontrl.cxx | 4 - sw/inc/AnnotationWin.hxx | 2 sw/qa/extras/accessibility/accessible_relation_set.cxx | 1 sw/source/core/access/acccontext.cxx | 3 - sw/source/core/access/accdoc.cxx | 5 + sw/source/uibase/docvw/AnnotationWin2.cxx | 2 sw/source/uibase/docvw/edtwin.cxx | 2 sw/source/uibase/inc/edtwin.hxx | 2 sw/source/uibase/inc/pview.hxx | 2 sw/source/uibase/uiview/pview.cxx | 3 - test/source/a11y/accessibletestbase.cxx | 2 toolkit/inc/controls/table/tablecontrol.hxx | 2 toolkit/source/awt/vclxwindow.cxx | 3 - toolkit/source/controls/table/tablecontrol.cxx | 2 vcl/CppunitTest_vcl_a11y.mk | 2 vcl/inc/window.h | 2 vcl/qa/cppunit/a11y/widgetaccessibilitytest.cxx | 1 vcl/qt5/QtAccessibleWidget.cxx | 6 +- vcl/qt5/QtWidget.cxx | 1 vcl/source/accessibility/vclxaccessiblecomponent.cxx | 3 - vcl/source/accessibility/vclxaccessibletabpage.cxx | 6 +- vcl/source/accessibility/vclxaccessibletoolbox.cxx | 20 +++---- vcl/source/control/FormattedField.cxx | 2 vcl/source/control/button.cxx | 6 +- vcl/source/control/combobox.cxx | 2 vcl/source/control/edit.cxx | 2 vcl/source/control/fixed.cxx | 2 vcl/source/control/fixedhyper.cxx | 2 vcl/source/control/ivctrl.cxx | 3 - vcl/source/control/listbox.cxx | 2 vcl/source/control/scrbar.cxx | 2 vcl/source/treelist/headbar.cxx | 2 vcl/source/treelist/svtabbx.cxx | 2 vcl/source/treelist/treelistbox.cxx | 7 +- vcl/source/window/accessibility.cxx | 14 ++--- vcl/source/window/dockmgr.cxx | 6 +- vcl/source/window/menubarwindow.cxx | 8 +-- vcl/source/window/menubarwindow.hxx | 2 vcl/source/window/menufloatingwindow.cxx | 8 +-- vcl/source/window/menufloatingwindow.hxx | 2 vcl/source/window/toolbox2.cxx | 2 vcl/source/window/window.cxx | 8 +-- vcl/unx/gtk3/a11y/atkfactory.cxx | 11 ++-- vcl/unx/gtk4/a11y.cxx | 1 winaccessibility/source/service/msaaservice_impl.cxx | 1 95 files changed, 184 insertions(+), 189 deletions(-)
New commits: commit 842f0019fa8129f1fa96fde070aaf34e5aa6d796 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jul 22 17:29:56 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Jul 23 08:00:41 2025 +0200 vcl a11y: Return OAccessible in vcl::Window::GetAccessible By now, the accessible is known to always be an OAccessible, so return that more specific type instead of a Reference to the abstract XAccessible interface. Change-Id: I60f6b2d6465abfcb04d4ee7d3a26bce69fccded3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188182 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index bcdeb40bc2bd..a0d161d72618 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1617,11 +1617,11 @@ void ChartController::impl_invalidateAccessible() auto pChartWindow(GetChartWindow()); if( pChartWindow ) { - Reference<XAccessible> xAccessible = pChartWindow->GetAccessible(false); - if (xAccessible.is()) + rtl::Reference<comphelper::OAccessible> pAccessible = pChartWindow->GetAccessible(false); + if (pAccessible.is()) { //empty arguments -> invalid accessible - dynamic_cast<AccessibleChartView&>(*xAccessible).initialize(); + dynamic_cast<AccessibleChartView&>(*pAccessible).initialize(); } } #endif @@ -1633,9 +1633,9 @@ void ChartController::impl_initializeAccessible() auto pChartWindow(GetChartWindow()); if( !pChartWindow ) return; - Reference<XAccessible> xInit = pChartWindow->GetAccessible(false); - if(xInit.is()) - impl_initializeAccessible( dynamic_cast<AccessibleChartView&>(*xInit) ); + rtl::Reference<comphelper::OAccessible> pInit = pChartWindow->GetAccessible(false); + if (pInit.is()) + impl_initializeAccessible(dynamic_cast<AccessibleChartView&>(*pInit)); #endif } #if !ENABLE_WASM_STRIP_ACCESSIBILITY diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx index 1104cefb023f..c538fcf16c8c 100644 --- a/dbaccess/source/ui/querydesign/JAccess.cxx +++ b/dbaccess/source/ui/querydesign/JAccess.cxx @@ -58,7 +58,7 @@ namespace dbaui } Reference< XAccessible > SAL_CALL OJoinDesignViewAccess::getAccessibleChild( sal_Int64 i ) { - Reference< XAccessible > aRet; + rtl::Reference<comphelper::OAccessible> pRet; ::osl::MutexGuard aGuard( m_aMutex ); if(i < 0 || i >= getAccessibleChildCount() || !m_pTableView) throw IndexOutOfBoundsException(); @@ -67,11 +67,11 @@ namespace dbaui if( i < nTableWindowCount ) { OJoinTableView::OTableWindowMap::const_iterator aIter = std::next(m_pTableView->GetTabWinMap().begin(), i); - aRet = aIter->second->GetAccessible(); + pRet = aIter->second->GetAccessible(); } else if( o3tl::make_unsigned(i - nTableWindowCount) < m_pTableView->getTableConnections().size() ) - aRet = m_pTableView->getTableConnections()[i - nTableWindowCount]->GetAccessible(); - return aRet; + pRet = m_pTableView->getTableConnections()[i - nTableWindowCount]->GetAccessible(); + return pRet; } sal_Int16 SAL_CALL OJoinDesignViewAccess::getAccessibleRole( ) { diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 90040dd08af8..300e91182b0d 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -255,9 +255,9 @@ bool OJoinTableView::RemoveConnection(VclPtr<OTableConnection>& rConn, bool _bDe modified(); if ( m_pAccessible ) - m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD, - Any(xConn->GetAccessible()), - Any()); + m_pAccessible->notifyAccessibleEvent( + AccessibleEventId::CHILD, Any(css::uno::Reference<XAccessible>(xConn->GetAccessible())), + Any()); if (_bDelete) xConn->disposeOnce(); @@ -334,9 +334,9 @@ void OJoinTableView::AddTabWin(const OUString& _rComposedName, const OUString& r modified(); if ( m_pAccessible ) - m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD, - Any(), - Any(pNewTabWin->GetAccessible())); + m_pAccessible->notifyAccessibleEvent( + AccessibleEventId::CHILD, Any(), + Any(css::uno::Reference<XAccessible>(pNewTabWin->GetAccessible()))); } else { @@ -371,9 +371,9 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin ) if ( bRemove ) { if ( m_pAccessible ) - m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD, - Any(pTabWin->GetAccessible()),Any() - ); + m_pAccessible->notifyAccessibleEvent( + AccessibleEventId::CHILD, + Any(css::uno::Reference<XAccessible>(pTabWin->GetAccessible())), Any()); pTabWin->Hide(); OJoinController& rController = m_pView->getController(); @@ -1542,9 +1542,9 @@ void OJoinTableView::addConnection(OTableConnection* _pConnection,bool _bAddData modified(); if ( m_pAccessible ) - m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD, - Any(), - Any(_pConnection->GetAccessible())); + m_pAccessible->notifyAccessibleEvent( + AccessibleEventId::CHILD, Any(), + Any(css::uno::Reference<XAccessible>(_pConnection->GetAccessible()))); } bool OJoinTableView::allowQueries() const diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 2ca8c71b837f..3ddb54f5986d 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -428,10 +428,9 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& { modified(); if ( m_pAccessible ) - m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD, - Any(), - Any(pNewTabWin->GetAccessible()) - ); + m_pAccessible->notifyAccessibleEvent( + AccessibleEventId::CHILD, Any(), + Any(css::uno::Reference<XAccessible>(pNewTabWin->GetAccessible()))); do { @@ -688,10 +687,9 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin) modified(); if ( m_pAccessible ) - m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD, - Any(pTabWin->GetAccessible()), - Any() - ); + m_pAccessible->notifyAccessibleEvent( + AccessibleEventId::CHILD, + Any(css::uno::Reference<XAccessible>(pTabWin->GetAccessible())), Any()); } void OQueryTableView::EnsureVisible(const OTableWindow* pWin) diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx index 1c524c27a82e..c1932469d72c 100644 --- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx @@ -77,7 +77,7 @@ namespace dbaui Reference< XAccessible > SAL_CALL OTableWindowAccess::getAccessibleChild( sal_Int64 i ) { ::osl::MutexGuard aGuard( m_aMutex ); - Reference< XAccessible > aRet; + rtl::Reference<comphelper::OAccessible> pRet; if (m_pTable && !m_pTable->isDisposed()) { switch(i) @@ -86,21 +86,21 @@ namespace dbaui { VclPtr<OTableWindowTitle> xCtrl(m_pTable->GetTitleCtrl()); if (xCtrl) - aRet = xCtrl->GetAccessible(); + pRet = xCtrl->GetAccessible(); break; } case 1: { VclPtr<OTableWindowListBox> xCtrl(m_pTable->GetListBox()); if (xCtrl) - aRet = xCtrl->GetAccessible(); + pRet = xCtrl->GetAccessible(); break; } default: throw IndexOutOfBoundsException(); } } - return aRet; + return pRet; } sal_Int64 SAL_CALL OTableWindowAccess::getAccessibleIndexInParent( ) { @@ -136,17 +136,17 @@ namespace dbaui Reference< XAccessible > SAL_CALL OTableWindowAccess::getAccessibleAtPoint( const awt::Point& _aPoint ) { ::osl::MutexGuard aGuard( m_aMutex ); - Reference< XAccessible > aRet; + rtl::Reference<comphelper::OAccessible> pRet; if(m_pTable && !m_pTable->isDisposed()) { AbsoluteScreenPixelPoint aPoint(_aPoint.X,_aPoint.Y); AbsoluteScreenPixelRectangle aRect(m_pTable->GetDesktopRectPixel()); if( aRect.Contains(aPoint) ) - aRet = this; + pRet = this; else if( m_pTable->GetListBox()->GetDesktopRectPixel().Contains(aPoint)) - aRet = m_pTable->GetListBox()->GetAccessible(); + pRet = m_pTable->GetListBox()->GetAccessible(); } - return aRet; + return pRet; } Reference< XAccessible > OTableWindowAccess::getParentChild(sal_Int64 _nIndex) { diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index 9c6b08e1d7ce..00c01b8db2ee 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -309,9 +309,9 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin modified(); if ( m_pAccessible ) - m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD, - Any(), - Any(pNewTabWin->GetAccessible())); + m_pAccessible->notifyAccessibleEvent( + AccessibleEventId::CHILD, Any(), + Any(css::uno::Reference<XAccessible>(pNewTabWin->GetAccessible()))); } else { diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 9262fb259b16..7ce9ccfc8fc3 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1123,9 +1123,7 @@ public: */ ///@{ public: - - css::uno::Reference< css::accessibility::XAccessible > - GetAccessible( bool bCreate = true ); + rtl::Reference<comphelper::OAccessible> GetAccessible(bool bCreate = true); void SetAccessible(const rtl::Reference<comphelper::OAccessible>& rpAccessible); vcl::Window* GetAccessibleParentWindow() const; diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 51e6be5e6650..4d5e8ef107c9 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -805,9 +805,8 @@ void SlideSorterController::PageNameHasChanged (int nPageIndex, const OUString& if ( ! pWindow) return; - css::uno::Reference< css::accessibility::XAccessible > - xAccessible (pWindow->GetAccessible(false)); - if ( ! xAccessible.is()) + rtl::Reference<comphelper::OAccessible> pAccessible = pWindow->GetAccessible(false); + if (!pAccessible.is()) return; // Now comes a small hack. We assume that the accessible object is @@ -821,7 +820,7 @@ void SlideSorterController::PageNameHasChanged (int nPageIndex, const OUString& // However, the dynamic cast together with the check of the result // being NULL should be safe enough. ::accessibility::AccessibleSlideSorterView* pAccessibleView - = dynamic_cast< ::accessibility::AccessibleSlideSorterView*>(xAccessible.get()); + = dynamic_cast<::accessibility::AccessibleSlideSorterView*>(pAccessible.get()); if (pAccessibleView == nullptr) return; diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 07276f3f9c08..b4b7a8905b70 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -150,11 +150,9 @@ SlideSorterViewShell::~SlideSorterViewShell() ::sd::Window* pWindow = GetActiveWindow(); if (pWindow!=nullptr) { - css::uno::Reference<css::lang::XComponent> xComponent ( - pWindow->GetAccessible(false), - css::uno::UNO_QUERY); - if (xComponent.is()) - xComponent->dispose(); + rtl::Reference<comphelper::OAccessible> pAccessible = pWindow->GetAccessible(false); + if (pAccessible.is()) + pAccessible->dispose(); } } catch( css::uno::Exception& ) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 3d23d7a3d935..c8cd2fd81014 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -68,6 +68,7 @@ #include <com/sun/star/accessibility/AccessibleTextType.hpp> #include <com/sun/star/awt/FontSlant.hpp> +#include <comphelper/OAccessible.hxx> #include <comphelper/diagnose_ex.hxx> #include <editeng/unoprnms.hxx> #include <tools/urlobj.hxx> diff --git a/sw/qa/extras/accessibility/accessible_relation_set.cxx b/sw/qa/extras/accessibility/accessible_relation_set.cxx index 67e25c3cb418..b6e631d2d4d7 100644 --- a/sw/qa/extras/accessibility/accessible_relation_set.cxx +++ b/sw/qa/extras/accessibility/accessible_relation_set.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/text/XTextDocument.hpp> #include <com/sun/star/text/XTextCursor.hpp> #include <com/sun/star/text/ControlCharacter.hpp> +#include <comphelper/OAccessible.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/window.hxx> diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index d983277fd219..9282915901d6 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -1098,7 +1098,8 @@ void SwAccessibleContext::InvalidateChildPosOrSize( else if ( rChildFrameOrObj.GetWindow() ) { FireAccessibleEvent(AccessibleEventId::CHILD, uno::Any(), - uno::Any(rChildFrameOrObj.GetWindow()->GetAccessible())); + uno::Any(uno::Reference<XAccessible>( + rChildFrameOrObj.GetWindow()->GetAccessible()))); } } } diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index c8cd3107d722..08f5d4bab218 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -101,7 +101,7 @@ void SwAccessibleDocumentBase::AddChild( vcl::Window *pWin, bool bFireEvent ) if( bFireEvent ) { FireAccessibleEvent(AccessibleEventId::CHILD, uno::Any(), - uno::Any(mpChildWin->GetAccessible())); + uno::Any(uno::Reference<XAccessible>(mpChildWin->GetAccessible()))); } } } @@ -113,7 +113,8 @@ void SwAccessibleDocumentBase::RemoveChild( vcl::Window *pWin ) OSL_ENSURE( !mpChildWin || pWin == mpChildWin, "invalid child window to remove" ); if( mpChildWin && pWin == mpChildWin ) { - FireAccessibleEvent(AccessibleEventId::CHILD, uno::Any(mpChildWin->GetAccessible()), + FireAccessibleEvent(AccessibleEventId::CHILD, + uno::Any(uno::Reference<XAccessible>(mpChildWin->GetAccessible())), uno::Any()); mpChildWin = nullptr; diff --git a/test/source/a11y/accessibletestbase.cxx b/test/source/a11y/accessibletestbase.cxx index 441cecdee683..ce9cb3a2d517 100644 --- a/test/source/a11y/accessibletestbase.cxx +++ b/test/source/a11y/accessibletestbase.cxx @@ -28,7 +28,7 @@ #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/util/XCloseable.hpp> - +#include <comphelper/OAccessible.hxx> #include <rtl/ustrbuf.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/idle.hxx> diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 4a537b3fa57b..e9efe8d6ccb2 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/style/VerticalAlignment.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/text/WritingMode2.hpp> +#include <comphelper/OAccessible.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <awt/vclxpointer.hxx> #include <toolkit/awt/vclxwindows.hxx> @@ -1936,7 +1937,7 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName ) // This is a special "property" needed by the Java a11y tests to get the underlying // vcl::Window's XAccessible, see AccessibilityTools.getAccessibleObject. // Once those tests have been ported to C++, this can be dropped. - return uno::Any(GetWindow()->GetAccessible()); + return uno::Any(uno::Reference<accessibility::XAccessible>(GetWindow()->GetAccessible())); } WindowType eWinType = GetWindow()->GetType(); diff --git a/vcl/CppunitTest_vcl_a11y.mk b/vcl/CppunitTest_vcl_a11y.mk index 84a86eeef637..b61b06e44a0f 100644 --- a/vcl/CppunitTest_vcl_a11y.mk +++ b/vcl/CppunitTest_vcl_a11y.mk @@ -15,7 +15,9 @@ $(eval $(call gb_CppunitTest_add_exception_objects,vcl_a11y, \ $(eval $(call gb_CppunitTest_use_libraries,vcl_a11y, \ sal \ + comphelper \ cppu \ + cppuhelper \ subsequenttest \ test \ vcl \ diff --git a/vcl/qa/cppunit/a11y/widgetaccessibilitytest.cxx b/vcl/qa/cppunit/a11y/widgetaccessibilitytest.cxx index 42e15b148655..f9b6d6030b06 100644 --- a/vcl/qa/cppunit/a11y/widgetaccessibilitytest.cxx +++ b/vcl/qa/cppunit/a11y/widgetaccessibilitytest.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/accessibility/XAccessibleComponent.hpp> #include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp> #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp> +#include <comphelper/OAccessible.hxx> #include <test/a11y/AccessibilityTools.hxx> #include <test/a11y/accessibletestbase.hxx> #include <test/a11y/XAccessibleActionTester.hxx> diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx index e23a2d7cca11..54cc047d5df6 100644 --- a/vcl/qt5/QtAccessibleWidget.cxx +++ b/vcl/qt5/QtAccessibleWidget.cxx @@ -821,11 +821,11 @@ QAccessibleInterface* QtAccessibleWidget::customFactory(const QString& classname if (pWindow) { - css::uno::Reference<XAccessible> xAcc = pWindow->GetAccessible(); + rtl::Reference<comphelper::OAccessible> pAcc = pWindow->GetAccessible(); // insert into registry so the association between the XAccessible and the QtWidget // is remembered rather than creating a different QtXAccessible when a QObject is needed later - QtAccessibleRegistry::insert(xAcc, pObject); - return new QtAccessibleWidget(xAcc, *pObject); + QtAccessibleRegistry::insert(pAcc, pObject); + return new QtAccessibleWidget(pAcc, *pObject); } } if (classname == QLatin1String("QtXAccessible")) diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx index be77aa331c44..bed1dc319236 100644 --- a/vcl/qt5/QtWidget.cxx +++ b/vcl/qt5/QtWidget.cxx @@ -47,6 +47,7 @@ #include <vcl/qt/QtUtils.hxx> #include <vcl/toolkit/floatwin.hxx> #include <window.h> +#include <comphelper/OAccessible.hxx> #include <comphelper/diagnose_ex.hxx> #include <com/sun/star/accessibility/XAccessible.hpp> diff --git a/vcl/source/accessibility/vclxaccessiblecomponent.cxx b/vcl/source/accessibility/vclxaccessiblecomponent.cxx index 5d47cc4ff1ed..8f5d4e57ae76 100644 --- a/vcl/source/accessibility/vclxaccessiblecomponent.cxx +++ b/vcl/source/accessibility/vclxaccessiblecomponent.cxx @@ -211,7 +211,8 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind DBG_ASSERT( pWindow, "VclEventId::WindowChildDestroyed - Window=?" ); if ( pWindow->GetAccessible( false ).is() ) { - aOldValue <<= pWindow->GetAccessible( false ); + aOldValue <<= css::uno::Reference<accessibility::XAccessible>( + pWindow->GetAccessible(false)); NotifyAccessibleEvent( accessibility::AccessibleEventId::CHILD, aOldValue, aNewValue ); } } diff --git a/vcl/source/accessibility/vclxaccessibletabpage.cxx b/vcl/source/accessibility/vclxaccessibletabpage.cxx index f30a05a48f5c..8c265a17fe6b 100644 --- a/vcl/source/accessibility/vclxaccessibletabpage.cxx +++ b/vcl/source/accessibility/vclxaccessibletabpage.cxx @@ -279,15 +279,15 @@ Reference< XAccessible > VCLXAccessibleTabPage::getAccessibleChild( sal_Int64 i if ( i < 0 || i >= implGetAccessibleChildCount() ) throw IndexOutOfBoundsException(); - Reference< XAccessible > xChild; + rtl::Reference<comphelper::OAccessible> pChild; if ( m_pTabControl ) { TabPage* pTabPage = m_pTabControl->GetTabPage( m_nPageId ); if ( pTabPage && pTabPage->IsVisible() ) - xChild = pTabPage->GetAccessible(); + pChild = pTabPage->GetAccessible(); } - return xChild; + return pChild; } diff --git a/vcl/source/accessibility/vclxaccessibletoolbox.cxx b/vcl/source/accessibility/vclxaccessibletoolbox.cxx index 79b4777a319e..6195446e6feb 100644 --- a/vcl/source/accessibility/vclxaccessibletoolbox.cxx +++ b/vcl/source/accessibility/vclxaccessibletoolbox.cxx @@ -258,14 +258,14 @@ void VCLXAccessibleToolBox::UpdateCustomPopupItemp_Impl( vcl::Window* pWindow, b // Moreover, calling GetItemPos with 0 will find a separator if there is any. return; - Reference< XAccessible > xChild( pWindow->GetAccessible() ); - if( xChild.is() ) + rtl::Reference<comphelper::OAccessible> pChild = pWindow->GetAccessible(); + if (pChild.is()) { Reference< XAccessible > xChildItem( getAccessibleChild(pToolBox->GetItemPos(nDownItem))); VCLXAccessibleToolBoxItem* pItem = static_cast< VCLXAccessibleToolBoxItem* >( xChildItem.get() ); - pItem->SetChild( xChild ); - pItem->NotifyChildEvent( xChild, bOpen ); + pItem->SetChild(pChild); + pItem->NotifyChildEvent(pChild, bOpen); } } @@ -303,11 +303,11 @@ void VCLXAccessibleToolBox::HandleSubToolBarEvent( const VclWindowEvent& rVclWin Reference< XAccessible > xItem = getAccessibleChild( nIndex ); if ( xItem.is() ) { - Reference< XAccessible > xChild = pChildWindow->GetAccessible(); + rtl::Reference<comphelper::OAccessible> pChild = pChildWindow->GetAccessible(); VCLXAccessibleToolBoxItem* pItem = static_cast< VCLXAccessibleToolBoxItem* >( xItem.get() ); - pItem->SetChild( xChild ); - pItem->NotifyChildEvent( xChild, true/*_bShow*/ ); + pItem->SetChild(pChild); + pItem->NotifyChildEvent(pChild, true /*_bShow*/); } } @@ -554,11 +554,11 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal xChild = new VCLXAccessibleToolBoxItem( pToolBox, i ); if ( pItemWindow ) { - auto const xInnerAcc(pItemWindow->GetAccessible()); - if (xInnerAcc) // else child is being disposed - avoid crashing + rtl::Reference<comphelper::OAccessible> pInnerAcc = pItemWindow->GetAccessible(); + if (pInnerAcc.is()) // else child is being disposed - avoid crashing { pItemWindow->SetAccessibleParent(xChild); - xChild->SetChild(xInnerAcc); + xChild->SetChild(pInnerAcc); } } if ( nHighlightItemId > ToolBoxItemId(0) && nItemId == nHighlightItemId ) diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index 5141515be4f4..9735058785e5 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -61,7 +61,7 @@ ImplAccessibleInfos::~ImplAccessibleInfos() namespace vcl { -css::uno::Reference< css::accessibility::XAccessible > Window::GetAccessible( bool bCreate ) +rtl::Reference<comphelper::OAccessible> Window::GetAccessible(bool bCreate) { // do not optimize hierarchy for the top level border win (ie, when there is no parent) /* // do not optimize accessible hierarchy at all to better reflect real VCL hierarchy @@ -74,7 +74,7 @@ css::uno::Reference< css::accessibility::XAccessible > Window::GetAccessible( bo } */ if ( !mpWindowImpl ) - return css::uno::Reference< css::accessibility::XAccessible >(); + return {}; if (!mpWindowImpl->mpAccessible.is() && !mpWindowImpl->mbInDispose && bCreate) mpWindowImpl->mpAccessible = CreateAccessible(); diff --git a/vcl/unx/gtk3/a11y/atkfactory.cxx b/vcl/unx/gtk3/a11y/atkfactory.cxx index 3c8e6222e896..ffb3e7f1c933 100644 --- a/vcl/unx/gtk3/a11y/atkfactory.cxx +++ b/vcl/unx/gtk3/a11y/atkfactory.cxx @@ -18,6 +18,8 @@ */ #include <unx/gtk/gtkframe.hxx> + +#include <comphelper/OAccessible.hxx> #include <vcl/window.hxx> #include "atkwrapper.hxx" #include "atkfactory.hxx" @@ -72,15 +74,16 @@ wrapper_factory_create_accessible( GObject *obj ) if( pWindow ) { - uno::Reference< accessibility::XAccessible > xAccessible = pWindow->GetAccessible(); - if( xAccessible.is() ) + rtl::Reference<comphelper::OAccessible> pAccessible = pWindow->GetAccessible(); + if (pAccessible.is()) { - AtkObject *accessible = ooo_wrapper_registry_get( xAccessible ); + AtkObject* accessible = ooo_wrapper_registry_get(pAccessible); if( accessible ) g_object_ref( G_OBJECT(accessible) ); else - accessible = atk_object_wrapper_new(xAccessible, gtk_widget_get_accessible(pEventBox)); + accessible + = atk_object_wrapper_new(pAccessible, gtk_widget_get_accessible(pEventBox)); return accessible; } diff --git a/vcl/unx/gtk4/a11y.cxx b/vcl/unx/gtk4/a11y.cxx index 4f4222c9eeb3..79dbb9ec1f27 100644 --- a/vcl/unx/gtk4/a11y.cxx +++ b/vcl/unx/gtk4/a11y.cxx @@ -15,6 +15,7 @@ #include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp> #include <com/sun/star/accessibility/XAccessibleText.hpp> #include <com/sun/star/accessibility/XAccessibleValue.hpp> +#include <comphelper/OAccessible.hxx> #include <unx/gtk/gtkframe.hxx> #include <gtk/gtk.h> #include <o3tl/string_view.hxx> diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx index 823238215a25..fe91e1f60166 100644 --- a/winaccessibility/source/service/msaaservice_impl.cxx +++ b/winaccessibility/source/service/msaaservice_impl.cxx @@ -19,6 +19,7 @@ #include <rtl/ref.hxx> #include <sal/log.hxx> +#include <comphelper/OAccessible.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/factory.hxx> #include <cppuhelper/implementationentry.hxx> commit 96b000afaea31380fc346901a687e4d62fb8d6d0 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jul 22 16:41:52 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Jul 23 08:00:35 2025 +0200 vcl a11y: Switch Window::mxAccessible to OAccessible Use the more concrete class. This also allows dropping one UNO_QUERY for the XComponent interface in order to dispose the accessible. Change-Id: Iafbf71148df3f85a885512d44d495b3db576f81f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188181 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 7bbb51913dcb..a442605ad701 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -285,7 +285,7 @@ public: OUString maID; InputContext maInputContext; css::uno::Reference< css::awt::XVclWindowPeer > mxWindowPeer; - css::uno::Reference< css::accessibility::XAccessible > mxAccessible; + rtl::Reference<comphelper::OAccessible> mpAccessible; std::shared_ptr< VclSizeGroup > m_xSizeGroup; std::vector<VclPtr<FixedText>> m_aMnemonicLabels; std::unique_ptr<ImplAccessibleInfos> mpAccessibleInfos; diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index 8d2a718176be..5141515be4f4 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -75,10 +75,10 @@ css::uno::Reference< css::accessibility::XAccessible > Window::GetAccessible( bo */ if ( !mpWindowImpl ) return css::uno::Reference< css::accessibility::XAccessible >(); - if (!mpWindowImpl->mxAccessible.is() && !mpWindowImpl->mbInDispose && bCreate) - mpWindowImpl->mxAccessible = CreateAccessible(); + if (!mpWindowImpl->mpAccessible.is() && !mpWindowImpl->mbInDispose && bCreate) + mpWindowImpl->mpAccessible = CreateAccessible(); - return mpWindowImpl->mxAccessible; + return mpWindowImpl->mpAccessible; } namespace { @@ -120,7 +120,7 @@ void Window::SetAccessible(const rtl::Reference<comphelper::OAccessible>& rpAcce if (!mpWindowImpl) return; - mpWindowImpl->mxAccessible = rpAccessible; + mpWindowImpl->mpAccessible = rpAccessible; } // skip all border windows that are not top level frames diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index a11bfddff75e..983d159898cf 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -214,12 +214,10 @@ void Window::dispose() if ( pWrapper ) pWrapper->WindowDestroyed( this ); - if ( mpWindowImpl->mxAccessible.is() ) + if (mpWindowImpl->mpAccessible.is()) { - Reference< XComponent> xC( mpWindowImpl->mxAccessible, UNO_QUERY ); - if ( xC.is() ) - xC->dispose(); - mpWindowImpl->mxAccessible.clear(); + mpWindowImpl->mpAccessible->dispose(); + mpWindowImpl->mpAccessible.clear(); } if (mpWindowImpl->mpAccessibleInfos) commit 7c036efe76a6631aaf998451f7b1c55d2ad8956a Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jul 22 16:38:52 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Jul 23 08:00:28 2025 +0200 vcl a11y: Return OAccessible in vcl::Window::CreateAccessible By now, the accessible is known to always be an OAccessible, so return that more specific type instead of a Reference to the abstract XAccessible interface. Change-Id: Ie8f5318fb35d2fdeb59ac97452e2e27971c6b5a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188180 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 060b3a7997dd..cd5502697bd6 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -109,7 +109,7 @@ private: Color m_aLineHighlightColor; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; CodeCompleteDataCache aCodeCompleteCache; VclPtr<CodeCompleteWindow> pCodeCompleteWnd; OUString GetActualSubName( sal_uInt32 nLine ); // gets the actual subroutine name according to line number diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index d409fae4d8d0..4adee9bbdf2d 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -2151,7 +2151,7 @@ void ComplexEditorWindow::SetLineNumberDisplay(bool b) Resize(); } -css::uno::Reference<css::accessibility::XAccessible> EditorWindow::CreateAccessible() +rtl::Reference<comphelper::OAccessible> EditorWindow::CreateAccessible() { // Make sure edit engine and view are available: if (!pEditEngine) diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 8839731ba926..a694f4ce1870 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1180,7 +1180,7 @@ void DialogWindow::InitSettings() SetBackground(rStyleSettings.GetFaceColor()); } -css::uno::Reference< css::accessibility::XAccessible > DialogWindow::CreateAccessible() +rtl::Reference<comphelper::OAccessible> DialogWindow::CreateAccessible() { return new AccessibleDialogWindow(this); } diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index 61817699ac9a..7e68e2636960 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -100,7 +100,7 @@ public: virtual void Activating () override; virtual void Deactivating () override; - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual OUString GetHid () const override; virtual SbxItemType GetSbxType () const override; diff --git a/chart2/source/controller/inc/ChartWindow.hxx b/chart2/source/controller/inc/ChartWindow.hxx index 918805cb3a8a..f330c89517ce 100644 --- a/chart2/source/controller/inc/ChartWindow.hxx +++ b/chart2/source/controller/inc/ChartWindow.hxx @@ -58,7 +58,7 @@ public: /// Notify the LOK client about an invalidated area. virtual void LogicInvalidate( const tools::Rectangle* pRectangle ) override; - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual FactoryFunction GetUITestFactory() const override; diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index ee8b70aab9a8..82dbf1cd1c83 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -180,7 +180,7 @@ void ChartWindow::KeyInput( const KeyEvent& rKEvt ) Window::KeyInput( rKEvt ); } -uno::Reference< css::accessibility::XAccessible > ChartWindow::CreateAccessible() +rtl::Reference<comphelper::OAccessible> ChartWindow::CreateAccessible() { #if !ENABLE_WASM_STRIP_ACCESSIBILITY if( m_pWindowController ) @@ -188,7 +188,7 @@ uno::Reference< css::accessibility::XAccessible > ChartWindow::CreateAccessible( else return Window::CreateAccessible(); #else - return uno::Reference< css::accessibility::XAccessible >(); + return {}; #endif } diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx index 138de4106070..9da25a4c1d30 100644 --- a/dbaccess/source/ui/inc/JoinTableView.hxx +++ b/dbaccess/source/ui/inc/JoinTableView.hxx @@ -113,8 +113,8 @@ namespace dbaui virtual void GetFocus() override; virtual void LoseFocus() override; virtual void KeyInput( const KeyEvent& rEvt ) override; - // Accessibility - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; // own methods ScrollAdaptor& GetHScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetHScrollBar(); } diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx index ac4f27eabcb3..e2d4f36067bd 100644 --- a/dbaccess/source/ui/inc/TableConnection.hxx +++ b/dbaccess/source/ui/inc/TableConnection.hxx @@ -90,7 +90,7 @@ namespace dbaui OJoinTableView* GetParent() const { return m_pParent; } virtual void Draw(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); using Window::Draw; - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; }; } diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx index fb6220291558..9ece39e6be1f 100644 --- a/dbaccess/source/ui/inc/TableWindow.hxx +++ b/dbaccess/source/ui/inc/TableWindow.hxx @@ -165,8 +165,7 @@ namespace dbaui virtual bool PreNotify( NotifyEvent& rNEvt ) override; virtual void Command(const CommandEvent& rEvt) override; - // Accessibility - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; // do I have connections to the outside? bool ExistsAConn() const; diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx index a45993a5721d..881cf498f5ea 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx @@ -135,7 +135,7 @@ namespace dbaui return getRelation(0); return AccessibleRelation(); } - Reference< XAccessible > OTableConnection::CreateAccessible() + rtl::Reference<comphelper::OAccessible> OTableConnection::CreateAccessible() { return new OConnectionLineAccess(this); } diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index f2f263d7f006..90040dd08af8 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1512,7 +1512,7 @@ void OJoinTableView::GetFocus() GrabTabWinFocus(); } -Reference< XAccessible > OJoinTableView::CreateAccessible() +rtl::Reference<comphelper::OAccessible> OJoinTableView::CreateAccessible() { m_pAccessible = new OJoinDesignViewAccess(this); return m_pAccessible; diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index ac48bab4bb34..8fd3ef1b8d2e 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -510,7 +510,7 @@ void OTableWindow::StateChanged( StateChangedType nType ) Invalidate(); } -Reference< XAccessible > OTableWindow::CreateAccessible() +rtl::Reference<comphelper::OAccessible> OTableWindow::CreateAccessible() { return new OTableWindowAccess(this); } diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index dc2a7d336d19..e02c55cc8c3d 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -704,8 +704,7 @@ public: public: /** Creates and returns the accessible object of the whole BrowseBox. */ - virtual css::uno::Reference< - css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; // Children --------------------------------------------------------------- diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index ad9e2bd24546..9d0ccd69ffba 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -210,7 +210,7 @@ namespace svt m_aKeyReleaseHdl = rHdl; } - css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + rtl::Reference<comphelper::OAccessible> CreateAccessible() override; protected: DECL_DLLPRIVATE_LINK(KeyInputHdl, const KeyEvent&, bool); diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 1b4e2f59cff3..046e02241a28 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -792,7 +792,7 @@ public: void DrawTicks(); - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx index 9cbeb77a9fd9..93880c820298 100644 --- a/include/svtools/tabbar.hxx +++ b/include/svtools/tabbar.hxx @@ -499,7 +499,7 @@ public: void SetAddButtonEnabled(bool bAddButtonEnabled); // accessibility - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/headbar.hxx b/include/vcl/headbar.hxx index 0caa7d7bd893..f88153c87eaf 100644 --- a/include/vcl/headbar.hxx +++ b/include/vcl/headbar.hxx @@ -310,7 +310,7 @@ public: bool IsDragable() const { return mbDragable; } /** Creates and returns the accessible object of the header bar. */ - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; void SetAccessible(rtl::Reference<comphelper::OAccessible>& rAccessible); }; diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index 50cbd54a8977..264641aa6652 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -262,7 +262,7 @@ public: virtual ~ToolBox() override; virtual void dispose() override; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual void Click(); SAL_DLLPRIVATE void DoubleClick(); diff --git a/include/vcl/toolkit/button.hxx b/include/vcl/toolkit/button.hxx index 19dd68386bee..e1f10eb67242 100644 --- a/include/vcl/toolkit/button.hxx +++ b/include/vcl/toolkit/button.hxx @@ -130,7 +130,7 @@ public: explicit PushButton( vcl::Window* pParent, WinBits nStyle = 0 ); - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; @@ -330,7 +330,7 @@ public: public: explicit CheckBox( vcl::Window* pParent, WinBits nStyle = 0 ); - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; @@ -436,7 +436,7 @@ public: virtual ~RadioButton() override; virtual void dispose() override; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; diff --git a/include/vcl/toolkit/combobox.hxx b/include/vcl/toolkit/combobox.hxx index 354486480521..d934d83343f7 100644 --- a/include/vcl/toolkit/combobox.hxx +++ b/include/vcl/toolkit/combobox.hxx @@ -86,7 +86,7 @@ public: virtual ~ComboBox() override; virtual void dispose() override; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual void Draw( OutputDevice* pDev, const Point& rPos,SystemTextColorFlags nFlags ) override; virtual void Resize() override; diff --git a/include/vcl/toolkit/edit.hxx b/include/vcl/toolkit/edit.hxx index 44c4f8244e21..36ca40d3b9e7 100644 --- a/include/vcl/toolkit/edit.hxx +++ b/include/vcl/toolkit/edit.hxx @@ -148,7 +148,7 @@ public: virtual ~Edit() override; virtual void dispose() override; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; diff --git a/include/vcl/toolkit/fixed.hxx b/include/vcl/toolkit/fixed.hxx index bb6f0a0bbadc..53bd97b4c2e8 100644 --- a/include/vcl/toolkit/fixed.hxx +++ b/include/vcl/toolkit/fixed.hxx @@ -57,7 +57,7 @@ public: virtual ~FixedText() override; virtual void dispose() override; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; diff --git a/include/vcl/toolkit/fixedhyper.hxx b/include/vcl/toolkit/fixedhyper.hxx index b458571c08d1..8ff8759f9fae 100644 --- a/include/vcl/toolkit/fixedhyper.hxx +++ b/include/vcl/toolkit/fixedhyper.hxx @@ -71,7 +71,7 @@ public: */ FixedHyperlink( vcl::Window* pParent, WinBits nWinStyle = 0 ); - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; /** overwrites Window::GetFocus(). diff --git a/include/vcl/toolkit/fmtfield.hxx b/include/vcl/toolkit/fmtfield.hxx index 1bbe45eda0a2..9babaa74f909 100644 --- a/include/vcl/toolkit/fmtfield.hxx +++ b/include/vcl/toolkit/fmtfield.hxx @@ -33,7 +33,7 @@ public: virtual void dispose() override; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; // Spin-Handling virtual void Up() override; diff --git a/include/vcl/toolkit/ivctrl.hxx b/include/vcl/toolkit/ivctrl.hxx index 0e605dc16268..292944ff09d9 100644 --- a/include/vcl/toolkit/ivctrl.hxx +++ b/include/vcl/toolkit/ivctrl.hxx @@ -170,7 +170,7 @@ public: // ACCESSIBILITY ========================================================== /** Creates and returns the accessible object of the Box. */ - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/toolkit/lstbox.hxx b/include/vcl/toolkit/lstbox.hxx index fedc182ee46f..82ca95e7ab84 100644 --- a/include/vcl/toolkit/lstbox.hxx +++ b/include/vcl/toolkit/lstbox.hxx @@ -123,7 +123,7 @@ public: SAL_DLLPRIVATE virtual ~ListBox() override; SAL_DLLPRIVATE virtual void dispose() override; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; SAL_DLLPRIVATE virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; SAL_DLLPRIVATE virtual void Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags nFlags ) override; diff --git a/include/vcl/toolkit/scrbar.hxx b/include/vcl/toolkit/scrbar.hxx index f0b611089870..ae0449136aec 100644 --- a/include/vcl/toolkit/scrbar.hxx +++ b/include/vcl/toolkit/scrbar.hxx @@ -92,7 +92,7 @@ public: virtual ~ScrollBar() override; virtual void dispose() override; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void Tracking(const TrackingEvent& rTEvt) override; diff --git a/include/vcl/toolkit/svtabbx.hxx b/include/vcl/toolkit/svtabbx.hxx index cb67d9b8775c..396f49ff7738 100644 --- a/include/vcl/toolkit/svtabbx.hxx +++ b/include/vcl/toolkit/svtabbx.hxx @@ -192,7 +192,7 @@ public: virtual void GrabFocus() override; virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; /** Creates and returns the accessible object of the whole BrowseBox. */ - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx index 91df0fc2e56d..0a80253bc169 100644 --- a/include/vcl/toolkit/treelistbox.hxx +++ b/include/vcl/toolkit/treelistbox.hxx @@ -454,7 +454,7 @@ public: // ACCESSIBILITY ========================================================== /** Creates and returns the accessible object of the Box. */ - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; /** Fills the StateSet of one entry. */ void FillAccessibleEntryStateSet( SvTreeListEntry* pEntry, sal_Int64& rStateSet ) const; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index c93ec2c49ad4..9262fb259b16 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1160,7 +1160,7 @@ public: KeyEvent GetActivationKey() const; protected: - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible(); + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible(); // These eventually are supposed to go when everything is converted to .ui SAL_DLLPRIVATE vcl::Window* getLegacyNonLayoutAccessibleRelationMemberOf() const; diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 70076cb40bf7..f12865d3f773 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -395,7 +395,7 @@ public: bool GetEditUrl(const Point& rPos, OUString* pName = nullptr, OUString* pUrl = nullptr, OUString* pTarget = nullptr, SCCOL* pnCol= nullptr); - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; void FakeButtonUp(); diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx index 606454d992ba..cf07452b244a 100644 --- a/sc/source/ui/inc/preview.hxx +++ b/sc/source/ui/inc/preview.hxx @@ -110,7 +110,7 @@ protected: virtual void GetFocus() override; virtual void LoseFocus() override; - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; public: ScPreview( vcl::Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pViewSh ); diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index 3913b2c27e84..d865fcfa0e31 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -371,8 +371,7 @@ void ScGridWindow::HideNoteOverlay() mpNoteOverlay.reset(); } -css::uno::Reference< css::accessibility::XAccessible > - ScGridWindow::CreateAccessible() +rtl::Reference<comphelper::OAccessible> ScGridWindow::CreateAccessible() { rtl::Reference<ScAccessibleDocument> pAccessibleDocument = new ScAccessibleDocument(GetAccessibleParent(), diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index ae18b997cd91..081050d01e6f 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -1515,7 +1515,7 @@ void ScPreview::LoseFocus() Window::LoseFocus(); } -css::uno::Reference<css::accessibility::XAccessible> ScPreview::CreateAccessible() +rtl::Reference<comphelper::OAccessible> ScPreview::CreateAccessible() { rtl::Reference<ScAccessibleDocumentPagePreview> pAccessible = new ScAccessibleDocumentPagePreview(GetAccessibleParent(), pViewShell ); diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx index 9763f24e8895..3fd605052433 100644 --- a/sd/source/ui/inc/Window.hxx +++ b/sd/source/ui/inc/Window.hxx @@ -190,7 +190,7 @@ protected: The returned reference is empty if an accessible object could not be created. */ - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + rtl::Reference<comphelper::OAccessible> CreateAccessible() override; OUString GetSurroundingText() const override; Selection GetSurroundingTextSelection() const override; diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx index c932d29abb2f..816ccfc3f11c 100644 --- a/sd/source/ui/slideshow/showwin.cxx +++ b/sd/source/ui/slideshow/showwin.cxx @@ -614,8 +614,7 @@ void ShowWindow::AddWindowToPaintView() } // Override the sd::Window's CreateAccessible to create a different accessible object -css::uno::Reference<css::accessibility::XAccessible> - ShowWindow::CreateAccessible() +rtl::Reference<comphelper::OAccessible> ShowWindow::CreateAccessible() { if (mpViewShell != nullptr) { diff --git a/sd/source/ui/slideshow/showwindow.hxx b/sd/source/ui/slideshow/showwindow.hxx index c7a1d9bf0261..142db985d0b6 100644 --- a/sd/source/ui/slideshow/showwindow.hxx +++ b/sd/source/ui/slideshow/showwindow.hxx @@ -72,8 +72,7 @@ public: virtual void MouseButtonDown(const MouseEvent& rMEvt) override; virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; /// Override the sd::Window's CreateAccessible to create a different accessible object - virtual css::uno::Reference<css::accessibility::XAccessible> - CreateAccessible() override; + rtl::Reference<comphelper::OAccessible> CreateAccessible() override; void TerminateShow(); void RestartShow(); diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index d377ca825883..773778677083 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -954,8 +954,7 @@ void Window::DropScroll(const Point& rMousePos) } } -css::uno::Reference<css::accessibility::XAccessible> - Window::CreateAccessible() +rtl::Reference<comphelper::OAccessible> Window::CreateAccessible() { // If current viewshell is PresentationViewShell, just return empty because the correct ShowWin will be created later. if (dynamic_cast< PresentationViewShell *>( mpViewShell )) diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index c8efe278b8a3..30f8e1a05b1e 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -65,7 +65,7 @@ Reference<XAccessible> BrowseBox::getAccessibleTable() return nullptr; } -Reference< XAccessible > BrowseBox::CreateAccessible() +rtl::Reference<comphelper::OAccessible> BrowseBox::CreateAccessible() { if (!m_xAccessible) { diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 35ee6916ffa1..cb7109160de1 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -381,7 +381,7 @@ namespace svt return static_cast<BrowserDataWin*>(GetParent())->GetParent()->ProcessKey(rKEvt); } - css::uno::Reference<css::accessibility::XAccessible> ControlBase::CreateAccessible() + rtl::Reference<comphelper::OAccessible> ControlBase::CreateAccessible() { return new EditBrowseBoxTableCell(this); } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index d33e48548f11..5808cfe1e559 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -2755,7 +2755,7 @@ void Ruler::DrawTicks() Invalidate(InvalidateFlags::NoErase); } -uno::Reference< XAccessible > Ruler::CreateAccessible() +rtl::Reference<comphelper::OAccessible> Ruler::CreateAccessible() { uno::Reference<XAccessible> xAccParent = GetAccessibleParent(); if( xAccParent.is() ) @@ -2772,7 +2772,7 @@ uno::Reference< XAccessible > Ruler::CreateAccessible() return new SvtRulerAccessible(xAccParent, *this, aStr); } else - return uno::Reference< XAccessible >(); + return {}; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index aa2ed304262f..a7ef6d45fb78 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -2531,7 +2531,7 @@ void TabBar::SetAddButtonEnabled(bool bAddButtonEnabled) mpImpl->mxButtonBox->m_xAddButton->set_sensitive(bAddButtonEnabled); } -css::uno::Reference<css::accessibility::XAccessible> TabBar::CreateAccessible() +rtl::Reference<comphelper::OAccessible> TabBar::CreateAccessible() { return new accessibility::AccessibleTabBar(this); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 11d7900b953a..d02867e3642f 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -439,7 +439,7 @@ public: disposeOnce(); } - virtual Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; virtual void StateChanged(StateChangedType nStateChange) override { @@ -4122,7 +4122,7 @@ com_sun_star_comp_svx_CurrencyToolBoxControl_get_implementation( return cppu::acquire( new SvxCurrencyToolBoxControl( rContext ) ); } -Reference< css::accessibility::XAccessible > SvxFontNameBox_Impl::CreateAccessible() +rtl::Reference<comphelper::OAccessible> SvxFontNameBox_Impl::CreateAccessible() { FillList(); return InterimItemWindow::CreateAccessible(); diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index c1ac7c4c9598..dbd20392c051 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -167,7 +167,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public InterimItemWindow bool IsMouseOverSidebarWin() const { return mbMouseOver; } void ChangeSidebarItem( SwAnnotationItem & rSidebarItem ); - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; void DrawForPage(OutputDevice* pDev, const Point& rPos); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 4f2200896d75..629c66099563 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1473,7 +1473,7 @@ void SwAnnotationWin::ChangeSidebarItem( SwAnnotationItem & rSidebarItem ) #endif } -css::uno::Reference< css::accessibility::XAccessible > SwAnnotationWin::CreateAccessible() +rtl::Reference<comphelper::OAccessible> SwAnnotationWin::CreateAccessible() { #if !ENABLE_WASM_STRIP_ACCESSIBILITY if (!mxSidebarWinAccessible) diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 67d78793755c..5f489158b699 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -6483,7 +6483,7 @@ void SwEditWin::SetChainMode( bool bOn ) m_rView.GetViewFrame().GetBindings().Invalidate(aInva); } -uno::Reference< css::accessibility::XAccessible > SwEditWin::CreateAccessible() +rtl::Reference<comphelper::OAccessible> SwEditWin::CreateAccessible() { #if !ENABLE_WASM_STRIP_ACCESSIBILITY SolarMutexGuard aGuard; // this should have happened already!!! diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 5cea01ab6a46..aa5d84a6eaef 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -247,7 +247,7 @@ public: const SwView &GetView() const { return m_rView; } SwView &GetView() { return m_rView; } - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; static tools::Long GetDDStartPosX() { return s_nDDStartPosX; } static tools::Long GetDDStartPosY() { return s_nDDStartPosY; } diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index 7e017e4268cb..c1898ea6ac46 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -146,7 +146,7 @@ public: */ bool SetBookPreviewMode( const bool _bBookPreview ); - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; void ReInit(); }; diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 4d6689dd7b3b..404afc46a899 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1819,8 +1819,7 @@ bool SwPagePreview::HandleWheelCommands( const CommandEvent& rCEvt ) return bOk; } -uno::Reference< css::accessibility::XAccessible > - SwPagePreviewWin::CreateAccessible() +rtl::Reference<comphelper::OAccessible> SwPagePreviewWin::CreateAccessible() { SolarMutexGuard aGuard; // this should have happened already!!! #if !ENABLE_WASM_STRIP_ACCESSIBILITY diff --git a/toolkit/inc/controls/table/tablecontrol.hxx b/toolkit/inc/controls/table/tablecontrol.hxx index af5b1e2d9d1f..b6d3b77b3046 100644 --- a/toolkit/inc/controls/table/tablecontrol.hxx +++ b/toolkit/inc/controls/table/tablecontrol.hxx @@ -117,7 +117,7 @@ namespace svt::table virtual void StateChanged( StateChangedType i_nStateChange ) override; /** Creates and returns the accessible object of the whole GridControl. */ - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; OUString GetAccessibleObjectName(AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const; void GoToCell(sal_Int32 _nColumnPos, sal_Int32 _nRow); diff --git a/toolkit/source/controls/table/tablecontrol.cxx b/toolkit/source/controls/table/tablecontrol.cxx index 993c9c50bfc4..f6ac46eb1e85 100644 --- a/toolkit/source/controls/table/tablecontrol.cxx +++ b/toolkit/source/controls/table/tablecontrol.cxx @@ -311,7 +311,7 @@ namespace svt::table } - Reference< XAccessible > TableControl::CreateAccessible() + rtl::Reference<comphelper::OAccessible> TableControl::CreateAccessible() { css::uno::Reference<css::accessibility::XAccessible> xParent = GetAccessibleParent(); return m_pImpl->getAccessible(xParent); diff --git a/vcl/source/control/FormattedField.cxx b/vcl/source/control/FormattedField.cxx index 6d7a6601afe1..8aa587f4de32 100644 --- a/vcl/source/control/FormattedField.cxx +++ b/vcl/source/control/FormattedField.cxx @@ -51,7 +51,7 @@ void FormattedField::dispose() SpinField::dispose(); } -css::uno::Reference<css::accessibility::XAccessible> FormattedField::CreateAccessible() +rtl::Reference<comphelper::OAccessible> FormattedField::CreateAccessible() { return new SVTXAccessibleNumericField(this); } diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 6099686b8419..4f808f3eea6b 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1269,7 +1269,7 @@ PushButton::PushButton( vcl::Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } -css::uno::Reference<css::accessibility::XAccessible> PushButton::CreateAccessible() +rtl::Reference<comphelper::OAccessible> PushButton::CreateAccessible() { return new VCLXAccessibleButton(this); } @@ -2434,7 +2434,7 @@ void RadioButton::dispose() Button::dispose(); } -css::uno::Reference<css::accessibility::XAccessible> RadioButton::CreateAccessible() +rtl::Reference<comphelper::OAccessible> RadioButton::CreateAccessible() { return new VCLXAccessibleRadioButton(this); } @@ -3265,7 +3265,7 @@ CheckBox::CheckBox( vcl::Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } -css::uno::Reference<css::accessibility::XAccessible> CheckBox::CreateAccessible() +rtl::Reference<comphelper::OAccessible> CheckBox::CreateAccessible() { return new VCLXAccessibleCheckBox(this); } diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index a565e4028e16..aedf65a805a5 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1135,7 +1135,7 @@ void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines } } -css::uno::Reference<css::accessibility::XAccessible> ComboBox::CreateAccessible() +rtl::Reference<comphelper::OAccessible> ComboBox::CreateAccessible() { const bool bIsDropDownBox = (GetStyle() & WB_DROPDOWN) == WB_DROPDOWN; if (bIsDropDownBox) diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 499b79bb0ce5..670abff58fa0 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1276,7 +1276,7 @@ void Edit::ImplPaste(css::uno::Reference<css::datatransfer::clipboard::XClipboar } } -css::uno::Reference<css::accessibility::XAccessible> Edit::CreateAccessible() +rtl::Reference<comphelper::OAccessible> Edit::CreateAccessible() { return new VCLXAccessibleEdit(this); } diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index fcfbdccfa930..242867319de2 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -164,7 +164,7 @@ void FixedText::ImplDraw(OutputDevice* pDev, SystemTextColorFlags nSystemTextCol bFillLayout ? &mxLayoutData->m_aDisplayText : nullptr); } -css::uno::Reference<css::accessibility::XAccessible> FixedText::CreateAccessible() +rtl::Reference<comphelper::OAccessible> FixedText::CreateAccessible() { return new VCLXAccessibleFixedText(this); } diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx index a80eef6c7603..1221417add15 100644 --- a/vcl/source/control/fixedhyper.cxx +++ b/vcl/source/control/fixedhyper.cxx @@ -83,7 +83,7 @@ bool FixedHyperlink::ImplIsOverText(Point aPosition) const return bIsOver; } -css::uno::Reference<css::accessibility::XAccessible> FixedHyperlink::CreateAccessible() +rtl::Reference<comphelper::OAccessible> FixedHyperlink::CreateAccessible() { return new VCLXAccessibleFixedHyperlink(this); } diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx index c32b1bf1b552..b34c3ae36203 100644 --- a/vcl/source/control/ivctrl.cxx +++ b/vcl/source/control/ivctrl.cxx @@ -340,7 +340,8 @@ void SvtIconChoiceCtrl::CallImplEventListeners(VclEventId nEvent, void* pData) { CallEventListeners(nEvent, pData); } -css::uno::Reference< XAccessible > SvtIconChoiceCtrl::CreateAccessible() + +rtl::Reference<comphelper::OAccessible> SvtIconChoiceCtrl::CreateAccessible() { return new AccessibleIconChoiceCtrl(*this); } diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index bd209e3d9c00..5a71a6d951b7 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -317,7 +317,7 @@ void ListBox::ToggleDropDown() } } -css::uno::Reference<css::accessibility::XAccessible> ListBox::CreateAccessible() +rtl::Reference<comphelper::OAccessible> ListBox::CreateAccessible() { const bool bIsDropDownBox = (GetStyle() & WB_DROPDOWN) == WB_DROPDOWN; if (bIsDropDownBox) diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 7e8dc1939859..d0252cf1cf97 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -927,7 +927,7 @@ tools::Rectangle ScrollBar::GetScrollbarRegion() const return tools::Rectangle(Point(0, 0), GetOutputSizePixel()); } -css::uno::Reference<css::accessibility::XAccessible> ScrollBar::CreateAccessible() +rtl::Reference<comphelper::OAccessible> ScrollBar::CreateAccessible() { return new VCLXAccessibleScrollBar(this); } diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx index 288bee3f39c2..bd4eaec8532f 100644 --- a/vcl/source/treelist/headbar.cxx +++ b/vcl/source/treelist/headbar.cxx @@ -1276,7 +1276,7 @@ Size HeaderBar::CalcWindowSizePixel() const return aSize; } -css::uno::Reference< css::accessibility::XAccessible > HeaderBar::CreateAccessible() +rtl::Reference<comphelper::OAccessible> HeaderBar::CreateAccessible() { if (!mpAccessible.is()) { diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index 3e26b21daae4..5882e37229bb 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -1095,7 +1095,7 @@ vcl::Window* SvHeaderTabListBox::GetWindowInstance() return this; } -Reference< XAccessible > SvHeaderTabListBox::CreateAccessible() +rtl::Reference<comphelper::OAccessible> SvHeaderTabListBox::CreateAccessible() { if (m_xAccessible.is()) return m_xAccessible; diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 98b10083934e..a9768badfe12 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -3489,14 +3489,13 @@ void SvTreeListBox::InitSettings() pCheckButtonData->SetDefaultImages(*this); } -css::uno::Reference< XAccessible > SvTreeListBox::CreateAccessible() +rtl::Reference<comphelper::OAccessible> SvTreeListBox::CreateAccessible() { - css::uno::Reference< XAccessible > xAccessible; css::uno::Reference<XAccessible> xAccParent = GetAccessibleParent(); if ( xAccParent.is() ) - xAccessible = new AccessibleListBox(*this, xAccParent); + return new AccessibleListBox(*this, xAccParent); - return xAccessible; + return {}; } void SvTreeListBox::FillAccessibleEntryStateSet( SvTreeListEntry* pEntry, sal_Int64& rStateSet ) const diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index 061b4181280d..8d2a718176be 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -90,7 +90,7 @@ bool hasFloatingChild(vcl::Window *pWindow) } }; -css::uno::Reference< css::accessibility::XAccessible > Window::CreateAccessible() +rtl::Reference<comphelper::OAccessible> Window::CreateAccessible() { const WindowType eType = GetType(); diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 6d794ef00a27..204826e43749 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -435,7 +435,7 @@ private: public: ImplPopupFloatWin( vcl::Window* pParent, bool bToolBox ); virtual ~ImplPopupFloatWin() override; - virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; }; ImplPopupFloatWin::ImplPopupFloatWin( vcl::Window* pParent, bool bToolBox ) : @@ -449,7 +449,7 @@ ImplPopupFloatWin::~ImplPopupFloatWin() disposeOnce(); } -css::uno::Reference< css::accessibility::XAccessible > ImplPopupFloatWin::CreateAccessible() +rtl::Reference<comphelper::OAccessible> ImplPopupFloatWin::CreateAccessible() { if ( !mbToolBox ) return FloatingWindow::CreateAccessible(); @@ -460,7 +460,7 @@ css::uno::Reference< css::accessibility::XAccessible > ImplPopupFloatWin::Create // as this window is only used as a helper for subtoolbars that are not teared-off, the parent toolbar // has to provide accessibility support (as implemented in the toolkit) // so the contained toolbar should appear as child of the corresponding toolbar item of the parent toolbar - return css::uno::Reference< css::accessibility::XAccessible >(); + return {}; } ImplDockingWindowWrapper::ImplDockingWindowWrapper( const vcl::Window *pWindow ) diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 849e179097b9..086664c127a1 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -1113,14 +1113,12 @@ void MenuBarWindow::GetFocus() } } -css::uno::Reference<css::accessibility::XAccessible> MenuBarWindow::CreateAccessible() +rtl::Reference<comphelper::OAccessible> MenuBarWindow::CreateAccessible() { - css::uno::Reference<css::accessibility::XAccessible> xAcc; - if (m_pMenu) - xAcc = m_pMenu->GetAccessible(); + return m_pMenu->GetAccessible(); - return xAcc; + return {}; } sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link<MenuBarButtonCallbackArg&,bool>& i_rLink, const OUString& i_rToolTip ) diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx index 8b919a939a11..3b841b4680ef 100644 --- a/vcl/source/window/menubarwindow.hxx +++ b/vcl/source/window/menubarwindow.hxx @@ -124,7 +124,7 @@ public: void KillActivePopup(); void PopupClosed(Menu const * pMenu); sal_uInt16 GetHighlightedItem() const { return m_nHighlightedItem; } - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; void SetAutoPopup(bool bAuto) { mbAutoPopup = bAuto; } void LayoutChanged(); diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index a644ad76e15a..d5a94532502d 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -1323,14 +1323,12 @@ void MenuFloatingWindow::Command( const CommandEvent& rCEvt ) } } -css::uno::Reference<css::accessibility::XAccessible> MenuFloatingWindow::CreateAccessible() +rtl::Reference<comphelper::OAccessible> MenuFloatingWindow::CreateAccessible() { - css::uno::Reference<css::accessibility::XAccessible> xAcc; - if (pMenu && !pMenu->pStartedFrom) - xAcc = pMenu->GetAccessible(); + return pMenu->GetAccessible(); - return xAcc; + return {}; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx index c97e28177b5d..df353338bef3 100644 --- a/vcl/source/window/menufloatingwindow.hxx +++ b/vcl/source/window/menufloatingwindow.hxx @@ -121,7 +121,7 @@ public: bool MenuInHierarchyHasFocus() const; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; + virtual rtl::Reference<comphelper::OAccessible> CreateAccessible() override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 84e2582b43d1..6a50c9beb656 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -330,7 +330,7 @@ void ToolBox::ImplUpdateItem( ImplToolItems::size_type nIndex ) } } -css::uno::Reference<css::accessibility::XAccessible> ToolBox::CreateAccessible() +rtl::Reference<comphelper::OAccessible> ToolBox::CreateAccessible() { return new VCLXAccessibleToolBox(this); }