[Libreoffice-commits] core.git: svtools/source

Julien Nabet serval2412 at yahoo.fr
Thu Jan 18 06:10:04 UTC 2018


 svtools/source/control/valueacc.cxx |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

New commits:
commit c915fdbfc77ac78d543bc097cd809edd7e6da8cb
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Jan 17 18:26:34 2018 +0100

    Replace OUStringBuffer in valueacc (svtools)
    
    Change-Id: I8b40c0c29154e8b4162e55dc202bfb0233c79a61
    Reviewed-on: https://gerrit.libreoffice.org/48072
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index f208fa1e0d0c..f4ef3fa90dec 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -829,21 +829,16 @@ OUString SAL_CALL ValueItemAcc::getAccessibleDescription()
 OUString SAL_CALL ValueItemAcc::getAccessibleName()
 {
     const SolarMutexGuard aSolarGuard;
-    OUString aRet;
 
     if( mpParent )
     {
-        aRet = mpParent->maText;
-
-        if( aRet.isEmpty() )
-        {
-            OUStringBuffer aBuffer("Item ");
-            aBuffer.append(static_cast<sal_Int32>(mpParent->mnId));
-            aRet = aBuffer.makeStringAndClear();
-        }
+        if (mpParent->maText.isEmpty())
+            return "Item " +  OUString::number(static_cast<sal_Int32>(mpParent->mnId));
+        else
+            return mpParent->maText;
     }
 
-    return aRet;
+    return OUString();
 }
 
 


More information about the Libreoffice-commits mailing list