LibreOffice / noa-libre

UNO API of LibreOffice easy and understandable - Nice Office Access
GNU Lesser General Public License v2.1
37 stars 21 forks source link

EasyHack: Update code examples to work with noa-libre >= 3.0 #12

Open xbubli opened 8 years ago

xbubli commented 8 years ago

Since noa-libre 3.0, Libreoffice UNO runtime environment jars are no longer included in the release. This means that the old code will no longer work with 3.0 and newer, as the main class of an application using noa is now best to be loaded with URLClassLoader aware of possible locations of UNO on the system.

This task is about rewriting all code examples (in examples folder) to work with noa-libre 3.0 using URLClassLoader that comes with it (ag.ion.bion.officelayer.util.OfficeLoader). One of the possible ways to do it is to move the body of the code example into a nested class and load it with OfficeLoader from the top-level class.

It is already done in this Calc example and this simple connection example, feel free to use those as an inspiration.