Kaydet (Commit) 4640b548 authored tarafından Jörg Budischewski's avatar Jörg Budischewski

#i12504# added conversion mode

üst 89d55b84
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: pyuno_callable.cxx,v $ * $RCSfile: pyuno_callable.cxx,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: jbu $ $Date: 2003-03-23 12:12:56 $ * last change: $Author: jbu $ $Date: 2003-05-24 23:27:40 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -85,6 +85,7 @@ typedef struct ...@@ -85,6 +85,7 @@ typedef struct
Reference<XSingleServiceFactory> xInvocationFactory; Reference<XSingleServiceFactory> xInvocationFactory;
Reference<XTypeConverter> xTypeConverter; Reference<XTypeConverter> xTypeConverter;
OUString methodName; OUString methodName;
ConversionMode mode;
} PyUNO_callable_Internals; } PyUNO_callable_Internals;
typedef struct typedef struct
...@@ -124,7 +125,7 @@ PyObject* PyUNO_callable_call (PyObject* self, PyObject* args, PyObject* kwords) ...@@ -124,7 +125,7 @@ PyObject* PyUNO_callable_call (PyObject* self, PyObject* args, PyObject* kwords)
try try
{ {
Runtime runtime; Runtime runtime;
any_params = runtime.pyObject2Any (args); any_params = runtime.pyObject2Any (args, me->members->mode);
if (any_params.getValueTypeClass () == com::sun::star::uno::TypeClass_SEQUENCE) if (any_params.getValueTypeClass () == com::sun::star::uno::TypeClass_SEQUENCE)
{ {
...@@ -215,7 +216,8 @@ PyRef PyUNO_callable_new ( ...@@ -215,7 +216,8 @@ PyRef PyUNO_callable_new (
const Reference<XInvocation2> &my_inv, const Reference<XInvocation2> &my_inv,
const OUString & methodName, const OUString & methodName,
const Reference<XSingleServiceFactory> &xInvocationFactory, const Reference<XSingleServiceFactory> &xInvocationFactory,
const Reference<XTypeConverter> &tc) const Reference<XTypeConverter> &tc,
enum ConversionMode mode )
{ {
PyUNO_callable* self; PyUNO_callable* self;
...@@ -228,6 +230,7 @@ PyRef PyUNO_callable_new ( ...@@ -228,6 +230,7 @@ PyRef PyUNO_callable_new (
self->members->methodName = methodName; self->members->methodName = methodName;
self->members->xInvocationFactory = xInvocationFactory; self->members->xInvocationFactory = xInvocationFactory;
self->members->xTypeConverter = tc; self->members->xTypeConverter = tc;
self->members->mode = mode;
return PyRef( (PyObject*)self, SAL_NO_ACQUIRE ); return PyRef( (PyObject*)self, SAL_NO_ACQUIRE );
} }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: pyuno_impl.hxx,v $ * $RCSfile: pyuno_impl.hxx,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: jbu $ $Date: 2003-03-23 12:12:57 $ * last change: $Author: jbu $ $Date: 2003-05-24 23:28:33 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -147,7 +147,8 @@ PyRef PyUNO_callable_new ( ...@@ -147,7 +147,8 @@ PyRef PyUNO_callable_new (
const com::sun::star::uno::Reference<com::sun::star::script::XInvocation2> &xInv, const com::sun::star::uno::Reference<com::sun::star::script::XInvocation2> &xInv,
const rtl::OUString &methodName, const rtl::OUString &methodName,
const com::sun::star::uno::Reference<com::sun::star::lang::XSingleServiceFactory> &ssf, const com::sun::star::uno::Reference<com::sun::star::lang::XSingleServiceFactory> &ssf,
const com::sun::star::uno::Reference<com::sun::star::script::XTypeConverter> &tc ); const com::sun::star::uno::Reference<com::sun::star::script::XTypeConverter> &tc,
ConversionMode mode = REJECT_UNO_ANY );
PyObject* PyUNO_Type_new (const char *typeName , com::sun::star::uno::TypeClass t , const Runtime &r ); PyObject* PyUNO_Type_new (const char *typeName , com::sun::star::uno::TypeClass t , const Runtime &r );
PyObject* PyUNO_Enum_new( const char *enumBase, const char *enumValue, const Runtime &r ); PyObject* PyUNO_Enum_new( const char *enumBase, const char *enumValue, const Runtime &r );
...@@ -163,6 +164,8 @@ PyRef getCharClass( const Runtime &); ...@@ -163,6 +164,8 @@ PyRef getCharClass( const Runtime &);
PyRef getByteSequenceClass( const Runtime & ); PyRef getByteSequenceClass( const Runtime & );
PyRef getPyUnoClass( const Runtime &); PyRef getPyUnoClass( const Runtime &);
PyRef getClass( const rtl::OUString & name , const Runtime & runtime ); PyRef getClass( const rtl::OUString & name , const Runtime & runtime );
PyRef getAnyClass( const Runtime &);
PyObject *PyUNO_invoke( PyObject *object, const char *name , PyObject *args );
com::sun::star::uno::Any PyEnum2Enum( PyObject *obj, const Runtime & r ) com::sun::star::uno::Any PyEnum2Enum( PyObject *obj, const Runtime & r )
throw ( com::sun::star::uno::RuntimeException ); throw ( com::sun::star::uno::RuntimeException );
......
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