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.weghorn@posteo.de>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user