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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user