org.odftoolkit.odfdom.converter.core.utils
Class ODFUtils

java.lang.Object
  extended by org.odftoolkit.odfdom.converter.core.utils.ODFUtils

public class ODFUtils
extends Object

fixes for pdf conversion by Leszek Piotrowicz


Field Summary
static String NON_BREAKING_SPACE_STR
           
static String TAB_STR
           
 
Constructor Summary
ODFUtils()
           
 
Method Summary
static float[] getColumnWidths(org.odftoolkit.odfdom.dom.element.table.TableTableElement table, org.odftoolkit.odfdom.doc.OdfDocument odfDocument)
           
static List<String> getColumnWidthsAsString(Node table, org.odftoolkit.odfdom.doc.OdfDocument odfDocument)
           
static String getDimensionAsPixel(String s)
           
static Float getDimensionAsPoint(String s)
           
static org.odftoolkit.odfdom.incubator.doc.style.OdfStyle getOdfStyle(org.odftoolkit.odfdom.doc.OdfDocument odfDocument, String styleName, org.odftoolkit.odfdom.dom.style.OdfStyleFamily styleFamily)
           
static Integer getRelativeSize(String s)
           
static org.odftoolkit.odfdom.dom.element.style.StyleTableColumnPropertiesElement getStyleTableColumnPropertiesElement(org.odftoolkit.odfdom.incubator.doc.style.OdfStyle style)
           
static boolean hasPercentUnit(String s)
          Returns true if the given string has percent unit and false otherwise.
static float inchesToPoints(float value)
          Measurement conversion from inches to points.
static float millimetersToInches(float value)
          Measurement conversion from millimeters to inches.
static float millimetersToPoints(float value)
          Measurement conversion from millimeters to points.
static String stripTrailingDigits(String fontName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NON_BREAKING_SPACE_STR

public static final String NON_BREAKING_SPACE_STR
See Also:
Constant Field Values

TAB_STR

public static final String TAB_STR
See Also:
Constant Field Values
Constructor Detail

ODFUtils

public ODFUtils()
Method Detail

getColumnWidths

public static float[] getColumnWidths(org.odftoolkit.odfdom.dom.element.table.TableTableElement table,
                                      org.odftoolkit.odfdom.doc.OdfDocument odfDocument)

getColumnWidthsAsString

public static List<String> getColumnWidthsAsString(Node table,
                                                   org.odftoolkit.odfdom.doc.OdfDocument odfDocument)

getOdfStyle

public static org.odftoolkit.odfdom.incubator.doc.style.OdfStyle getOdfStyle(org.odftoolkit.odfdom.doc.OdfDocument odfDocument,
                                                                             String styleName,
                                                                             org.odftoolkit.odfdom.dom.style.OdfStyleFamily styleFamily)
                                                                      throws Exception
Throws:
Exception

getStyleTableColumnPropertiesElement

public static org.odftoolkit.odfdom.dom.element.style.StyleTableColumnPropertiesElement getStyleTableColumnPropertiesElement(org.odftoolkit.odfdom.incubator.doc.style.OdfStyle style)

getDimensionAsPoint

public static Float getDimensionAsPoint(String s)

getRelativeSize

public static Integer getRelativeSize(String s)

hasPercentUnit

public static boolean hasPercentUnit(String s)
Returns true if the given string has percent unit and false otherwise.

Parameters:
s -
Returns:

millimetersToPoints

public static final float millimetersToPoints(float value)
Measurement conversion from millimeters to points.

Parameters:
value - a value in millimeters
Returns:
a value in points
Since:
2.1.2

inchesToPoints

public static final float inchesToPoints(float value)
Measurement conversion from inches to points.

Parameters:
value - a value in inches
Returns:
a value in points
Since:
2.1.2

millimetersToInches

public static final float millimetersToInches(float value)
Measurement conversion from millimeters to inches.

Parameters:
value - a value in millimeters
Returns:
a value in inches
Since:
2.1.2

getDimensionAsPixel

public static String getDimensionAsPixel(String s)

stripTrailingDigits

public static String stripTrailingDigits(String fontName)


Copyright © 2013. All rights reserved.