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.

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:

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.2.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ooo_dev_tools_gui_win-0.1.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file ooo-dev-tools-gui-win-0.1.2.tar.gz.

File metadata

  • Download URL: ooo-dev-tools-gui-win-0.1.2.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.9.7 Windows/10

File hashes

Hashes for ooo-dev-tools-gui-win-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f58535b1b4c652969b77309ac0966a37512f1980543d35a1bff635dd9edfcffc
MD5 6227439fbb18a2c937481b5574ccc497
BLAKE2b-256 8ae2673242d81cbe21d81410b9d597bc3df9fbd1e7665225fb5d98e6e785a958

See more details on using hashes here.

File details

Details for the file ooo_dev_tools_gui_win-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ooo_dev_tools_gui_win-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4ce8efe8c3d56e4e1b55514275daa3066c32bc438a752d9c477798b608e0053c
MD5 62ce2efb29f537e5ec876ee047bb223f
BLAKE2b-256 0302fec4a05ef49d5d1aed6bd2e883350c4d3a2c03c7c4f2a1292f4d6a529565

See more details on using hashes here.

Supported by

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