winaccessibility/source/service/AccObject.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6b32bda33bee7b56d43f34adb23bcd60d8a1b1b9
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Jan 5 12:05:50 2022 +0000
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Jan 11 10:00:07 2022 +0100

    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.wegh...@posteo.de>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128251

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()));
                 }
             }
         }

Reply via email to