Class LoOpenPartial
- class ooodev.utils.partial.lo_open_doc.LoOpenPartial(lo_inst=None)[source]
Partial Class used for opening Office Documents.
- Parameters:
lo_inst (LoInst | None) –
- __init__(lo_inst=None)[source]
Constructor.
- Parameters:
lo_inst (LoInst, optional) – Lo instance.
- Return type:
None
- open_doc(fnm: Any) com.sun.star.lang.XComponent [source]
- open_doc(fnm: Any, loader: com.sun.star.frame.XComponentLoader) com.sun.star.lang.XComponent
- open_doc(fnm: Any, *, props: Iterable[com.sun.star.beans.PropertyValue]) com.sun.star.lang.XComponent
- open_doc(fnm: Any, loader: com.sun.star.frame.XComponentLoader, props: Iterable[com.sun.star.beans.PropertyValue]) com.sun.star.lang.XComponent
- open_doc(fnm, loader=None, props=None)
Open a office document
- Parameters:
fnm (PathOrStr) – path of document to open
loader (XComponentLoader) – Component Loader
props (Iterable[PropertyValue]) – Properties passed to component loader
- Raises:
Exception – if unable to open document
CancelEventError – if DOC_OPENING event is canceled.
- Returns:
Document
- Return type:
XComponent
- Events:
Note
Event args
event_data
is a dictionary containing all method parameters.See also
open_doc()
load_office()
Note
If connection it office is a remote server then File URL must be used, such as
file:///home/user/fancy.odt
- open_flat_doc(fnm: Any, doc_type: ooodev.loader.inst.doc_type.DocType) com.sun.star.lang.XComponent [source]
- open_flat_doc(fnm: Any, doc_type: ooodev.loader.inst.doc_type.DocType, loader: com.sun.star.frame.XComponentLoader) com.sun.star.lang.XComponent
- open_flat_doc(fnm, doc_type, loader=None)
Opens a flat document
- Parameters:
fnm (PathOrStr) – path of XML document
doc_type (DocType) – Type of document to open
loader (XComponentLoader) – Component loader
- Returns:
Document
- Return type:
XComponent
See also
open_flat_doc()
- open_readonly_doc(fnm: Any) com.sun.star.lang.XComponent [source]
- open_readonly_doc(fnm: Any, loader: com.sun.star.frame.XComponentLoader) com.sun.star.lang.XComponent
- open_readonly_doc(fnm, loader=None)
Open a office document as read-only
- Parameters:
fnm (PathOrStr) – path of document to open
loader (XComponentLoader) – Component Loader
- Raises:
Exception – if unable to open document
- Returns:
Document
- Return type:
XComponent
See also