Class OdtUtil

java.lang.Object
com.groiss.office.OdtUtil

public final class OdtUtil extends Object
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 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 context
      document - write $document
      Throws:
      Exception
    • getFromMap

      public static <V> V getFromMap(Map<String,V> m, String key)
      Get a value from a map.
      Parameters:
      m - the map - must be in the context
      key - the key for accessing the value in the map
    • formatField

      public static String formatField(Object formfield)
      Get the formatted form-field. Display-string of drop-downs or value lists.
      Parameters:
      formfield - reference to a form field