LO Base Macro Object Hierarchy Questions

The traditonal start is Andrew Pitonyak “Macros explained”
https://www.pitonyak.org/oo.php

and there is the guide for Base hidden on the 2nd page as last updates were for 7.3 (does not matter, as Base has few changes)

Above document started as a translation of the german guide. The latter is updated by the author, and the xhtml-version may be readable with modern browsers offering translation (switch that off, before you copy code):

For the api-reference start here (on a long journey):
https://api.libreoffice.org/

For a better IDE consider to change the language.
I use BASIC as my scripts are usually small, so there are not much benefits from other languages when you concat 3 cells and feed that to an API-call.
But the api can be called from a lot of languages and there are much better IDEs out there for Python, Java etc. and I remember here is one guy using Jupyter-notebooks as IDE.
On the downside: you will spend some time for setup…

Maybe inspect the topic api-typing at the bottom of this page (but that is for python):

1 Like

@Wanderer: Its me you know it!

yes its not like »click here and youre done« but its managable by humans.

@clh333: I would strongly recommend to NOT use this tool … except you like it to cover the existing Api with an extra layer around, and to produce Code which can only be used by others if you force them to install tho whole thing also!

[Tutorial] Introduction into object inspection with MRI

Thank you all for your responses. I’ll start with Wanderer’s suggestion; my Python and Java are shamefully weak.

-CH-

Andrew Pitonyak has written an excellent book dedicated to LibreOffice Base: AndrewBase.odt.

I found useful information in each of the suggested documents. The concept of an open source .NET framework was new to me but I understand the appeal of the strategy. Until I become much more familiar with LibreOffice in its entirety I will of necessity limit the range of my exploration. MariaDB will be my SQL dialect and Base / Basic my IDE.

I would however also like to commend the work of the authors of dbeaver, mdb-tools, kexi and UcanAccess for their contributions to this area of the field. I’m sure there are others as well who have escaped my attention. But speaking generally; working in the US IT industry I found the landscape was pretty well delimited by Microsoft and Oracle.

I have great respect and appreciation for the efforts of the open source community. Thank you all for your contributions.

To be honest: StarOffice was closed source until it was bought by Sun and then published under LGPL.

  1. Install MRI.

I get 404 when I follow the download link: http://extensions.services.openoffice.org/en/project/MRI.

Edit: Found it here: MRI - UNO Object Inspection Tool | Apache OpenOffice Extensions

Says MRI “needs Python-UNO binding installation” and notes: “This extension was not updated recently. It might not work with latest versions of OpenOffice.” I’m running v.25.8.

The Fedora 43 installation has Python installed but I’m not sure about the UNO binding.

This link MRI - UNO Object Inspection Tool | Apache OpenOffice Extensions works for me.

Its outdated anyway, use MRI-1.3.5.oxt directly from the github-page

Download the latest oxt from MRI/files at master · hanya/MRI · GitHub
and call menu:Tools>Extensions… [Add…]

About MRI Extension
Trying to update MRI

MRI on the extensions site is not up to date.

Located and installed, thanks.

Next:

chudson@fedora:~$ rpm -q python3-uno
package python3-uno is not installed
chudson@fedora:~$ sudo dnf install python3-uno
[sudo] password for chudson:
Updating and loading repositories:
google-chrome 100% | 6.0 KiB/s | 1.3 KiB | 00m00s
Fedora 43 - x86_64 - Updates 100% | 33.9 KiB/s | 17.0 KiB | 00m01s
Repositories loaded.
Failed to resolve the transaction:
No match for argument: python3-uno
You can try to add to command line:
–skip-unavailable to skip unavailable packages
chudson@fedora:~$

???

python3-uno should be installed together with LibreOffice.
Open a new text document.
Call Tools>Macros>Organize>Python…
Run Application Macros>HelloWorld>HelloWorldPyhon

Runs; i.e. places text in the document.

Great. Now you can familiarize yourself with MRI.

⇒ Tools ⇒ Addons ⇒ Mri ( or Mri Selection )