Page 1 of 1

Need Python Macro extention tutorial

PostPosted: Mon Sep 09, 2019 3:23 pm
by matmir
Hello,
I'm principiant on this ambient, but I'm a senior developer.
I know python language, but i don't find any tutorial to create oxt extension on libreoffice by python.
Is there someone to help me, to find pdf tutorial or link to any page to guide on step by step create oxt extension.
I'm open to any solution to resolve my problem.
Thanks to everyone who answers.
 Edit: This was originally posted in the Tutorials forum but it is not a tutorial and does not belong there.
-- MrProgrammer, Forum Moderator, 2019-09-09 14:14 UTC 

Re: Need Python Macro extention tutorial

PostPosted: Mon Sep 09, 2019 5:45 pm
by Villeroy
A Python macro is a script that is stored as plain text in <user_profile>/Scripts/python
It can be accessed through menu:Tools>Macros and several event dialogs for objects and menu:Tools>Customize... [Events]

An extension integrates some new class(es) into the application, including the API. You have to be familiar with the overall architekture, write xml files, install the SDK and generate IDL files.

I can offer a Writer template which stores a plain text file (i.e. a macro) within the script folder.
You edit a user-defined text field (dbl-clikc), call a Basic macro which is part of the template and the document text will be installed as plain text.
---
Currently, I can not access my templates. Here is a macro document derived from the said template: viewtopic.php?f=21&t=97134

Extensions wiki: https://wiki.openoffice.org/wiki/Extensions

Re: Need Python Macro extention tutorial

PostPosted: Mon Sep 09, 2019 7:43 pm
by Villeroy
ExtensionCompiler.ott is a Writer template which works very much like a huge input form.

Re: Need Python Macro extention tutorial

PostPosted: Fri Sep 20, 2019 9:08 pm
by arvchristos
During GSOC 2018, I compiled some useful guides about LibreOffice/OpenOffice extension development. Those guides include all the steps I followed while creating the result extensions of my project. Here is the wiki:
https://github.com/eellak/gsoc2018-librecust/wiki