diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-23 12:03:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-23 15:06:00 +0200 |
commit | e7bc3cab019fbf040f9fb8b53ae2cf3f977d200b (patch) | |
tree | bc507bccee9fb71134e362b72d22991561e32aa0 /pyuno/source/module/pyuno_adapter.cxx | |
parent | c5d47c327a57df55fa3dac0fff6b65888d0345e4 (diff) |
remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.
Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
Diffstat (limited to 'pyuno/source/module/pyuno_adapter.cxx')
-rw-r--r-- | pyuno/source/module/pyuno_adapter.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx index 934f3130d3a9..30b89ffb533a 100644 --- a/pyuno/source/module/pyuno_adapter.cxx +++ b/pyuno/source/module/pyuno_adapter.cxx @@ -123,8 +123,7 @@ Sequence< sal_Int16 > Adapter::getOutIndexes( const OUString & functionName ) if( !introspection.is() ) { throw RuntimeException( - OUString( "pyuno bridge: Couldn't inspect uno adapter ( the python class must implement com.sun.star.lang.XTypeProvider !)" ), - Reference< XInterface > () ); + "pyuno bridge: Couldn't inspect uno adapter ( the python class must implement com.sun.star.lang.XTypeProvider !)" ); } Reference< XIdlMethod > method = introspection->getMethod( @@ -132,8 +131,7 @@ Sequence< sal_Int16 > Adapter::getOutIndexes( const OUString & functionName ) if( ! method.is( ) ) { throw RuntimeException( - "pyuno bridge: Couldn't get reflection for method " + functionName, - Reference< XInterface > () ); + "pyuno bridge: Couldn't get reflection for method " + functionName ); } Sequence< ParamInfo > seqInfo = method->getParameterInfos(); @@ -263,8 +261,7 @@ Any Adapter::invoke( const OUString &aFunctionName, if( ! ( ret >>= seq ) ) { throw RuntimeException( - "pyuno bridge: Couldn't extract out parameters for method " + aFunctionName, - Reference< XInterface > () ); + "pyuno bridge: Couldn't extract out parameters for method " + aFunctionName ); } if( aOutParamIndex.getLength() +1 != seq.getLength() ) @@ -352,7 +349,7 @@ void Adapter::setValue( const OUString & aPropertyName, const Any & value ) OUStringBuffer buf; buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName ); buf.appendAscii( " is unknown." ); - throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface > () ); + throw UnknownPropertyException( buf.makeStringAndClear() ); } PyThreadAttach guard( mInterpreter ); @@ -389,7 +386,7 @@ Any Adapter::getValue( const OUString & aPropertyName ) OUStringBuffer buf; buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName ); buf.appendAscii( " is unknown." ); - throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface > () ); + throw UnknownPropertyException( buf.makeStringAndClear() ); } ret = runtime.pyObject2Any( pyRef ); } |