Skip to content

A simple java uno sample using to develop libreoffice extension to control libreoffice event and create custom interface in libreoffice

License

Notifications You must be signed in to change notification settings

IOException722/LibreOfficeExtensionJavaUnoSample

Repository files navigation

LibreOffice Starter Extension

This repository contains some boilerplate code and config you need to get started to build your own LibreOffice Extension.

You can use this project as a starting point to write your own extension for LibreOffice.

Get started

  1. Install LibreOffice & LibreOffice SDK (5.0 or greater)
  2. Install Eclipse & the LOEclipse plugin
  3. Download this starter project & unzip it
  4. Import the project in Eclipse (File->Import->Existing Projects into Workspace)
  5. Let Eclipse know the paths to LibreOffice & the SDK (Project->Properties->LibreOffice Properties)
  6. Setup Run Configuration
  • Go to Run->Run Configurations
  • Create a new run configuration of the type "LibreOffice Application"
  • Select the project
  • Run!
  • Hint: Show the error log to view the output of the run configuration (Window->Show View->Error Log)
  1. The extension will be installed in LibreOffice and you will see a toolbar and a menu entry have been added to Writer.

Development Hints

  • The entry point is in StarterProjectImpl.java.
  • Toolbar items and menu entries are defined in Addons.xcu.
  • Shortcuts are defined in Accelerators.xcu.
  • The position of the toolbar is defined in WriterWindowState.xcu.
  • The dialog shown when clicking "Action One" is ActionOneDialog.xdl. The dialog itself contains information how to edit it.
  • The DialogHelper contains lots of helper methods to work with the dialog.
  • To debug the Java code, just stick a breakpoint anywhere in Eclipse and start your run configuration in debug mode.
  • If you add non-code files to your extension, you need to mention them in package.properties, else they won't be included in the packaged extension.
  • Now go on customizing the extension to your needs. You'll find lots of information in the OpenOffice Wiki.

LibreOfficeExtensionJavaUnoSample

About

A simple java uno sample using to develop libreoffice extension to control libreoffice event and create custom interface in libreoffice

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages