a11y: Update comment wrt reference being (not) weak

This was using a weak reference when the comment
was added in

    commit 9b34eb7c85
    Author: Frank Schönheit <fs@openoffice.org>
    Date:   Thu Apr 25 10:24:33 2002 +0000

        #98750# be an XEventListener at the AccessibleContext

, but later changed to be a hard reference in

    commit 23d689d4e4
    Author: Thomas Benisch <tbe@openoffice.org>
    Date:   Thu Nov 7 16:19:24 2002 +0000

        #103674# change the reference to the accessible context from weak to hard

. Unfortunately that commit only references a StarDivision
internal ticket, so the exact reason remains unclear,
but at least update the comment.

Change-Id: Icdc9aec97647ae05ae7fb3f2bdc1be43c3a62619
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177848
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn 2024-12-05 10:28:17 +01:00
parent ab38826d90
commit 8a762c35ea

View file

@ -2418,8 +2418,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > VCLXWindow::getAcc
mpImpl->mxAccessibleContext = CreateAccessibleContext(); mpImpl->mxAccessibleContext = CreateAccessibleContext();
// add as event listener to this component // add as event listener to this component
// in case somebody disposes it, we do not want to have a (though weak) reference to a dead // in case somebody disposes it, we do not want to have a reference to a dead object
// object
uno::Reference< lang::XComponent > xComp( mpImpl->mxAccessibleContext, uno::UNO_QUERY ); uno::Reference< lang::XComponent > xComp( mpImpl->mxAccessibleContext, uno::UNO_QUERY );
if ( xComp.is() ) if ( xComp.is() )
xComp->addEventListener( this ); xComp->addEventListener( this );