svx/source/accessibility/AccessibleControlShape.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 74153b0a6fc50ea3653f2925ee6695b490b25d8b
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed May 21 10:41:24 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu May 22 05:49:20 2025 +0200

    svx: Drop unnecessary detour to get shape XAccessible
    
    AccessibleControlShape implements both, the XAccessible and the
    XAccessibleContext interfaces itself, and its
    XAccessible::getAccessibleContext implementation
    (in the base class AccessibleContextBase::getAccessibleContext)
    returns `this`, so just use the `pCtlAccShape` directly.
    
    Change-Id: Idd272a76770d8dcf3ed5e7f82bccc180e69fe8c4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185596
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/svx/source/accessibility/AccessibleControlShape.cxx 
b/svx/source/accessibility/AccessibleControlShape.cxx
index 5582a9330a72..84df1087e890 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -550,9 +550,7 @@ Reference< XAccessibleRelationSet > SAL_CALL 
AccessibleControlShape::getAccessib
     AccessibleControlShape* pCtlAccShape = GetLabeledByControlShape();
     if(pCtlAccShape)
     {
-        Reference < XAccessible > xAcc (pCtlAccShape->getAccessibleContext(), 
UNO_QUERY);
-
-        css::uno::Sequence<css::uno::Reference<XAccessible>> aSequence { xAcc 
};
+        css::uno::Sequence<css::uno::Reference<XAccessible>> aSequence { 
pCtlAccShape };
         if( getAccessibleRole() == AccessibleRole::RADIO_BUTTON )
         {
             pRelationSetHelper->AddRelation( AccessibleRelation( 
AccessibleRelationType_MEMBER_OF, aSequence ) );

Reply via email to