I need a plugin created that plugs into:
- OpenOffice 4.x Writer [mandatory]
- OpenOffice 3.4.x Writer [optional]
- LibreOffice 4.1 Writer [mandatory]
- LibreOffice 3.x Writer [optional]
It should be created entirely in Java if possible, or be created using whatever language that is used in the above office products. It should be able to handle the following scenarios:
A user creates a new document with some text, tables, graphs etc. (it has not been saved yet).
The user selects File->Run->Model (this is where the plugin will be available to the user).
The plugin does the following:
1) Call a Java class with a method public boolean handleFile(File odffile) that takes the ODF file (representing the content of the document that the user has not yet saved) as argument.
2) The method (which I will provide) does a lot of stuff on the ODF file archive and returns true if the process went well or false if not.
3) If method returns false the plugin should pop up a dialog with some information about the problem. Maybe call the same class with a method getError() or something like that.
4) If method returns true then the plugin will load the ODF file (which was given as argument to the Java method) in a new "window" in Writer. This means that the user now has both the unsaved version and the manipulated version open at the same time (none of them should be saved to disc - if possible).
So basically the plugin should be able to parse the unsaved ODF to a Java method and open a new "Window" with that manipulated ODF as content. Then a couple of simple error handling should be present if errors arise.
Looking forward to suggestions on how to approach this.