Preface
Scripting support for any programming language is implemented in LibreOffice and OpenOffice using respective UNO (Universal Network Objects) bridges. This means that other supported languages, including python, must negotiate a UNO bridge.
This comment from Dan Dascalescu offers a challenge to the community:
after 20 years of software development, the LibreOffice API is the crappiest one I’ve had the “pleasure” of working with. The documentation is horrible ,spread all over the place, littered with Uyghur , or completely missing. The LibreOffice macro IDE is also extremely unhelpful.
OOO Development Tools (OooDev) offers a python framework for the community to take another step to change this. The starting point is Java LibreOffice Programming which we thank Andrew Davison for kindly making available provided his work is acknowledged.
The website the Java code was originally found on is no longer available. WayBack Machine - Java LibreOffice Programming still has a copy of the website for now. An archive of the Java code is available at https://github.com/Amourspirit/libreoffice_lop_java. The origin book by Andrew Davison can be found in the LibreOffice Programming that was converted by flywire.
Generally speaking OooDev uses the Pep 8 style guide for python code; However, the LibreOffice API method names is in camelCase and the python method and function names should be in snake_case. When you see camelCase method names in the python code for OooDev it is because it is LibreOffice API code. This convention makes it easier to identify the source of the code.
Changes required are reformatting for this media since the scripts have missed a lot of detail including code, generalizing the content so it is more widely applicable to supported languages and complementing Python examples with examples of other language. Please contribute where you can.
- Authors:
:Barry-Thomas-Paul: Moss, Andrew Davison