diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-01-17 18:26:34 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-01-18 07:09:42 +0100 |
commit | c915fdbfc77ac78d543bc097cd809edd7e6da8cb (patch) | |
tree | 8b3db5bc7fb450404e80a72105da1cdb4c6db62a /svtools/source/control/valueacc.cxx | |
parent | 110025afab3946586826b18a316416fba41dc1f6 (diff) |
Replace OUStringBuffer in valueacc (svtools)
Change-Id: I8b40c0c29154e8b4162e55dc202bfb0233c79a61
Reviewed-on: https://gerrit.libreoffice.org/48072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'svtools/source/control/valueacc.cxx')
-rw-r--r-- | svtools/source/control/valueacc.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
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(); } |