Request: an easy object reference for people coming from office VBA

One of the main problems will be to have sufficient knowledge in both APIs to give information on translating.

Another is the very different approach to handle documents, so often there will be no direct translation.

However: You are aware of the limited support for VBA, wich LibreOffice provides? Support for VBA Macros

[Tutorial] Introduction into object inspection with MRI
https://www.pitonyak.org/oo.php

Thanks for the reference. I will study it.

But I feel that the object tutorial:
a) Should not need an extension.
b) Should be of libreoffice reference, not in a third page.

That is why I call it a request.

MRI is not a tutorial. MRI is a 3rd party convenience tool to help you unveil all properties and methods of UNO objects. The tutorial I have linked helps to understand the MRI tool with its hidden features. Currently MRI is the best help you can get for both suites OpenOffice and LibreOffice.
MRI demonstrates how to access UNO’s introspection interfaces. Any UNO object is self-documenting and an extension with a little GUI like MRI (or “Xray” which is written in Basic) is one way to make this self-documenting reference accessible. MRI can be linked to the official UNO documentation (online SDK or offline to a downloaded SDK), so a click on the help button opens the official reference of the current object in your browser.

In addition to the MRI tool (which is, I agree, still the best tool), there is an advancement in native tooling: built-in development tools since v.7.2 (available from Tools menu), that need yet more development to be as great as MRI, of course.

And there is still the developer’s guide: Apache OpenOffice Developer's Guide - Apache OpenOffice Wiki

Thanks, Villeroy. That Apache reference seems easier to read than the Libreoffice reference.

Is it updated? Last version of OpenOffice is years behind LibreOffice. Is the object model still the same?

Atentamente,
José G. Moya Y.

P.D. Escribo desde un móvil. Disculpe posibles erratas.

The overall architecture is identical. 99% of the objects are the same. MRI shows some differences in detail here and there.

https://wiki.documentfoundation.org/Macros

Many thanks to all of you.

Atentamente,
José G. Moya Y.

P.D. Escribo desde un móvil. Disculpe posibles erratas.

That is now also available as LibreOffice Developer's Guide - The Document Foundation Wiki (not completed yet) and will be further maintained.

Objects for LibreOffice API in Python.

I wrote the entire LibreOffice API in Python.
Just released it yesterday.

Project on github is python-ooouno

Hope this meets your needs.

Who flagged that and why?

I am not sure who flagged. I was assuming the system flagged it with some sort of rule or filter.

I am new still on how these forums operate.

This is part of the message I received in site notification.

Hello,

This is an automated message from Ask LibreOffice to let you know that your post was hidden.

Your post was flagged as spam: the community feels it is an advertisement, something that is overly promotional in nature instead of being useful or relevant to the topic as expected.

This post was hidden due to flags from the community, so please consider how you might revise your post to reflect their feedback. You can edit your post after 10 minutes, and it will be automatically unhidden.

However, if the post is hidden by the community a second time, it will remain hidden until handled by staff.

Someone didn’t recognize that the content is almost on-topic (well, in general, not VBA/Basic related though) and overeagerly clicked the flag… So, you can edit your post just a little to make it reappear. But, indeed it doesn’t really suit in this topic.

I don’t understand how this helps anybody.

As you may know LibreOffice supports macros in python.

In the basic IDE editor there is no type support. It does not let you see the methods and properties of LO object that you are working with.

The same thing is true with writing python macros.

This is where python-ooouno comes in. When added to a python/LibreOffice project in a Professional IDE such as Visual Studio Code you get full support for typing and more.

I am working a complex project in the LibreOffice Writer environment.
I started writing in VBA and realized quickly that it way to cumbersome and would not be productive to work on or maintain. This is when I switched to python ( thank god ) to develop this high level of complexity. Which includes complex dialogs generated entirely from python.

Still working in python as great as python is, I was missing all the LibreOffice API object typing. In short flying a bit blind and everything API related was duck typing much like VBA experience in LO.

I figured that many other LO developers would be having similar issues. Thus i wrote the library.

Cheers

3 Likes

Thank you very much. Crystal clear now. I used to write my extensions and macros with plain text editors.

1 Like

More info at I want (to make) a JS IntelliSense Plugin | Notepad++ Community