Class LoDirectStart

This class is used for connecting to LibreOffice via macros.

Macros do not require a connection as they already have access to LibreOffice API by their nature.

Generally speaking this class will not be called directly. It is used internally by Lo.

Lo macro Example:

from ooodev.loader.lo import Lo
from ooodev.office.calc import Calc

doc = Calc.get_ss_doc(Lo.ThisComponent)
# do work ...

Note

When script is running in macro is is not necessary to call Lo.load_office(). In a macro use Lo.XSCRIPTCONTEXT and/or Lo.ThisComponent

class ooodev.conn.connect.LoDirectStart[source]

Bases: ConnectBase

LO Direct Start Connection.

Used in macros.

__init__()
connect()[source]

Makes a connection to soffice

Raises:

NoConnectException – if unable to obtain a connection to soffice

kill_soffice()[source]

Inherited

Raises:

NotImplementedError – Not implement in this class.

Return type:

None

property ctx: com.sun.star.uno.XComponentContext

Gets instance Component Context

Return type:

XComponentContext

property has_connection: bool

Returns True if a connection to soffice has been established

Return type:

bool

property headless: bool

For compatibility. Returns False

Return type:

bool

property invisible: bool

For compatibility. Returns False

Return type:

bool

property is_remote: bool

Returns False

Return type:

bool

property log: NamedLogger

Gets the logger

Return type:

NamedLogger

property no_first_start_wizard: bool

For compatibility. Returns True

Return type:

bool

For compatibility. Returns True

Return type:

bool

property no_restore: bool

For compatibility. Returns True

Return type:

bool

property start_as_service: bool

For compatibility. Returns False

Return type:

bool

property start_office: bool

For compatibility. Returns True

Return type:

bool