svx a11y: Avoid querying for XComponent iface

In SvxGraphCtrlAccessibleContext::disposing, use a reference
to the concrete accessibility::AccessibleShape instead of
the abstract XAccessible UNO interface from the start, which
drops the need to explicitly query for the XComponent interface.

Change-Id: I943c03ecbf801b3fff0592996ce3d0af352cd3d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211186
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit is contained in:
Michael Weghorn
2026-09-20 22:12:56 +02:00
parent 0052f68196
commit 9a9fdf2ff6
@@ -460,10 +460,9 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::disposing()
{
for (const auto& rEntry : mxShapes)
{
rtl::Reference<XAccessible> pAcc(rEntry.second);
Reference< XComponent > xComp( pAcc.get(), UNO_QUERY );
if( xComp.is() )
xComp->dispose();
rtl::Reference<::accessibility::AccessibleShape> pAcc(rEntry.second);
if (pAcc.is())
pAcc->dispose();
}
mxShapes.clear();