include/svx/fmgridif.hxx | 2 -- svx/source/fmcomp/fmgridif.cxx | 30 ------------------------------ 2 files changed, 32 deletions(-)
New commits: commit cbce194ae57d2c83fa8c191868733cb9f46221fb Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon May 26 09:36:05 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed May 28 18:02:09 2025 +0200 svx a11y: Drop FmXGridPeer::CreateAccessibleContext As far as I can understand, this custom override of VCLXWindow::CreateAccessibleContext should in the end have no effect, because VCLXWindow::CreateAccessibleContext only gets called if the window doesn't have an accessible yet that's different from the FmXGridPeer, see Window::GetAccessible. Change-Id: I958e3634a074bcf9cd6639bd6942ec0fb8ff920b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185840 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/include/svx/fmgridif.hxx b/include/svx/fmgridif.hxx index e3011cda8dae..c31297631452 100644 --- a/include/svx/fmgridif.hxx +++ b/include/svx/fmgridif.hxx @@ -426,8 +426,6 @@ public: // VCLXWindow virtual void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override; virtual css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override; - virtual css::uno::Reference< css::accessibility::XAccessibleContext > - CreateAccessibleContext() override; // css::form::XGridControl virtual void SAL_CALL addGridControlListener( const css::uno::Reference< css::form::XGridControlListener >& _listener ) override; diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 9326f6b3c6ee..6e5594054364 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1957,36 +1957,6 @@ void FmXGridPeer::setProperty( const OUString& PropertyName, const Any& Value) VCLXWindow::setProperty( PropertyName, Value ); } - -Reference< XAccessibleContext > FmXGridPeer::CreateAccessibleContext() -{ - Reference< XAccessibleContext > xContext; - - // use the AccessibleContext provided by the VCL window - VclPtr<vcl::Window> pGrid = GetWindow(); - if ( pGrid ) - { - Reference< XAccessible > xAcc( pGrid->GetAccessible() ); - if ( xAcc.is() ) - xContext = xAcc->getAccessibleContext(); - // TODO: this has a slight conceptual problem: - - // We know that the XAccessible and XAccessibleContext implementation of the browse - // box is the same (the class implements both interfaces), which, speaking strictly, - // is bad here (means when a browse box acts as UnoControl): We (the FmXGridPeer) are - // the XAccessible here, and the browse box should be able to provide us an XAccessibleContext, - // but it should _not_ be the XAccessible itself. - // However, as long as no client implementation uses dirty hacks such as querying an - // XAccessibleContext for XAccessible, this should not be a problem. - } - - if ( !xContext.is() ) - xContext = VCLXWindow::CreateAccessibleContext( ); - - return xContext; -} - - Any FmXGridPeer::getProperty( const OUString& _rPropertyName ) { Any aProp;