vcl a11y: Use comphelper::disposeComponent

Change-Id: Ifc63db272484e9a7986e6113989f2f6274f40349
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177846
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn 2024-12-05 10:20:14 +01:00
parent 0e88a69ff0
commit ab38826d90

View file

@ -24,6 +24,7 @@
#include <comphelper/diagnose_ex.hxx> #include <comphelper/diagnose_ex.hxx>
#include <sal/log.hxx> #include <sal/log.hxx>
#include <comphelper/types.hxx>
#include <comphelper/lok.hxx> #include <comphelper/lok.hxx>
#include <vcl/dialoghelper.hxx> #include <vcl/dialoghelper.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
@ -199,12 +200,7 @@ void Menu::dispose()
} }
// dispose accessible components // dispose accessible components
if ( mxAccessible.is() ) comphelper::disposeComponent(mxAccessible);
{
css::uno::Reference< css::lang::XComponent> xComponent( mxAccessible, css::uno::UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
}
if ( nEventId ) if ( nEventId )
Application::RemoveUserEvent( nEventId ); Application::RemoveUserEvent( nEventId );