diff options
author | Jörg Budischewski <jbu@openoffice.org> | 2003-05-24 22:28:33 +0000 |
---|---|---|
committer | Jörg Budischewski <jbu@openoffice.org> | 2003-05-24 22:28:33 +0000 |
commit | 4640b548a7ceda0016c465ee4e15086a54defdb6 (patch) | |
tree | ce77f647bafdd674b0bb727341b477e8f3a1853f /pyuno | |
parent | 89d55b843d0e4967c64b0ed43548993351fb06b3 (diff) |
#i12504# added conversion mode
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/pyuno_callable.cxx | 11 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_impl.hxx | 9 |
2 files changed, 13 insertions, 7 deletions
diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx index fbe1f3690d86..71f1429d7204 100644 --- a/pyuno/source/module/pyuno_callable.cxx +++ b/pyuno/source/module/pyuno_callable.cxx @@ -2,9 +2,9 @@ * * $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 * either of the following licenses @@ -85,6 +85,7 @@ typedef struct Reference<XSingleServiceFactory> xInvocationFactory; Reference<XTypeConverter> xTypeConverter; OUString methodName; + ConversionMode mode; } PyUNO_callable_Internals; typedef struct @@ -124,7 +125,7 @@ PyObject* PyUNO_callable_call (PyObject* self, PyObject* args, PyObject* kwords) try { 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) { @@ -215,7 +216,8 @@ PyRef PyUNO_callable_new ( const Reference<XInvocation2> &my_inv, const OUString & methodName, const Reference<XSingleServiceFactory> &xInvocationFactory, - const Reference<XTypeConverter> &tc) + const Reference<XTypeConverter> &tc, + enum ConversionMode mode ) { PyUNO_callable* self; @@ -228,6 +230,7 @@ PyRef PyUNO_callable_new ( self->members->methodName = methodName; self->members->xInvocationFactory = xInvocationFactory; self->members->xTypeConverter = tc; + self->members->mode = mode; return PyRef( (PyObject*)self, SAL_NO_ACQUIRE ); } diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx index f40559a15a96..c25f8a0c1d8a 100644 --- a/pyuno/source/module/pyuno_impl.hxx +++ b/pyuno/source/module/pyuno_impl.hxx @@ -2,9 +2,9 @@ * * $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 * either of the following licenses @@ -147,7 +147,8 @@ PyRef PyUNO_callable_new ( const com::sun::star::uno::Reference<com::sun::star::script::XInvocation2> &xInv, 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::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_Enum_new( const char *enumBase, const char *enumValue, const Runtime &r ); @@ -163,6 +164,8 @@ PyRef getCharClass( const Runtime &); PyRef getByteSequenceClass( const Runtime & ); PyRef getPyUnoClass( const 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 ) throw ( com::sun::star::uno::RuntimeException ); |