Install OooDev LibreOffice Extension
Overview
OooDev can also be installed as a LibreOffice extension. When OooDev is installed as an extension it will be available to all of the LibreOffice Suite via python Macros. The extension make is so you can use OooDev in any LibreOffice application without having to Pip install OooDev or compile scripts that use OooDev.
The OOO Development Tools extension is available on GitHub and LibreOffice Extensions.
Note
This guide assumes you have already installed LibreOffice.
Download
Download the extension and save it locally on your computer. The file will be named OooDev.oxt
.
Install
From LibreOffice open the extension manager, Tools -> Extension Manager
.
You should see a dialog similar to Fig. 1197.
Click Add and install the downloaded OooDev.oxt
file.
The installed extension will be seen in the extension manager as seen in Fig. 1198.
You may be prompted to restart LibreOffice. Restart to use extension.
Example
Using the APSO console (see Install APSO LibreOffice Extension) we can test the extension.
Write the following code in the APSO console.
from ooodev.loader.lo import Lo
from ooodev.office.write import Write
from ooodev.macro.macro_loader import MacroLoader
with MacroLoader():
cursor = Write.get_cursor(Write.active_doc)
Write.append_para(cursor=cursor, text="Hello World!")
You should see results similar to Fig. 1199.