Methods for ooo-dev-tools and LibreOffice that require automatic GUI interaction for windows.
Project description
ooo-dev-tools-gui-win
This package contains Automation for use with LIbreOffice and OOO Development Tools project.
Installation
pip install ooo-dev-tools-gui-win
DrawDispatcher Class
Contains methods for automatically adding Special Shapes to Draw. This is done via GUI Automation. Otherwise there is no other way to automatically add these shapes to Draw.
See Also:
This code adds the cloud seen above to a Draw page.
from ooodev.office.draw import Draw, DrawingBitmapKind, ShapeDispatchKind
from ooodev.utils.lo import Lo
from ooodev.utils.gui import GUI
from odevgui_win.draw_dispatcher import DrawDispatcher
def main() -> int:
loader = Lo.load_office(Lo.ConnectPipe())
try:
doc = Draw.create_draw_doc(loader)
slide = Draw.get_slide(doc=doc, idx=0)
GUI.set_visible(is_visible=True, odoc=doc)
Lo.delay(1_000)
GUI.zoom(view=GUI.ZoomEnum.ENTIRE_PAGE)
shape = Draw.add_dispatch_shape(
slide=slide,
shape_dispatch=ShapeDispatchKind.CALLOUT_SHAPES_CLOUD_CALLOUT,
x=140,
y=60,
width=50,
height=30,
fn=DrawDispatcher.create_dispatch_shape_win,
)
Draw.set_bitmap_color(shape, DrawingBitmapKind.LITTLE_CLOUDS)
except Exception:
Lo.close_office()
raise
return 0
if __name__ == "__main__":
SystemExit(main())
DialogAuto Class
Provides method for automatically handling dialog boxes.
See Impress append Slides to existing slide show example for a demonstration.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ooo-dev-tools-gui-win-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f58535b1b4c652969b77309ac0966a37512f1980543d35a1bff635dd9edfcffc |
|
MD5 | 6227439fbb18a2c937481b5574ccc497 |
|
BLAKE2b-256 | 8ae2673242d81cbe21d81410b9d597bc3df9fbd1e7665225fb5d98e6e785a958 |
Close
Hashes for ooo_dev_tools_gui_win-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ce8efe8c3d56e4e1b55514275daa3066c32bc438a752d9c477798b608e0053c |
|
MD5 | 62ce2efb29f537e5ec876ee047bb223f |
|
BLAKE2b-256 | 0302fec4a05ef49d5d1aed6bd2e883350c4d3a2c03c7c4f2a1292f4d6a529565 |