Class DrawDispatcher
Info
Enables dispatch commands to be sent to LibreOffice Impress and LibreOffice Draw that require GUI Automation.
An excellent example is Impress Make Slides (the fifth slide) on demonstrating how this works.
Class
- class odevgui_win.draw_dispatcher.DrawDispatcher[source]
Draw Dispat Automation
- static create_dispatch_shape(slide: XDrawPage, shape_dispatch: str) XShape | None [source]
Creates a dispatch shape in two steps.
Select the shape by calling
ooodev.utils.lo.Lo.dispatch_cmd()
Creates the shape on screen by imitating a press and drag on the visible page.
A reference to the created shape is obtained by assuming that it’s the new top-most element on the page.
- Parameters:
slide (XDrawPage) – Draw Page
shape_dispatch (str) – Shape Dispatch Command
*titles – Optional Extended sequence of title information. This is used to match windows title.
- Raises:
ElementNotFoundError – If unable to find a LibreOffice window to dispatch to.
- Returns:
Shape on Success; Otherwise,
None
.- Return type:
XShape | None
Notes
Assumes that connection to LibreOffice has been made with
ooodev.utils.lo.Lo.load_office()
.