summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-05 20:54:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-06 07:57:13 +0100
commitf0356b6128bb4e78041d53025ad7c2e0b8e0c299 (patch)
treeee2d16dc7f94f814d63675493605e4eb4c3db569 /pyuno
parentad66197f9e18da53afb42042bd0c86e0f3d94675 (diff)
loplugin:stringbuffer
Change-Id: Id6f7268f12eb728dbb255aa19cd590b6813c4f01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/pyuno.cxx20
-rw-r--r--pyuno/source/module/pyuno_module.cxx4
-rw-r--r--pyuno/source/module/pyuno_util.cxx6
3 files changed, 15 insertions, 15 deletions
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index 25ae588d6d58..4cfdab9982d0 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -93,13 +93,13 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
return "void";
OUStringBuffer buf( 64 );
- buf.append( "(" + OUString::unacquired(&pTypeRef->pTypeName) + ")" );
+ buf.append( "(" ).append( OUString::unacquired(&pTypeRef->pTypeName) ).append( ")" );
switch (pTypeRef->eTypeClass)
{
case typelib_TypeClass_INTERFACE:
{
- buf.append( "0x" +
+ buf.append( "0x" ).append(
OUString::number( reinterpret_cast< sal_IntPtr >(*static_cast<void * const *>(pVal)), 16 ));
if( VAL2STR_MODE_DEEP == mode )
{
@@ -162,7 +162,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
for ( sal_Int32 nPos = 0; nPos < nDescr; ++nPos )
{
- buf.append( OUString::unacquired(&ppMemberNames[nPos]) + " = " );
+ buf.append( OUString::unacquired(&ppMemberNames[nPos]) ).append( " = " );
typelib_TypeDescription * pMemberType = nullptr;
TYPELIB_DANGER_GET( &pMemberType, ppTypeRefs[nPos] );
buf.append( val2str( static_cast<char const *>(pVal) + pMemberOffsets[nPos], pMemberType->pWeakRef, mode ) );
@@ -219,8 +219,8 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
buf.append( (*static_cast<typelib_TypeDescriptionReference * const *>(pVal))->pTypeName );
break;
case typelib_TypeClass_STRING:
- buf.append( "\"" +
- OUString::unacquired(&*static_cast<rtl_uString * const *>(pVal)) +
+ buf.append( "\"").append(
+ OUString::unacquired(&*static_cast<rtl_uString * const *>(pVal)) ).append(
"\"" );
break;
case typelib_TypeClass_ENUM:
@@ -261,23 +261,23 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
buf.append( *static_cast<double const *>(pVal) );
break;
case typelib_TypeClass_BYTE:
- buf.append( "0x" +
+ buf.append( "0x").append(
OUString::number( static_cast<sal_Int32>(*static_cast<sal_Int8 const *>(pVal)), 16 ));
break;
case typelib_TypeClass_SHORT:
- buf.append( "0x" +
+ buf.append( "0x").append(
OUString::number( static_cast<sal_Int32>(*static_cast<sal_Int16 const *>(pVal)), 16 ));
break;
case typelib_TypeClass_UNSIGNED_SHORT:
- buf.append( "0x" +
+ buf.append( "0x").append(
OUString::number( static_cast<sal_Int32>(*static_cast<sal_uInt16 const *>(pVal)), 16 ));
break;
case typelib_TypeClass_LONG:
- buf.append( "0x" +
+ buf.append( "0x").append(
OUString::number( *static_cast<sal_Int32 const *>(pVal), 16 ));
break;
case typelib_TypeClass_UNSIGNED_LONG:
- buf.append( "0x" +
+ buf.append( "0x").append(
OUString::number( static_cast<sal_Int64>(*static_cast<sal_uInt32 const *>(pVal)), 16 ));
break;
case typelib_TypeClass_HYPER:
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index cb2824d00005..34141029ab58 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -112,10 +112,10 @@ public:
if (initialised[key])
{
OUStringBuffer buf;
- buf.append( "pyuno._createUnoStructHelper: member '" + key + "'");
+ buf.append( "pyuno._createUnoStructHelper: member '").append(key).append("'");
if ( pos >= 0 )
{
- buf.append( " at position " + OUString::number(pos));
+ buf.append( " at position ").append(OUString::number(pos));
}
buf.append( " initialised multiple times.");
throw RuntimeException(buf.makeStringAndClear());
diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx
index 77006c33acac..f7cb6a9f4c79 100644
--- a/pyuno/source/module/pyuno_util.cxx
+++ b/pyuno/source/module/pyuno_util.cxx
@@ -151,7 +151,7 @@ void logException( RuntimeCargo *cargo, const char *intro,
OUStringBuffer buf( 128 );
buf.appendAscii( intro );
appendPointer(buf, ptr);
- buf.append( "]." + aFunctionName + " = " );
+ buf.append( "]." ).append( aFunctionName ).append( " = " );
buf.append(
val2str( data, type.getTypeLibType(), VAL2STR_MODE_SHALLOW ) );
log( cargo,LogLevel::CALL, buf.makeStringAndClear() );
@@ -170,7 +170,7 @@ void logReply(
OUStringBuffer buf( 128 );
buf.appendAscii( intro );
appendPointer(buf, ptr);
- buf.append( "]." + aFunctionName + "()=" );
+ buf.append( "]." ).append( aFunctionName ).append( "()=" );
if( isLog( cargo, LogLevel::ARGS ) )
{
buf.append(
@@ -192,7 +192,7 @@ void logCall( RuntimeCargo *cargo, const char *intro,
OUStringBuffer buf( 128 );
buf.appendAscii( intro );
appendPointer(buf, ptr);
- buf.append( "]." + aFunctionName + "(" );
+ buf.append( "]." ).append( aFunctionName ).append( "(" );
if( isLog( cargo, LogLevel::ARGS ) )
{
for( int i = 0; i < aParams.getLength() ; i ++ )