Zotero LibreOffice Integration comprises extensions for LibreOffice/OpenOffice.org/NeoOffice and Zotero that communicate using local web servers. This fork supports the Tabbed UI from LibreOffice. Credit to Julakali (https://github.com/julakali)
- Eclipse
- LibreOffice 5.3+
- Oracle JDK (currently 1.8.0u121)
LibreOffice SDK is not required.
To build:
- Run
scripts/symlink_sdk
- Open Eclipse and import this project into your workspace.
- Right-click the project in the Eclipse Package Explorer and select "Java Build Path." Click the libraries tab and ensure that all referenced files exist, or else correct the paths.
- Double-click Zotero.jardesc. Click "Finish" to build Zotero.jar.
- Run
buildoxt.sh
from within thebuild
directory to buildinstall/Zotero_OpenOffice_Integration.oxt
- Install
Zotero_OpenOffice_Integration.oxt
into LibreOffice, either by choosing "Reinstall Extension" from within the Zotero preferences, by installing it manually from within LibreOffice, or by usingunopkg
from the command line.
This extension is fairly straightforward. It consists of a LibreOffice UNO based java extension for LibreOffice. The UNO runtime allows various programming languages to interface with a running LibreOffice process. The extension code is initialized by LibreOffice and starts execution in ZoteroOpenOfficeIntegrationImpl.java.
Communication between Zotero and LibreOffice is mediated in zoteroOpenOfficeIntegration.js where a TCP socket is initialized and used for both sending and receiving messages. The complimentary socket connection on the LibreOffice extension end is found in CommServer.java.
The Java extension code can be debugged directly during runtime. Follow these instructions to enable debugging in LibreOffice. Attempt performing a Zotero action in LibreOffice, which will freeze the process until a debugging client connects. Create a remote debugging configuration in Eclipse and run it. LibreOffice will unfreeze. If you add breakpoints in Eclipse they will be triggered freezing the LibreOffice process and allowing you to inspect the execution environment. This technique can be used to debug on remote or virtual machines too.