Class Index | File Index

Classes


Class odf.Style2CSS


Defined in: Style2CSS.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<inner>  
addDrawPageFrameDisplayRules(sheet, styleName, properties, node)
Adds rules to control the display of certain frame classes in master pages when shown in page using the master page.
<inner>  
addPageStyleRules(sheet, node)
<inner>  
addRule(sheet, family, name, node)
<inner>  
addRules(sheet, family, name, node)
<inner>  
addStyleRule(sheet, family, name, node)
<inner>  
applySimpleMapping(props, mapping)
<inner>  
createSelector(family, name)
<inner>  
Make sure border width is no less than 1px wide; otherwise border is not rendered.
<inner>  
fixMargin(props, namespace, name, value)
Margins can be a percentage of the parent style.
<inner>  
getDerivedStyleNames(styleName, node)
Gets a list with the names of all styles derived from the given style, including the name of the style itself.
<inner>  
<inner>  
getFontSize(styleNode)
Returns the font size attribute value from the text properties of a style node
<inner>  
<inner>  
<inner>  
getParentStyleNode(styleNode)
Returns the parent style node of a given style node
<inner>  
getSelectors(family, name, node)
<inner>  
<inner>  
<inner>  
<inner>  
<inner>  
<inner>  
hexToRgb(hex)
<inner>  
<inner>  
matchToRgb(m, r, g, b)
<inner>  
Parse the style:text-position property http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1420212_253892949 Examples: "sub" "super 20%" "10% 20%" "-15% 50%"
 
style2css(doctype, rootNode, stylesheet, fontFaceMap, styleTree)
Class Detail
odf.Style2CSS()
Method Detail
<inner> {undefined} addDrawPageFrameDisplayRules(sheet, styleName, properties, node)
Adds rules to control the display of certain frame classes in master pages when shown in page using the master page.
Parameters:
{!CSSStyleSheet} sheet
{!string} styleName
{!Element} properties
{!odf.StyleTreeNode} node
Returns:
{undefined}

<inner> {undefined} addPageStyleRules(sheet, node)
Parameters:
{!CSSStyleSheet} sheet
{!Element} node
/
Returns:
{undefined}

<inner> {undefined} addRule(sheet, family, name, node)
Parameters:
{!CSSStyleSheet} sheet
{string} family
{string} name
{!odf.StyleTreeNode} node
Returns:
{undefined}

<inner> {undefined} addRules(sheet, family, name, node)
Parameters:
{!CSSStyleSheet} sheet
{string} family
{string} name
{!odf.StyleTreeNode} node
Returns:
{undefined}

<inner> {undefined} addStyleRule(sheet, family, name, node)
Parameters:
{!CSSStyleSheet} sheet
{string} family
{string} name
{!odf.StyleTreeNode} node
Returns:
{undefined}

<inner> {!string} applySimpleMapping(props, mapping)
Parameters:
{!Element} props
{!Array.>} mapping
Returns:
{!string}

<inner> {?string} createSelector(family, name)
Parameters:
{!string} family
{!string} name
Returns:
{?string}

<inner> {!string} fixBorderWidth(value)
Make sure border width is no less than 1px wide; otherwise border is not rendered. Only have problems with point unit at the moment. Please add more rule if needed.
Parameters:
{!string} value
a string contains border attributes eg. 1pt solid black or 1px
Returns:
{!string}

<inner> {!string} fixMargin(props, namespace, name, value)
Margins can be a percentage of the parent style. Resolve to absolute value. See http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1419838_253892949 for further information.
Parameters:
{!Element} props
{!string} namespace
to use when looking up attributes in parents
{!string} name
of attribute to lookup in parents
{!string} value
a string contains margin attributes eg. 1px
Returns:
{!string}

<inner> {!Array.} getDerivedStyleNames(styleName, node)
Gets a list with the names of all styles derived from the given style, including the name of the style itself.
Parameters:
{!string} styleName
{!odf.StyleTreeNode} node
Returns:
{!Array.}

<inner> {string} getDrawingPageProperties(props)
Parameters:
{!Element} props
Returns:
{string}

<inner> {?{value: !number|unit: !string}} getFontSize(styleNode)
Returns the font size attribute value from the text properties of a style node
Parameters:
{?Element} styleNode
Returns:
{?{value: !number|unit: !string}}

<inner> {string} getGraphicProperties(props)
Parameters:
{!Element} props
Returns:
{string}

<inner> {!string} getParagraphProperties(props)
Parameters:
{!Element} props
Returns:
{!string}

<inner> {Element} getParentStyleNode(styleNode)
Returns the parent style node of a given style node
Parameters:
{!Element} styleNode
Returns:
{Element}

<inner> {!Array.} getSelectors(family, name, node)
Parameters:
{!string} family
{!string} name
{!odf.StyleTreeNode} node
Returns:
{!Array.}

<inner> {string} getTableCellProperties(props)
Parameters:
{!Element} props
Returns:
{string}

<inner> {string} getTableColumnProperties(props)
Parameters:
{!Element} props
Returns:
{string}

<inner> {string} getTableProperties(props)
Parameters:
{!Element} props
Returns:
{string}

<inner> {string} getTableRowProperties(props)
Parameters:
{!Element} props
Returns:
{string}

<inner> {!string} getTextProperties(props)
Parameters:
{!Element} props
Returns:
{!string}

<inner> {?{ r: number|g: number|b: number}} hexToRgb(hex)
Parameters:
{!string} hex
Returns:
{?{ r: number|g: number|b: number}}

<inner> {boolean} isNumber(n)
Parameters:
{string} n
Returns:
{boolean}

<inner> {string} matchToRgb(m, r, g, b)
Parameters:
{*} m
{string} r
{string} g
{string} b
Returns:
{string}

<inner> {!{verticalTextPosition: !string|fontHeight: (!string|undefined)}} parseTextPosition(position)
Parse the style:text-position property http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1420212_253892949 Examples: "sub" "super 20%" "10% 20%" "-15% 50%"
Parameters:
{!string} position
Returns:
{!{verticalTextPosition: !string|fontHeight: (!string|undefined)}}

{undefined} style2css(doctype, rootNode, stylesheet, fontFaceMap, styleTree)
Parameters:
{!string} doctype
{!Element} rootNode
{!CSSStyleSheet} stylesheet
{!Object.} fontFaceMap
{!Object.>} styleTree
Returns:
{undefined}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Aug 06 2015 04:10:41 GMT+0200 (MESZ)