| /trunk/main/pyuno/source/module/ |
| H A D | pyuno_runtime.cxx | 128 static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl ) in getRuntimeImpl() 139 globalDict = PyRef( PyModule_GetDict(PyImport_AddModule(const_cast< char * >("__main__")))); in getRuntimeImpl() 149 static PyRef importUnoModule( ) throw ( RuntimeException ) in importUnoModule() 151 … PyRef globalDict = PyRef( PyModule_GetDict(PyImport_AddModule(const_cast< char * >("__main__")))); in importUnoModule() 153 PyRef module( PyImport_ImportModule( const_cast< char * >("uno") ), SAL_NO_ACQUIRE ); in importUnoModule() 156 PyRef excType, excValue, excTraceback; in importUnoModule() 158 PyRef str( PyObject_Repr( excTraceback.get() ), SAL_NO_ACQUIRE ); in importUnoModule() 162 PyRef valueRep( PyObject_Repr( excValue.get() ), SAL_NO_ACQUIRE ); in importUnoModule() 168 PyRef dict( PyModule_GetDict( module.get() ) ); in importUnoModule() 239 PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx ) in create() [all …]
|
| H A D | pyuno_impl.hxx | 97 PyRef, 99 PyRef::Hash, 100 std::equal_to< PyRef > 107 PyRef, 120 typedef ::std::hash_set< PyRef , PyRef::Hash , std::equal_to<PyRef> > ClassSet; 142 PyRef ustring2PyUnicode( const rtl::OUString &source ); 143 PyRef ustring2PyString( const ::rtl::OUString & source ); 147 PyRef AnyToPyObject (const com::sun::star::uno::Any & a, const Runtime &r ) 161 PyRef PyUNO_callable_new ( 173 PyRef getTypeClass( const Runtime &); [all …]
|
| H A D | pyuno_type.cxx | 112 static PyRef getClass( const Runtime & r , const char * name) in getClass() 114 return PyRef( PyDict_GetItemString( r.getImpl()->cargo->getUnoModule().get(), (char*) name ) ); in getClass() 117 PyRef getTypeClass( const Runtime & r ) in getTypeClass() 122 PyRef getEnumClass( const Runtime & r ) in getEnumClass() 127 PyRef getCharClass( const Runtime & r ) in getCharClass() 132 PyRef getByteSequenceClass( const Runtime & r ) in getByteSequenceClass() 137 PyRef getAnyClass( const Runtime & r ) in getAnyClass() 145 PyRef value( PyObject_GetAttrString( obj, const_cast< char * >("value") ), SAL_NO_ACQUIRE ); in PyChar2Unicode() 174 PyRef typeName( PyObject_GetAttrString( obj,const_cast< char * >("typeName") ), SAL_NO_ACQUIRE); in PyEnum2Enum() 175 PyRef value( PyObject_GetAttrString( obj, const_cast< char * >("value") ), SAL_NO_ACQUIRE); in PyEnum2Enum() [all …]
|
| H A D | pyuno_except.cxx | 48 PyRef exc = runtime.any2PyObject( anyExc ); in raisePyExceptionWithAny() 51 PyRef type( getClass( anyExc.getValueType().getTypeName(),runtime ) ); in raisePyExceptionWithAny() 88 static PyRef createClass( const OUString & name, const Runtime &runtime ) in createClass() 116 PyRef base; in createClass() 140 base = PyRef(PyExc_Exception); in createClass() 143 PyRef args( PyTuple_New( 3 ), SAL_NO_ACQUIRE ); in createClass() 145 PyRef pyTypeName = USTR_TO_PYSTR( name /*.replace( '.', '_' )*/ ); in createClass() 147 PyRef bases; in createClass() 151 bases = PyRef( PyTuple_New( 1 ), SAL_NO_ACQUIRE ); in createClass() 157 bases = PyRef( PyTuple_New( 0 ), SAL_NO_ACQUIRE ); in createClass() [all …]
|
| H A D | pyuno_util.cxx | 61 PyRef ustring2PyUnicode( const OUString & str ) in ustring2PyUnicode() 63 PyRef ret; in ustring2PyUnicode() 67 …ret = PyRef( PyUnicode_FromUnicode( (const Py_UNICODE*)str.getStr(), str.getLength() ), SAL_NO_ACQ… in ustring2PyUnicode() 70 ret = PyRef( PyUnicode_DecodeUTF8( sUtf8.getStr(), sUtf8.getLength(), NULL) , SAL_NO_ACQUIRE ); in ustring2PyUnicode() 75 PyRef ustring2PyString( const OUString &str ) in ustring2PyString() 78 return PyRef( PyBytes_FromString( o.getStr() ), SAL_NO_ACQUIRE ); in ustring2PyString() 108 PyRef getObjectFromUnoModule( const Runtime &runtime, const char * func ) in getObjectFromUnoModule() 111 …PyRef object(PyDict_GetItemString( runtime.getImpl()->cargo->getUnoModule().get(), (char*)func ) ); in getObjectFromUnoModule()
|
| H A D | pyuno_adapter.cxx | 61 Adapter::Adapter( const PyRef & ref, const Sequence< Type > &types ) in Adapter() 94 PyRef excType, excValue, excTraceback; in raiseInvocationTargetExceptionWhenNeeded() 223 PyRef argsTuple(PyTuple_New( size ), SAL_NO_ACQUIRE ); in invoke() 235 PyRef val = runtime.any2PyObject( aParams[i] ); in invoke() 240 PyRef method(PyObject_GetAttrString( mWrappedObject.get(), (char*)TO_ASCII(aFunctionName)), in invoke() 248 PyRef str( PyObject_Repr( mWrappedObject.get() ), SAL_NO_ACQUIRE ); in invoke() 253 PyRef pyRet( PyObject_CallObject( method.get(), argsTuple.get() ), SAL_NO_ACQUIRE ); in invoke() 378 PyRef obj = runtime.any2PyObject( value ); in setValue() 398 PyRef pyRef( in getValue()
|
| H A D | pyuno.cxx | 339 PyRef ret; in PyUNO_invoke() 344 PyRef paras,callable; in PyUNO_invoke() 368 paras = PyRef(PyTuple_New( size ), SAL_NO_ACQUIRE); in PyUNO_invoke() 384 callable = PyRef( PyObject_GetAttrString( object , (char*)name ), SAL_NO_ACQUIRE ); in PyUNO_invoke() 388 ret = PyRef( PyObject_CallObject( callable.get(), paras.get() ), SAL_NO_ACQUIRE ); in PyUNO_invoke() 456 PyRef pUtf8(PyUnicode_AsUTF8String(attr_name), SAL_NO_ACQUIRE); in PyUNO_getattr() 514 PyRef ret = PyUNO_callable_new ( in PyUNO_getattr() 531 PyRef ret = runtime.any2PyObject(anyRet); in PyUNO_getattr() 574 PyRef pUtf8(PyUnicode_AsUTF8String(attr_name), SAL_NO_ACQUIRE); in PyUNO_setattr() 826 PyRef getPyUnoClass() in getPyUnoClass() [all …]
|
| H A D | pyuno_module.cxx | 141 PyRef ret; in getComponentContext() 245 PyRef ret; in createUnoStructHelper() 266 PyRef returnCandidate( (PyObject*)me, SAL_NO_ACQUIRE ); in createUnoStructHelper() 386 PyRef constant = runtime.any2PyObject( a ); in getConstantByName() 469 PyRef ret = getClass( pyString2ustring(obj), runtime ); in getClass() 509 PyRef ret; in generateUuid() 613 PyRef pUtf8(PyUnicode_AsUTF8String( PyTuple_GetItem( args, 1 ) ), SAL_NO_ACQUIRE); in invoke() 657 PyRef ret; in getCurrentContext() 673 PyRef ret; in setCurrentContext()
|
| H A D | pyuno_callable.cxx | 82 PyRef ret; in PyUNO_callable_call() 122 PyRef temp = runtime.any2PyObject (ret_value); in PyUNO_callable_call() 125 PyRef return_list( PyTuple_New (1+aOutParam.getLength()), SAL_NO_ACQUIRE ); in PyUNO_callable_call() 138 PyRef ref = runtime.any2PyObject( aOutParam[i] ); in PyUNO_callable_call() 247 PyRef PyUNO_callable_new ( in PyUNO_callable_new() 263 return PyRef( (PyObject*)self, SAL_NO_ACQUIRE ); in PyUNO_callable_new()
|
| /trunk/main/pyuno/inc/pyuno/ |
| H A D | pyuno.hxx | 100 class PyRef class 104 PyRef () : m(0) {} in PyRef() function in pyuno::PyRef 105 PyRef( PyObject * p ) : m( p ) { Py_XINCREF( m ); } in PyRef() function in pyuno::PyRef 107 PyRef( PyObject * p, __sal_NoAcquire ) : m( p ) {} in PyRef() function in pyuno::PyRef 109 PyRef( const PyRef &r ) : m( r.get() ) { Py_XINCREF( m ); } in PyRef() function in pyuno::PyRef 111 ~PyRef() { Py_XDECREF( m ); } in ~PyRef() 121 PyRef & operator = ( const PyRef & r ) in operator =() 129 bool operator == ( const PyRef & r ) const in operator ==() 159 sal_IntPtr operator () ( const PyRef &r) const { return sal_IntPtr( r.get() ); } in operator ()() 235 PyRef any2PyObject (const com::sun::star::uno::Any &source ) const [all …]
|
| /trunk/main/pyuno/source/loader/ |
| H A D | pyuno_loader.cxx | 41 using pyuno::PyRef; 59 PyRef excType, excValue, excTraceback; in raiseRuntimeExceptionWhenNeeded() 71 static PyRef getLoaderModule() throw( RuntimeException ) in getLoaderModule() 73 PyRef module( in getLoaderModule() 83 return PyRef( PyModule_GetDict( module.get() )); in getLoaderModule() 86 static PyRef getObjectFromLoaderModule( const char * func ) in getObjectFromLoaderModule() 89 PyRef object( PyDict_GetItemString(getLoaderModule().get(), (char*)func ) ); in getObjectFromLoaderModule() 202 PyRef pyCtx = runtime.any2PyObject( in CreateInstance() 205 PyRef clazz = getObjectFromLoaderModule( "Loader" ); in CreateInstance() 206 PyRef args ( PyTuple_New( 1 ), SAL_NO_ACQUIRE ); in CreateInstance() [all …]
|