Skip to main content

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.

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:

Callout_clouds

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

ooo-dev-tools-gui-win-0.1.0.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

ooo_dev_tools_gui_win-0.1.0-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page