LibreOffice Module pyuno (master) 1
|
Namespaces | |
namespace | util |
Classes | |
class | _ConstantGroup |
class | Any |
class | Bool |
class | BoundAttribute |
class | ByteSequence |
class | Char |
class | Enum |
class | ExceptionAttribute |
class | OnewayAttribute |
class | ParameterizedTypeAttribute |
class | PolymorphicType |
class | Type |
class | TypeArgumentsAttribute |
class | TypeParametersAttribute |
Functions | |
def | getComponentContext () |
def | getCurrentContext () |
def | setCurrentContext (newContext) |
def | getConstantByName (constant) |
def | getTypeByName (typeName) |
def | createUnoStruct (typeName, *args, **kwargs) |
def | getClass (typeName) |
def | isInterface (obj) |
def | generateUuid () |
def | systemPathToFileUrl (systemPath) |
def | fileUrlToSystemPath (url) |
def | absolutize (path, relativeUrl) |
def | invoke (object, methodname, argTuple) |
def | _uno_import (name, *optargs, **kwargs) |
def | _impl_getConstantGroupByName (module, group) |
def | _uno_struct__init__ (self, *args, **kwargs) |
def | _uno_struct__getattr__ (self, name) |
def | _uno_struct__setattr__ (self, name, value) |
def | _uno_struct__repr__ (self) |
def | _uno_struct__str__ (self) |
def | _uno_struct__ne__ (self, other) |
def | _uno_struct__eq__ (self, that) |
def | _uno_extract_printable_stacktrace (trace) |
Variables | |
_component_context = pyuno.getComponentContext() | |
_builtin_import = __import__ | |
|
private |
Gets UNOIDL constant group by name.
Definition at line 457 of file uno.py.
Referenced by _uno_import().
|
private |
|
private |
Overrides built-in import to allow directly importing LibreOffice classes.
Definition at line 342 of file uno.py.
References _builtin_import, _impl_getConstantGroupByName(), pyuno.getClass(), and getConstantByName().
|
private |
|
private |
|
private |
Initializes a UNO struct. Referenced from the pyuno shared library. This function can be called with either an already constructed UNO struct, which it will then just reference without copying, or with arguments to create a new UNO struct.
Definition at line 475 of file uno.py.
References pyuno.getClass().
|
private |
|
private |
|
private |
def uno.absolutize | ( | path, | |
relativeUrl | |||
) |
def uno.createUnoStruct | ( | typeName, | |
* | args, | ||
** | kwargs | ||
) |
Creates a UNO struct or exception given by typeName. Can be called with: 1) No additional argument. In this case, you get a default constructed UNO structure. (e.g. `createUnoStruct("com.sun.star.uno.Exception")`) 2) Exactly one additional argument that is an instance of typeName. In this case, a copy constructed instance of typeName is returned (e.g. `createUnoStruct("com.sun.star.uno.Exception" , e)`) 3) As many additional arguments as the number of elements within typeName (e.g. `createUnoStruct("com.sun.star.uno.Exception", "foo error" , self)`). 4) Keyword arguments to give values for each element of the struct by name. 5) A mix of 3) and 4), such that each struct element is given a value exactly once, either by a positional argument or by a keyword argument. The additional and/or keyword arguments must match the type of each struct element, otherwise an exception is thrown.
Definition at line 76 of file uno.py.
References createUnoStruct(), and getClass().
Referenced by createUnoStruct().
def uno.fileUrlToSystemPath | ( | url | ) |
def uno.generateUuid | ( | ) |
def uno.getClass | ( | typeName | ) |
Returns the class of a concrete UNO exception, struct, or interface.
Definition at line 100 of file uno.py.
References pyuno.getClass().
Referenced by createUnoStruct().
def uno.getComponentContext | ( | ) |
Returns the UNO component context used to initialize the Python runtime.
Definition at line 32 of file uno.py.
Referenced by unohelper.inspect().
def uno.getConstantByName | ( | constant | ) |
Looks up the value of an IDL constant by giving its explicit name.
Definition at line 61 of file uno.py.
Referenced by _uno_import().
def uno.getCurrentContext | ( | ) |
def uno.getTypeByName | ( | typeName | ) |
Returns a `uno.Type` instance of the type given by typeName. If the type does not exist, a `com.sun.star.uno.RuntimeException` is raised.
Definition at line 67 of file uno.py.
Referenced by uno.ByteSequence.__hash__(), and unohelper._unohelper_getHandle().
def uno.invoke | ( | object, | |
methodname, | |||
argTuple | |||
) |
Use this function to pass exactly typed Anys to the callee (using uno.Any).
Definition at line 330 of file uno.py.
Referenced by uno.ByteSequence.__hash__().
def uno.isInterface | ( | obj | ) |
Returns True, when obj is a class of a UNO interface.
Definition at line 106 of file uno.py.
Referenced by unohelper._unohelper_getHandle(), and pyuno.createClass().
def uno.setCurrentContext | ( | newContext | ) |
Sets newContext as new UNO context. The newContext must implement the XCurrentContext interface. The implementation should handle the desired properties and delegate unknown properties to the old context. Ensure that the old one is reset when you leave your stack, see http://udk.openoffice.org/common/man/concept/uno_contexts.html#current_context
def uno.systemPathToFileUrl | ( | systemPath | ) |
|
private |
Definition at line 339 of file uno.py.
Referenced by _uno_import().
|
private |