Making Macro Programming a Breeze: The BASIC & API Reference Cards

Update: Reference card for runtime library is now available.

One of the recurring issue when using LibreOffice as a replacement of other office applications is the migration of macros to the LibreOffice BASIC dialect and objects. While the LibreOffice BASIC programming language is almost standard, the objects inside a document have different names, methods and properties, and a rework on the macro is necessary in most cases to make it operational again, when imported from other suites.

To address some of the needed rework, LibreOffice developers implemented in the past a complimentary set of statements and functions to LibreOffice BASIC bringing a compatibility mode to macros written in Visual Basic for Application (VBA) to reduce the need of rework on the macro code and use VBA objects and statements. In late 2017, some of the compatibility statements and functions were documented in our help pages.

But that is only part of the issue. The LibreOffice Application Programming Interface (API) is an extremely rich and granular interface with access to myriads of properties, interfaces, services and methods, which turns its usage a challenge for the occasional macro programmer, often not familiar with object oriented programming and complex data types.

But thanks to Jean François Nifenecker, a set of handy reference cards is now available to the BASIC programmer community. The 8 cards are divided by subjects, addressing the Integrated Development Environment (IDE), BASIC language overview, Calc most interesting objects and tricks, document and application events, runtime library, dialogs, files and execution parameters. The first 4 cards are now available in our documentation website in PDF and in ODT file formats and more will come as soon as they get translated from French to English. Just download the PDF version and print it in thick paper to have a quick access to information that you probably know it exist, but you forgot how to make it work.

Download the BASIC reference cards from our Macros documentation web page and get the original ODT file to translate these handy card in your native language.

Comments

    • By Olivier Hallot

  1. By Óvári

  2. By Óvári

    • By Olivier Hallot

  3. By Óvári

    • By Olivier Hallot

    • By Óvári

  4. By Óvári

    • By Olivier Hallot

      • By Óvári

    • By Óvári

  5. By Óvári

    • By Olivier Hallot