From 9a9fdf2ff6da01bcd6a2500865b22b6b9ea61d0f Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Sat, 19 Sep 2026 00:45:01 +0200 Subject: [PATCH] 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 Tested-by: Jenkins --- svx/source/accessibility/GraphCtlAccessibleContext.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 486f2f4ee082..db1fcb16e2ec 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -460,10 +460,9 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::disposing() { for (const auto& rEntry : mxShapes) { - rtl::Reference 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();