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.
Just a reminder, the documentation pages are not mobile-friendly. The right-part of the main content is cut and invisable on my android device in Firefox.
Hi Kevin
I have made changes in the page. could you please visit again?
Thank you for the “API Reference Cards”.
The link:
https://documentation.libreoffice.org/en/english-documentation/macro/
has the reference cards in Letter and A4 paper format
“LibeOffice BASIC IDE” and “LibreOffice BASIC Overview” are in Letter paper format.
“LibreOffice BASIC Calc” is in A4 paper format.
Are you able to provide all these reference cards all in A4 paper format?
Thank you
IDE.odt and IDE.pdf –> Toolbars –> Macros Toolbar –> First column in table too narrow, icons not shown
IDE.odt –> Watches Panel –> Image not showing with LibreOffice 6.0.1.1
IDE.pdf –> page 2 –> End of 1st column not readable
Are you able to reproduce?
Thank you
Fixed.
Thank you
Calc.odt and Calc.pdf hyperlink only works from m, i.e.
mmons.org/licenses/by-sa/3.0/fr/
Should it be a hyperlink from h, i.e.
https://creativecommons.org/licenses/by-sa/3.0/fr/
Thank you
Fixed!
Can the licence be written as:
https://creativecommons.org/licenses/by-sa/4.0/
like the other Reference Cards?
Otherwise can it using a non-French licence as it is hard to read for English people?
Thank you
Calc.pdf page 1 header date format is mm/dd/yyyy, i.e. 01/13/2018
Should it be 13/01/2018, to be consistent with the other files and also the date format on page 2, second column, near the end?
Thank you
Changed date to full month…
Full month is even better. Thank you
Would it be better to write the date of the version shown at the bottom of the second column on page 2 as 2018-01-13 or Jan 13, 2018?
Calc.odf and Cald.pdf are written in dd/mm/yyyy format
The other documents are written in mm/dd/yyyy format
What do you think?
Thank you
Calc.odt does not show “Beginner” above the flag with LibreOffice 6.0.1.1. Are you able to reproduce?
Calc.pdf shows “Beginer” above the flag. Should this be “Beginner”?
Perhaps if all the documents were set to English (UK) the date format would automatically change to dd/mm/yyyy and spell checking could be used (with the English (UK) spell checker installed.
What do you think?
P.S. These Reference Cards are excellent. Thank you very much. If you would like us to do a quick check of the other card which will be released in the future please contact us.
Fixed and uploaded.
Thanks for the feedback !