summaryrefslogtreecommitdiff
path: root/bridges/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 12:24:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 18:25:31 +0200
commit04aafba860f613c20e7078d038cc83eb02de0b54 (patch)
tree8153152b87089419bde17313d9ac7b9de6fcce32 /bridges/source
parent76c793d2acf66f46e9edcda43d2f4327e8374841 (diff)
loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive variant of this plugin Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'bridges/source')
-rw-r--r--bridges/source/cpp_uno/shared/component.cxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx
index 5bdb0bb561eb..cef72d8b6a8e 100644
--- a/bridges/source/cpp_uno/shared/component.cxx
+++ b/bridges/source/cpp_uno/shared/component.cxx
@@ -87,18 +87,15 @@ static void s_stub_computeObjectIdentifier(va_list * pParam)
if (xHome.is())
{
// interface
- OUStringBuffer oid( 64 );
- oid.append( reinterpret_cast< sal_Int64 >(xHome.get()), 16 );
- oid.append( ';' );
- // ;environment[context]
- oid.append( OUString::unacquired(&pEnv->aBase.pTypeName) );
- oid.append( '[' );
- oid.append(
- reinterpret_cast< sal_Int64 >(pEnv->aBase.pContext),
- 16 );
- // ];good guid
- oid.append( cppu_cppenv_getStaticOIdPart() );
- OUString aRet( oid.makeStringAndClear() );
+ OUString aRet =
+ OUString::number( reinterpret_cast< sal_Int64 >(xHome.get()), 16 ) +
+ ";" +
+ // ;environment[context]
+ OUString::unacquired(&pEnv->aBase.pTypeName) +
+ "[" +
+ OUString::number( reinterpret_cast< sal_Int64 >(pEnv->aBase.pContext), 16 ) +
+ // ];good guid
+ cppu_cppenv_getStaticOIdPart();
*ppOId = aRet.pData;
::rtl_uString_acquire( *ppOId );
}