Package org.odftoolkit.odfdom.changes
Class MapHelper
java.lang.Object
org.odftoolkit.odfdom.changes.MapHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.json.JSONObjectcreateBorderMap(String borderValue) map odf border strings to JSON border object see Changes API BordercreateColorMap(String rgbValue) see Changes API Colorstatic DoubledateToDouble(Object value) detectFormatType(String code) static StringfindOrCreateDataStyle(String code, long id, OdfFileDom fileDom) static StringgetLocaleFromLangCode(String languageCode) converts a language code from a string and interpretes the number as hex value and returns the a locale or null if either the format is wrong or no locale is knowngetMappedStyleProperties(OdfStyle style) static StringgetMSLangCode(String language, String country) converts locale information to a hex value string but without a hex marker like '0x' returns null if no value can be foundstatic voidgetStyleProperties(OdfStyleBase style, Map<String, OdfStylePropertiesSet> familyPropertyGroups, Map<String, Map<String, String>> allOdfProps) static voidgetStyleProperties(OdfStyleBase style, OdfStylableElement styleElement, Map<String, Map<String, String>> allOdfProps) static booleanstatic booleanstatic StringmapFoTextAlign(String propValue) static org.json.JSONObjectmapProperties(String styleFamilyGroup, Map<String, String> odfProps) static booleanmapStyleProperties(Map<String, OdfStylePropertiesSet> familyPropertyGroups, Map<String, Map<String, String>> allOdfProps) mapStyleProperties(OdfStylableElement styleElement, Map<String, Map<String, String>> allOdfProps) static booleanstatic voidmoveParaToCell(Map<String, Object> allHardFormatting) static intnormalizeLength(String value) Currently the normalized length is 100th millimeter (or 10 micrometer)static booleanputNumberFormat(Map<String, Object> jsonStyleProperties, Map<String, Map<String, String>> stringProperties, OdfStyle autoStyle, OdfStylesBase autoStyles, OdfStylesBase officeStyles) get number format attribute via data-style-name attribute from one of the different number format style elements either from office styles or automatic styles names are (implicitly!) unique so it can only be found in one of the two containersstatic StringremoveQuotedAndColor(String compareCode) static DoubletimeToDouble(Object value)
-
Field Details
-
AUTO
- See Also:
-
NORMAL
- See Also:
-
BOLD
- See Also:
-
THIN
- See Also:
-
MEDIUM
- See Also:
-
THICK
- See Also:
-
HASH
- See Also:
-
TRANSPARENT
- See Also:
-
-
Constructor Details
-
MapHelper
public MapHelper()
-
-
Method Details
-
createBorderMap
map odf border strings to JSON border object see Changes API Border -
isColor
-
mapColor
-
mapStyle
public static boolean mapStyle(org.json.JSONObject border, String style) throws org.json.JSONException - Throws:
org.json.JSONException
-
createColorMap
see Changes API Color -
mapWidth
-
normalizeLength
Currently the normalized length is 100th millimeter (or 10 micrometer) -
mapProperties
-
mapFoTextAlign
-
mapStyleProperties
-
mapStyleProperties
-
getMappedStyleProperties
-
getStyleProperties
public static void getStyleProperties(OdfStyleBase style, OdfStylableElement styleElement, Map<String, Map<String, String>> allOdfProps) -
getStyleProperties
public static void getStyleProperties(OdfStyleBase style, Map<String, OdfStylePropertiesSet> familyPropertyGroups, Map<String, Map<String, String>> allOdfProps) -
dateToDouble
-
timeToDouble
-
putNumberFormat
public static boolean putNumberFormat(Map<String, Object> jsonStyleProperties, Map<String, Map<String, String>> stringProperties, OdfStyle autoStyle, OdfStylesBase autoStyles, OdfStylesBase officeStyles) get number format attribute via data-style-name attribute from one of the different number format style elements either from office styles or automatic styles names are (implicitly!) unique so it can only be found in one of the two containers- Parameters:
jsonStyleProperties-stringProperties-autoStyle-autoStyles- auto style interface, is allowed to b nullofficeStyles- should always be set- Returns:
-
removeQuotedAndColor
-
detectFormatType
-
findOrCreateDataStyle
-
getLocaleFromLangCode
converts a language code from a string and interpretes the number as hex value and returns the a locale or null if either the format is wrong or no locale is known -
getMSLangCode
converts locale information to a hex value string but without a hex marker like '0x' returns null if no value can be found -
moveParaToCell
-