Package com.groiss.office
Class OdtUtil
java.lang.Object
com.groiss.office.OdtUtil
Utilities for inserting replacing variables in open office documents.
It is not intended to use these methods directly, but to write the method calls
into the open office templates, see the Programming Guide for examples.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
formatField
(Object formfield) Get the formatted form-field.static <V> V
getFromMap
(Map<String, V> m, String key) Get a value from a map.static Node
insertImage
(Object img, org.odftoolkit.odfdom.doc.OdfDocument document) Insert an image into the document.
-
Method Details
-
insertImage
public static Node insertImage(Object img, org.odftoolkit.odfdom.doc.OdfDocument document) throws Exception Insert an image into the document.- Parameters:
img
- the url of an image or a variable from the contextdocument
- write $document- Throws:
Exception
-
getFromMap
Get a value from a map.- Parameters:
m
- the map - must be in the contextkey
- the key for accessing the value in the map
-
formatField
Get the formatted form-field. Display-string of drop-downs or value lists.- Parameters:
formfield
- reference to a form field
-