Class Index | File Index

Classes


Class odf.StyleInfo


Defined in: StyleInfo.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<inner>  
changeFontFaceNames(styleElement, fontFaceNameChangeMap)
Changes all names of font-face declarations which are referenced in the children elements of the given root element.
<inner>  
collectUsedFontFaces(usedFontFaceDeclMap, styleElement)
Collects all names of font-face declarations which are referenced in the children elements of the given root element.
<inner>  
determineDependentStyles(element, styleScope, knownStyles)
Builds a style dependency map for the supplied style tree
<inner>  
determineStylesForNode(element, usedStyles)
Determines all stylenames that are referenced in the passed element
<inner>  
determineUsedStyles(styleUsingElementsRoot, usedStyles)
Determines all stylenames that are referenced in the passed element tree
<inner>  
getStyleDefinition(stylename, stylefamily, knownStyles)
<inner>  
getStyleName(family, element)
Return the name of the style for the given family if it is associated with the element.
<inner>  
hasDerivedStyles(odfbody, nsResolver, styleElement)
Return if a particular element is the parent style for any other style of the same family.
<inner>  
Creates the elements data from the elementstyles data.
<inner>  
mergeRequiredStyles(styleDependency, usedStyles)
Merges the specified style, and style required to complete it into the usedStyles map
<inner>  
mergeUsedAutomaticStyles(automaticStylesRoot, usedStyles)
Marks all required styles as used for any automatic styles referenced within the existing usedStyles map
<inner>  
prefixStyleName(styleElement, prefix)
Prefixes the id of the style defined in the given DOM element with the given prefix.
<inner>  
prefixStyleNames(styleElementsRoot, prefix, styleUsingElementsRoot)
Prefixes all style ids with the given prefix.
<inner>  
prefixUsedStyleNames(element, prefix)
Prefixes all style ids used to refer to styles in the given DOM element tree with the given prefix.
<inner>  
removePrefixFromStyleNames(styleElementsRoot, prefix, styleUsingElementsRoot)
Removes the given prefix from all style ids.
<inner>  
removeRegExpFromStyleName(styleElement, regExp)
Remove the given regular expression from the id of the style defined in the given DOM element.
<inner>  
Class Detail
odf.StyleInfo()
Method Detail
<inner> {undefined} changeFontFaceNames(styleElement, fontFaceNameChangeMap)
Changes all names of font-face declarations which are referenced in the children elements of the given root element.
Parameters:
{?Element} styleElement
root element with style elements as childs
{!Object.} fontFaceNameChangeMap
Returns:
{undefined}

<inner> {undefined} collectUsedFontFaces(usedFontFaceDeclMap, styleElement)
Collects all names of font-face declarations which are referenced in the children elements of the given root element.
Parameters:
{!Object.} usedFontFaceDeclMap
{?Element} styleElement
root element with style elements as childs
Returns:
{undefined}

<inner> {!Object.} determineDependentStyles(element, styleScope, knownStyles)
Builds a style dependency map for the supplied style tree
Parameters:
{!Element} element
root element of tree of elements using styles
{?StyleDefinition} styleScope
parent style the specified style element is part of
{!Object.} knownStyles
map of used stylesnames, grouped by keyname
Returns:
{!Object.}

<inner> {!Object.>|undefined} determineStylesForNode(element, usedStyles)
Determines all stylenames that are referenced in the passed element
Parameters:
{!Element} element
element to check for styles
{!Object.>=} usedStyles
map of used styles names, grouped by style family
Returns:
{!Object.>|undefined} Returns either map of used styles, or undefined if none have been found an usedStyles was not passed in

<inner> {undefined} determineUsedStyles(styleUsingElementsRoot, usedStyles)
Determines all stylenames that are referenced in the passed element tree
Parameters:
{!Element} styleUsingElementsRoot
root element of tree of elements using styles
{!Object.>} usedStyles
map of used styles names, grouped by style family
Returns:
{undefined}

<inner> {!StyleDefinition} getStyleDefinition(stylename, stylefamily, knownStyles)
Parameters:
{!string} stylename
{!string} stylefamily
{!Object.} knownStyles
map of used stylesnames, grouped by keyname
Returns:
{!StyleDefinition}

<inner> {!string|undefined} getStyleName(family, element)
Return the name of the style for the given family if it is associated with the element.
Parameters:
{!string} family
{!Element} element
Returns:
{!string|undefined}

<inner> {!boolean} hasDerivedStyles(odfbody, nsResolver, styleElement)
Return if a particular element is the parent style for any other style of the same family.
Parameters:
{!Element} odfbody
{!function(string):?string} nsResolver
{!Element} styleElement
Returns:
{!boolean}

<inner> {!Object.>>>} inverse()
Creates the elements data from the elementstyles data.
Returns:
{!Object.>>>}

<inner> {undefined} mergeRequiredStyles(styleDependency, usedStyles)
Merges the specified style, and style required to complete it into the usedStyles map
Parameters:
{!StyleDefinition} styleDependency
Style to merge
{!Object.>} usedStyles
Styles map to merge data into
Returns:
{undefined}

<inner> {undefined} mergeUsedAutomaticStyles(automaticStylesRoot, usedStyles)
Marks all required styles as used for any automatic styles referenced within the existing usedStyles map
Parameters:
{!Element} automaticStylesRoot
Automatic styles tree root
{!Object.>} usedStyles
Styles already referenced
Returns:
{undefined}

<inner> {undefined} prefixStyleName(styleElement, prefix)
Prefixes the id of the style defined in the given DOM element with the given prefix.
Parameters:
{!Element} styleElement
{!string} prefix
Returns:
{undefined}

<inner> {undefined} prefixStyleNames(styleElementsRoot, prefix, styleUsingElementsRoot)
Prefixes all style ids with the given prefix. This will affect all style ids as set in the style definitions by the child elements of styleElementsRoot and all style ids used to refer to styles, both in these style definitions and in the given DOM element tree styleUsingElementsRoot.
Parameters:
{?Element} styleElementsRoot
root element with styles nodes as childs
{!string} prefix
{?Element} styleUsingElementsRoot
root element of tree of elements using styles
Returns:
{undefined}

<inner> {undefined} prefixUsedStyleNames(element, prefix)
Prefixes all style ids used to refer to styles in the given DOM element tree with the given prefix.
Parameters:
{!Element} element
root element of tree of elements using styles
{!string} prefix
Returns:
{undefined}

<inner> removePrefixFromStyleNames(styleElementsRoot, prefix, styleUsingElementsRoot)
Removes the given prefix from all style ids. This will affect all style ids as set in the style definitions by the child elements of styleElementsRoot and all style ids used to refer to styles, both in these style definitions and in the given DOM element tree styleUsingElementsRoot.
Parameters:
{?Element} styleElementsRoot
root element with styles nodes as childs
{!string} prefix
{?Element} styleUsingElementsRoot
root element of tree of elements using styles

<inner> {undefined} removeRegExpFromStyleName(styleElement, regExp)
Remove the given regular expression from the id of the style defined in the given DOM element.
Parameters:
{!Element} styleElement
{!RegExp} regExp
Returns:
{undefined}

<inner> {undefined} removeRegExpFromUsedStyleNames(element, regExp)
Parameters:
{!Element} element
root element of tree of elements using styles
{!RegExp} regExp
Returns:
{undefined}

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