summaryrefslogtreecommitdiffstats
path: root/pyuno/source/module/pyuno_runtime.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-20 13:55:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-21 06:05:38 +0000
commit657f067b917169f41a8432c8f329877f6e50c3f6 (patch)
tree029c5ade03fecbe0b6cee67680bd2904f2964be8 /pyuno/source/module/pyuno_runtime.cxx
parenttry to fix "random config" tb (diff)
downloadcore-657f067b917169f41a8432c8f329877f6e50c3f6.tar.gz
core-657f067b917169f41a8432c8f329877f6e50c3f6.zip
remove some unnecessary OUStringBuffer usage
Change-Id: Iae9146a3be569107019d9c5af404b94e51e76cd5 Reviewed-on: https://gerrit.libreoffice.org/34469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'pyuno/source/module/pyuno_runtime.cxx')
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 755a6dc46a75..69e5a1732605 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -464,11 +464,8 @@ PyRef Runtime::any2PyObject (const Any &a ) const
}
}
}
- OUStringBuffer buf;
- buf.append( "Any carries enum " );
- buf.append( a.getValueType().getTypeName());
- buf.append( " with invalid value " ).append( l );
- throw RuntimeException( buf.makeStringAndClear() );
+ throw RuntimeException( "Any carries enum " + a.getValueType().getTypeName() +
+ " with invalid value " + OUString::number(l) );
}
case typelib_TypeClass_EXCEPTION:
case typelib_TypeClass_STRUCT:
@@ -480,10 +477,8 @@ PyRef Runtime::any2PyObject (const Any &a ) const
PyRef ret( PyObject_CallObject( excClass.get() , argsTuple.get() ), SAL_NO_ACQUIRE );
if( ! ret.is() )
{
- OUStringBuffer buf;
- buf.append( "Couldn't instantiate python representation of structured UNO type " );
- buf.append( a.getValueType().getTypeName() );
- throw RuntimeException( buf.makeStringAndClear() );
+ throw RuntimeException( "Couldn't instantiate python representation of structured UNO type " +
+ a.getValueType().getTypeName() );
}
if( auto e = o3tl::tryAccess<css::uno::Exception>(a) )
@@ -550,10 +545,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
}
default:
{
- OUStringBuffer buf;
- buf.append( "Unknown UNO type class " );
- buf.append( (sal_Int32 ) a.getValueTypeClass() );
- throw RuntimeException(buf.makeStringAndClear( ) );
+ throw RuntimeException( "Unknown UNO type class " + OUString::number(a.getValueTypeClass()) );
}
}
}