diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-01-05 13:41:53 +0000 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-01-06 10:10:11 +0100 |
commit | fcf4a26275d7503835f9aa23cb94938809840300 (patch) | |
tree | a0309a62d9cd949b85fe1dd391822f2b63188003 /winaccessibility/source/service/AccObject.cxx | |
parent | e9b6eedd66257decf7ac36b71b06e91609f1e02e (diff) |
tdf#146306 wina11y: Retrieve accessible desc on demand
Adapt 'MAccessible::get_accDescription' to directly
retrieve the accessible description on demand via the
corresponding XAccessible, rather than keeping
track of it in a class member.
This simplifies the handling and makes it
unnecessary to "manually" update the description
on 'accessibility::AccessibleEventId::DESCRIPTION_CHANGED'
events, since the new value will
be queried next time it is needed anyway.
This also fixes the problem that a significant
amount of time was spent generating accessible
descriptions for all newly inserted a11y objects when
entering values into Calc cells with the NVDA
screen reader in use, resulting in several
seconds of delay.
Querying up-to-date values from the underlying
UNO interfaces on demand instead of doing extra
manual bookkeeping in the winaccessibility code
may be possible for more a11y attributes in addition
to the accessible description handled in this commit,
but each one will have to be looked at separately.
Change-Id: I57f4c523ca8b10afad3f9c347c8ff5e9420ad968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128006
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility/source/service/AccObject.cxx')
-rw-r--r-- | winaccessibility/source/service/AccObject.cxx | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index e9ca101207fe..781c58c82e71 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -285,22 +285,6 @@ void AccObject::UpdateName( ) return ; } -/** - * Update description property to com object. - * no content for update description - * @param - * @return - */ -void AccObject::UpdateDescription() -{ - if (!m_pIMAcc) - { - return; - } - - m_pIMAcc->Put_XAccDescription(o3tl::toW(m_xAccContextRef->getAccessibleDescription().getStr())); - return ; -} /** * Update default action property to com object. @@ -502,18 +486,6 @@ void AccObject::SetName( Any pAny) } /** - * Set description property via pAny. - * @param pAny New accessible description. - * @return - */ -void AccObject::SetDescription( Any pAny ) -{ - if( nullptr == m_pIMAcc ) - return ; - m_pIMAcc->Put_XAccDescription( o3tl::toW(GetMAccessibleValueFromAny(pAny).getStr()) ); -} - -/** * Set role property via pAny * @param Role New accessible role. * @return @@ -1023,8 +995,6 @@ bool AccObject:: UpdateAccessibleInfoFromUnoToMSAA ( ) UpdateValue(); - UpdateDescription(); - UpdateActionDesc(); UpdateRole(); |