LibreOffice Module pyuno (master)  1
Namespaces | Classes | Functions | Variables
uno Namespace Reference




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


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)


tuple _component_context = pyuno.getComponentContext()
 _builtin_import = __import__

Function Documentation

def uno._impl_getConstantGroupByName (   module,
Gets UNOIDL constant group by name.

Definition at line 454 of file

Referenced by _uno_import().

def uno._uno_extract_printable_stacktrace (   trace)
Extracts a printable stacktrace.

Referenced from pyuno shared lib and

Definition at line 542 of file

def uno._uno_import (   name,
Overrides built-in import to allow directly importing LibreOffice classes.

Definition at line 341 of file

References _builtin_import, _impl_getConstantGroupByName(), pyuno.getClass(), and getConstantByName().

def uno._uno_struct__eq__ (   self,
Compares two UNO structs.

Referenced from the pyuno shared library.

Definition at line 530 of file

def uno._uno_struct__getattr__ (   self,
Gets attribute from UNO struct.

Referenced from the pyuno shared library.

Definition at line 495 of file

def uno._uno_struct__init__ (   self,
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 472 of file

References pyuno.getClass().

def uno._uno_struct__ne__ (   self,

Definition at line 527 of file

def uno._uno_struct__repr__ (   self)
Converts a UNO struct to a printable string.

Referenced from the pyuno shared library.

Definition at line 513 of file

def uno._uno_struct__setattr__ (   self,
Sets attribute on UNO struct.

Referenced from the pyuno shared library.

Definition at line 504 of file

def uno._uno_struct__str__ (   self)
Converts a UNO struct to a string.

Definition at line 522 of file

def uno.absolutize (   path,
Returns an absolute file url from the given urls.

Definition at line 136 of file

def uno.createUnoStruct (   typeName,
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("")`)
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("" , e)`)
3) As many additional arguments as the number of elements within typeName
   (e.g. `createUnoStruct("", "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

References getClass().

def uno.fileUrlToSystemPath (   url)
Returns a system path.

This path is determined by the system that the Python interpreter is running on.

Definition at line 127 of file

def uno.generateUuid ( )
Returns a 16 byte sequence containing a newly generated uuid or guid.

For more information, see rtl/uuid.h.

Definition at line 112 of file

def uno.getClass (   typeName)
Returns the class of a concrete UNO exception, struct, or interface.

Definition at line 100 of file

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

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

Referenced by _uno_import().

def uno.getCurrentContext ( )
Returns the current context.

for an explanation on the current context concept.

Definition at line 38 of file

def uno.getTypeByName (   typeName)
Returns a `uno.Type` instance of the type given by typeName.

If the type does not exist, a `` is raised.

Definition at line 67 of file

Referenced by uno.ByteSequence.__hash__(), and unohelper._unohelper_getHandle().

def uno.invoke (   object,
Use this function to pass exactly typed Anys to the callee (using uno.Any).

Definition at line 329 of file

def uno.isInterface (   obj)
Returns True, when obj is a class of a UNO interface.

Definition at line 106 of file

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

Definition at line 48 of file

def uno.systemPathToFileUrl (   systemPath)
Returns a file URL for the given system path.

Definition at line 121 of file

Variable Documentation

uno._builtin_import = __import__

Definition at line 338 of file

Referenced by _uno_import().

tuple uno._component_context = pyuno.getComponentContext()

Definition at line 29 of file