Kaydet (Commit) 714f4db8 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Replace remaining getCppuType et al with cppu::UnoType

Change-Id: Id848d14133fee5104e79ba0683cbaf942598faa7
üst cf93af5e
...@@ -314,7 +314,7 @@ Any Adapter::invoke( const OUString &aFunctionName, ...@@ -314,7 +314,7 @@ Any Adapter::invoke( const OUString &aFunctionName,
{ {
logException( logException(
cargo, "except uno->py[0x" , cargo, "except uno->py[0x" ,
mWrappedObject.get(), aFunctionName, &e,getCppuType(&e) ); mWrappedObject.get(), aFunctionName, &e,cppu::UnoType<decltype(e)>::get() );
} }
throw; throw;
} }
...@@ -324,7 +324,7 @@ Any Adapter::invoke( const OUString &aFunctionName, ...@@ -324,7 +324,7 @@ Any Adapter::invoke( const OUString &aFunctionName,
{ {
logException( logException(
cargo, "except uno->py[0x" , cargo, "except uno->py[0x" ,
mWrappedObject.get(), aFunctionName, &e,getCppuType(&e) ); mWrappedObject.get(), aFunctionName, &e,cppu::UnoType<decltype(e)>::get() );
} }
throw; throw;
} }
...@@ -334,7 +334,7 @@ Any Adapter::invoke( const OUString &aFunctionName, ...@@ -334,7 +334,7 @@ Any Adapter::invoke( const OUString &aFunctionName,
{ {
logException( logException(
cargo, "except uno->py[0x" , cargo, "except uno->py[0x" ,
mWrappedObject.get(), aFunctionName, &e,getCppuType(&e) ); mWrappedObject.get(), aFunctionName, &e,cppu::UnoType<decltype(e)>::get() );
} }
throw; throw;
} }
......
...@@ -154,7 +154,7 @@ PyObject* PyUNO_callable_call( ...@@ -154,7 +154,7 @@ PyObject* PyUNO_callable_call(
if( isLog( cargo, LogLevel::CALL ) ) if( isLog( cargo, LogLevel::CALL ) )
{ {
logException( cargo, "error py->uno[0x", me->members->xInvocation.get() , logException( cargo, "error py->uno[0x", me->members->xInvocation.get() ,
me->members->methodName, &e, getCppuType(&e).getTypeLibType()); me->members->methodName, &e, cppu::UnoType<decltype(e)>::get().getTypeLibType());
} }
raisePyExceptionWithAny( com::sun::star::uno::makeAny( e ) ); raisePyExceptionWithAny( com::sun::star::uno::makeAny( e ) );
} }
...@@ -163,7 +163,7 @@ PyObject* PyUNO_callable_call( ...@@ -163,7 +163,7 @@ PyObject* PyUNO_callable_call(
if( isLog( cargo, LogLevel::CALL ) ) if( isLog( cargo, LogLevel::CALL ) )
{ {
logException( cargo, "error py->uno[0x", me->members->xInvocation.get() , logException( cargo, "error py->uno[0x", me->members->xInvocation.get() ,
me->members->methodName, &e, getCppuType(&e).getTypeLibType()); me->members->methodName, &e, cppu::UnoType<decltype(e)>::get().getTypeLibType());
} }
raisePyExceptionWithAny( com::sun::star::uno::makeAny( e ) ); raisePyExceptionWithAny( com::sun::star::uno::makeAny( e ) );
} }
...@@ -172,7 +172,7 @@ PyObject* PyUNO_callable_call( ...@@ -172,7 +172,7 @@ PyObject* PyUNO_callable_call(
if( cargo && isLog( cargo, LogLevel::CALL ) ) if( cargo && isLog( cargo, LogLevel::CALL ) )
{ {
logException( cargo, "error py->uno[0x", me->members->xInvocation.get() , logException( cargo, "error py->uno[0x", me->members->xInvocation.get() ,
me->members->methodName, &e, getCppuType(&e).getTypeLibType()); me->members->methodName, &e, cppu::UnoType<decltype(e)>::get().getTypeLibType());
} }
raisePyExceptionWithAny( com::sun::star::uno::makeAny( e ) ); raisePyExceptionWithAny( com::sun::star::uno::makeAny( e ) );
} }
......
...@@ -524,7 +524,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const ...@@ -524,7 +524,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
{ {
Reference< XTypeConverter > tc = getImpl()->cargo->xTypeConverter; Reference< XTypeConverter > tc = getImpl()->cargo->xTypeConverter;
Reference< XSingleServiceFactory > ssf = getImpl()->cargo->xInvocation; Reference< XSingleServiceFactory > ssf = getImpl()->cargo->xInvocation;
tc->convertTo (a, ::getCppuType (&s)) >>= s; tc->convertTo (a, cppu::UnoType<decltype(s)>::get()) >>= s;
PyRef tuple( PyTuple_New (s.getLength()), SAL_NO_ACQUIRE, NOT_NULL); PyRef tuple( PyTuple_New (s.getLength()), SAL_NO_ACQUIRE, NOT_NULL);
int i=0; int i=0;
try try
...@@ -642,12 +642,12 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con ...@@ -642,12 +642,12 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
if( o == Py_True ) if( o == Py_True )
{ {
sal_Bool b = sal_True; sal_Bool b = sal_True;
a = Any( &b, getBooleanCppuType() ); a = Any( &b, cppu::UnoType<bool>::get() );
} }
else if ( o == Py_False ) else if ( o == Py_False )
{ {
sal_Bool b = sal_False; sal_Bool b = sal_False;
a = Any( &b, getBooleanCppuType() ); a = Any( &b, cppu::UnoType<bool>::get() );
} }
else else
{ {
...@@ -676,12 +676,12 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con ...@@ -676,12 +676,12 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
if(o == Py_True) if(o == Py_True)
{ {
sal_Bool b = sal_True; sal_Bool b = sal_True;
a = Any(&b, getBooleanCppuType()); a = Any(&b, cppu::UnoType<bool>::get());
} }
else if(o == Py_False) else if(o == Py_False)
{ {
sal_Bool b = sal_False; sal_Bool b = sal_False;
a = Any(&b, getBooleanCppuType()); a = Any(&b, cppu::UnoType<bool>::get());
} }
else else
{ {
...@@ -794,7 +794,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con ...@@ -794,7 +794,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
else if( PyObject_IsInstance( o, getCharClass( runtime ).get() ) ) else if( PyObject_IsInstance( o, getCharClass( runtime ).get() ) )
{ {
sal_Unicode c = PyChar2Unicode( o ); sal_Unicode c = PyChar2Unicode( o );
a.setValue( &c, getCharCppuType( )); a.setValue( &c, cppu::UnoType<cppu::UnoCharType>::get());
} }
else if( PyObject_IsInstance( o, getAnyClass( runtime ).get() ) ) else if( PyObject_IsInstance( o, getAnyClass( runtime ).get() ) )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment