diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-01-05 12:05:50 +0000 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-01-06 10:09:35 +0100 |
commit | 7210a9d712b156d68627b5510bd2f2404d6fd657 (patch) | |
tree | e8644a9c89c3d4a508e278581d853f8e22a48d18 /winaccessibility | |
parent | d99efe24213400932b97e47b131049fcbbfac612 (diff) |
wina11y: Use separate local variable for action description
Use a separate local variable for the accessible
*action* description here, which is independent of
the accessible description handled above.
While at it, use '!OUString::isEmpty' instead of
'OUString::getLength() > 0'.
Change-Id: I146d8603ed3decde68f8ce716ac13c04b0263040
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128004
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/source/service/AccObject.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 9b6609666ee6..b69507486e25 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -771,10 +771,10 @@ void AccObject::UpdateActionDesc() if (!(Role == SPIN_BOX || Role == COMBO_BOX || Role == DATE_EDITOR || Role == EDIT_BAR || Role == PASSWORD_TEXT || Role == TEXT)) { - pXString = m_xAccActionRef->getAccessibleActionDescription( 0 ); - //Solution: if string length is more than zero, action is set. - if( pXString.getLength() > 0) - m_pIMAcc->Put_ActionDescription( o3tl::toW(pXString.getStr()) ); + const OUString sActionDesc = m_xAccActionRef->getAccessibleActionDescription(0); + // if string is non-empty, action is set. + if (!sActionDesc.isEmpty()) + m_pIMAcc->Put_ActionDescription(o3tl::toW(sActionDesc.getStr())); } } } |