summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@pardus.org.tr>2017-09-24 21:14:44 +0000
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-25 14:05:06 +0200
commit7810858ee6cac233ce5868de1f2ef5de1d443af4 (patch)
treec07388d10a2fba2083cca8aa5c82289df4f8fdaa /pyuno
parent81e60100ca8995be9d1c98167935245d878c446f (diff)
tdf#57950: Replace chained OUStringBuffer::append() with operator+
Change-Id: Ibf9d3b24b0caa6b84f403d7bbbc90912fe64a559 Reviewed-on: https://gerrit.libreoffice.org/42728 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/pyuno_adapter.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx
index 52f7577c550b..ebb6204bb7ea 100644
--- a/pyuno/source/module/pyuno_adapter.cxx
+++ b/pyuno/source/module/pyuno_adapter.cxx
@@ -238,12 +238,13 @@ Any Adapter::invoke( const OUString &aFunctionName,
raiseInvocationTargetExceptionWhenNeeded( runtime);
if( !method.is() )
{
- OUStringBuffer buf;
- buf.append( "pyuno::Adapter: Method " ).append( aFunctionName );
- buf.append( " is not implemented at object " );
PyRef str( PyObject_Repr( mWrappedObject.get() ), SAL_NO_ACQUIRE );
- buf.append(pyString2ustring(str.get()));
- throw IllegalArgumentException( buf.makeStringAndClear(), Reference< XInterface > (),0 );
+
+ OUString sMsg = "pyuno::Adapter: Method "
+ + aFunctionName
+ + " is not implemented at object "
+ + pyString2ustring(str.get());
+ throw IllegalArgumentException( sMsg, Reference< XInterface > (),0 );
}
PyRef pyRet( PyObject_CallObject( method.get(), argsTuple.get() ), SAL_NO_ACQUIRE );
@@ -276,15 +277,14 @@ Any Adapter::invoke( const OUString &aFunctionName,
if( aOutParamIndex.getLength() +1 != seq.getLength() )
{
- OUStringBuffer buf;
- buf.append( "pyuno bridge: expected for method " );
- buf.append( aFunctionName );
- buf.append( " one return value and " );
- buf.append( aOutParamIndex.getLength() );
- buf.append( " out parameters, got a sequence of " );
- buf.append( seq.getLength() );
- buf.append( " elements as return value." );
- throw RuntimeException(buf.makeStringAndClear(), *this );
+ OUString sMsg = "pyuno bridge: expected for method "
+ + aFunctionName
+ + " one return value and "
+ + OUString::number(aOutParamIndex.getLength())
+ + " out parameters, got a sequence of "
+ + OUString::number(seq.getLength())
+ + " elements as return value.";
+ throw RuntimeException( sMsg, *this );
}
aOutParam.realloc( aOutParamIndex.getLength() );