LibreOffice Module xmerge (master) 1
|
Represents a text Style
in an OpenOffice document.
More...
Public Member Functions | |
CellStyle (Node node, StyleCatalog sc) | |
Constructor for use when going from DOM to client device format. More... | |
CellStyle (String name, String family, String parent, Format fmt, StyleCatalog sc) | |
Constructor for use when going from client device format to DOM. More... | |
Format | getFormat () |
Returns the Format object for this particular style. More... | |
Style | getResolved () |
Return a Style object corresponding to this one, but with all of the inherited information from parent Style objects filled in. More... | |
Node | createNode (org.w3c.dom.Document parentDoc, String name) |
Create a new Node in the Document , and write this Style to it. More... | |
boolean | isSubset (Style style) |
Return true if style specifies as much or less than this Style , and nothing it specifies contradicts this Style . More... | |
Public Member Functions inherited from org.openoffice.xmerge.converter.xml.Style | |
Style (Node node, StyleCatalog sc) | |
Constructor for use when going from DOM to client device format. More... | |
Style (String name, String family, String parent, StyleCatalog sc) | |
Constructor for use when going from client device format to DOM. More... | |
void | setCatalog (StyleCatalog sc) |
Set the StyleCatalog to be used when looking up the Style parent. More... | |
String | getName () |
Returns the name of this Style . More... | |
void | setName (String newName) |
Sets the name of this Style . More... | |
String | getFamily () |
Return the family of this Style . More... | |
String | getParent () |
Return the name of the parent of this Style . More... | |
Style | getResolved () |
Return a Style object corresponding to this one, but with all of the inherited information from parent Style objects filled in. More... | |
Node | createNode (org.w3c.dom.Document parentDoc, String name) |
Write a Node in parentDoc representing this Style . More... | |
boolean | isSubset (Style style) |
Return true if Style is a subset of this one. More... | |
Private Member Functions | |
Color | parseColorString (String value) |
Parse a color specification of the form #rrggbb. More... | |
void | handleAttribute (String attr, String value) |
Set an attribute. More... | |
void | writeAttributes (Element node) |
Write this Style object's attributes to a Node in the Document . More... | |
String | buildColorString (Color c) |
Given a Color , return a string of the form #rrggbb. More... | |
boolean | isIgnored (String attribute) |
This code checks whether an attribute is one that we intentionally ignore. More... | |
Private Attributes | |
Format | fmt = new Format() |
Static Private Attributes | |
static String[] | ignored |
Additional Inherited Members | |
Protected Attributes inherited from org.openoffice.xmerge.converter.xml.Style | |
String | name = null |
Name of the Style . More... | |
String | family = null |
Family of the Style . More... | |
String | parent = null |
Parent of the Style . More... | |
StyleCatalog | sc |
A reference to the StyleCatalog to be used for looking up ancestor Style objects. More... | |
Represents a text Style
in an OpenOffice document.
Definition at line 35 of file CellStyle.java.
|
inline |
Constructor for use when going from DOM to client device format.
node | The style:style Node containing the Style . (This Node is assumed have a family attribute of text). |
sc | The StyleCatalog , which is used for looking up ancestor Style objects. |
Definition at line 48 of file CellStyle.java.
References org.openoffice.xmerge.converter.xml.sxc.CellStyle.handleAttribute(), i, and String.
Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.getResolved(), and org.openoffice.xmerge.converter.xml.sxc.CellStyle.isSubset().
|
inline |
Constructor for use when going from client device format to DOM.
name | Name of cell Style . Can be null . |
family | Family of text Style (usually text). Can be null . |
parent | Name of parent text Style , or null for none. |
fmt | size in points. |
sc | The StyleCatalog , which is used for looking up ancestor Style objects. |
Definition at line 98 of file CellStyle.java.
References org.openoffice.xmerge.converter.xml.Style.family, org.openoffice.xmerge.converter.xml.sxc.CellStyle.fmt, org.openoffice.xmerge.converter.xml.Style.name, and org.openoffice.xmerge.converter.xml.Style.parent.
|
inlineprivate |
Given a Color
, return a string of the form #rrggbb.
c | The Color value. |
Color
value in the form #rrggbb. Definition at line 439 of file CellStyle.java.
References String.
Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.writeAttributes().
|
inline |
Create a new Node
in the Document
, and write this Style
to it.
parentDoc | Parent Document of the Node to create. |
name | Name to use for the new Node (e.g. style:style) |
Node
. Definition at line 331 of file CellStyle.java.
References org.openoffice.xmerge.converter.xml.Style.name, and org.openoffice.xmerge.converter.xml.sxc.CellStyle.writeAttributes().
|
inline |
Returns the Format
object for this particular style.
Format
object Definition at line 109 of file CellStyle.java.
References org.openoffice.xmerge.converter.xml.sxc.CellStyle.fmt.
Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.getResolved(), org.openoffice.xmerge.converter.xml.sxc.CellStyle.isSubset(), org.openoffice.xmerge.converter.xml.sxc.SxcDocumentSerializer.traverseCell(), and org.openoffice.xmerge.converter.xml.sxc.SxcDocumentSerializer.traverseTableColumn().
|
inline |
Return a Style
object corresponding to this one, but with all of the inherited information from parent Style
objects filled in.
The object returned will be a new object, not a reference to this object, even if it does not need any information added.
StyleCatalog
in which to look up ancestors. Reimplemented from org.openoffice.xmerge.converter.xml.Style.
Definition at line 263 of file CellStyle.java.
References org.openoffice.xmerge.converter.xml.sxc.Format.BOLD, org.openoffice.xmerge.converter.xml.sxc.Format.BOTTOM_ALIGN, org.openoffice.xmerge.converter.xml.sxc.CellStyle.CellStyle(), clone(), org.openoffice.xmerge.util.Debug.ERROR, Exception, org.openoffice.xmerge.converter.xml.Style.family, org.openoffice.xmerge.converter.xml.sxc.CellStyle.fmt, org.openoffice.xmerge.converter.xml.sxc.Format.getAlign(), org.openoffice.xmerge.converter.xml.sxc.Format.getAttribute(), org.openoffice.xmerge.converter.xml.sxc.Format.getBackground(), org.openoffice.xmerge.converter.xml.sxc.Format.getFontName(), org.openoffice.xmerge.converter.xml.sxc.Format.getFontSize(), org.openoffice.xmerge.converter.xml.sxc.Format.getForeground(), org.openoffice.xmerge.converter.xml.sxc.CellStyle.getFormat(), org.openoffice.xmerge.converter.xml.sxc.CellStyle.getResolved(), org.openoffice.xmerge.converter.xml.sxc.Format.getVertAlign(), org.openoffice.xmerge.converter.xml.sxc.Format.LEFT_ALIGN, org.openoffice.xmerge.util.Debug.log(), m, org.openoffice.xmerge.converter.xml.Style.name, org.openoffice.xmerge.converter.xml.Style.parent, org.openoffice.xmerge.converter.xml.sxc.Format.setAlign(), org.openoffice.xmerge.converter.xml.sxc.Format.setAttribute(), org.openoffice.xmerge.converter.xml.sxc.Format.setBackground(), org.openoffice.xmerge.converter.xml.sxc.Format.setFontName(), org.openoffice.xmerge.converter.xml.sxc.Format.setFontSize(), org.openoffice.xmerge.converter.xml.sxc.Format.setForeground(), org.openoffice.xmerge.converter.xml.sxc.Format.setVertAlign(), and org.openoffice.xmerge.converter.xml.sxc.Format.SUBSCRIPT.
Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.getResolved().
|
inlineprivate |
Set an attribute.
attr | The attribute to set. |
value | The attribute value to set. |
Definition at line 143 of file CellStyle.java.
References org.openoffice.xmerge.converter.xml.sxc.Format.BOLD, org.openoffice.xmerge.converter.xml.sxc.Format.BOTTOM_ALIGN, org.openoffice.xmerge.converter.xml.sxc.Format.BOTTOM_BORDER, org.openoffice.xmerge.converter.xml.sxc.Format.CENTER_ALIGN, org.openoffice.xmerge.util.Debug.ERROR, org.openoffice.xmerge.converter.xml.sxc.CellStyle.fmt, org.openoffice.xmerge.util.Debug.INFO, Integer, org.openoffice.xmerge.converter.xml.sxc.CellStyle.isIgnored(), org.openoffice.xmerge.converter.xml.sxc.Format.ITALIC, org.openoffice.xmerge.converter.xml.sxc.Format.LEFT_ALIGN, org.openoffice.xmerge.converter.xml.sxc.Format.LEFT_BORDER, org.openoffice.xmerge.util.Debug.log(), org.openoffice.xmerge.converter.xml.sxc.Format.MIDDLE_ALIGN, org.openoffice.xmerge.converter.xml.sxc.CellStyle.parseColorString(), org.openoffice.xmerge.converter.xml.sxc.Format.RIGHT_ALIGN, org.openoffice.xmerge.converter.xml.sxc.Format.RIGHT_BORDER, org.openoffice.xmerge.converter.xml.sxc.Format.setAlign(), org.openoffice.xmerge.converter.xml.sxc.Format.setAttribute(), org.openoffice.xmerge.converter.xml.sxc.Format.setBackground(), org.openoffice.xmerge.converter.xml.sxc.Format.setFontName(), org.openoffice.xmerge.converter.xml.sxc.Format.setFontSize(), org.openoffice.xmerge.converter.xml.sxc.Format.setForeground(), org.openoffice.xmerge.converter.xml.sxc.Format.setVertAlign(), org.openoffice.xmerge.converter.xml.sxc.Format.STRIKETHRU, String, org.openoffice.xmerge.converter.xml.sxc.Format.SUBSCRIPT, org.openoffice.xmerge.converter.xml.sxc.Format.SUPERSCRIPT, org.openoffice.xmerge.converter.xml.sxc.Format.TOP_ALIGN, org.openoffice.xmerge.converter.xml.sxc.Format.TOP_BORDER, org.openoffice.xmerge.converter.xml.sxc.Format.UNDERLINE, value, and org.openoffice.xmerge.converter.xml.sxc.Format.WORD_WRAP.
Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.CellStyle().
|
inlineprivate |
This code checks whether an attribute is one that we intentionally ignore.
attribute | The attribute to check. |
true
if attribute
can be ignored, otherwise false
. Definition at line 464 of file CellStyle.java.
References attribute, i, and org.openoffice.xmerge.converter.xml.sxc.CellStyle.ignored.
Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.handleAttribute().
|
inline |
Return true
if style
specifies as much or less than this Style
, and nothing it specifies contradicts this Style
.
style | The Style to check. |
true
if style
is a subset, false
otherwise. Reimplemented from org.openoffice.xmerge.converter.xml.Style.
Definition at line 347 of file CellStyle.java.
References org.openoffice.xmerge.converter.xml.sxc.CellStyle.CellStyle(), org.openoffice.xmerge.converter.xml.sxc.CellStyle.fmt, org.openoffice.xmerge.converter.xml.sxc.CellStyle.getFormat(), and org.openoffice.xmerge.converter.xml.sxc.Format.isSubset().
|
inlineprivate |
Parse a color specification of the form #rrggbb.
value | Color specification to parse. |
Color
associated the value. Definition at line 120 of file CellStyle.java.
References Color, org.openoffice.xmerge.util.Debug.ERROR, Integer, org.openoffice.xmerge.util.Debug.log(), and value.
Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.handleAttribute().
|
inlineprivate |
Write this Style
object's attributes to a Node
in the Document
.
node | The Node to add Style attributes. |
Definition at line 363 of file CellStyle.java.
References org.openoffice.xmerge.converter.xml.sxc.Format.BOLD, org.openoffice.xmerge.converter.xml.sxc.Format.BOTTOM_ALIGN, org.openoffice.xmerge.converter.xml.sxc.Format.BOTTOM_BORDER, org.openoffice.xmerge.converter.xml.sxc.CellStyle.buildColorString(), org.openoffice.xmerge.converter.xml.sxc.Format.CENTER_ALIGN, org.openoffice.xmerge.converter.xml.sxc.CellStyle.fmt, org.openoffice.xmerge.converter.xml.sxc.Format.getAlign(), org.openoffice.xmerge.converter.xml.sxc.Format.getAttribute(), org.openoffice.xmerge.converter.xml.sxc.Format.getBackground(), org.openoffice.xmerge.converter.xml.sxc.Format.getFontName(), org.openoffice.xmerge.converter.xml.sxc.Format.getFontSize(), org.openoffice.xmerge.converter.xml.sxc.Format.getForeground(), org.openoffice.xmerge.converter.xml.sxc.Format.getVertAlign(), Integer, org.openoffice.xmerge.converter.xml.sxc.Format.ITALIC, org.openoffice.xmerge.converter.xml.sxc.Format.LEFT_ALIGN, org.openoffice.xmerge.converter.xml.sxc.Format.LEFT_BORDER, org.openoffice.xmerge.converter.xml.sxc.Format.MIDDLE_ALIGN, org.openoffice.xmerge.converter.xml.sxc.Format.RIGHT_ALIGN, org.openoffice.xmerge.converter.xml.sxc.Format.RIGHT_BORDER, org.openoffice.xmerge.converter.xml.sxc.Format.STRIKETHRU, org.openoffice.xmerge.converter.xml.sxc.Format.SUBSCRIPT, org.openoffice.xmerge.converter.xml.sxc.Format.SUPERSCRIPT, org.openoffice.xmerge.converter.xml.sxc.Format.TOP_ALIGN, org.openoffice.xmerge.converter.xml.sxc.Format.TOP_BORDER, org.openoffice.xmerge.converter.xml.sxc.Format.UNDERLINE, and org.openoffice.xmerge.converter.xml.sxc.Format.WORD_WRAP.
Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.createNode().
Definition at line 37 of file CellStyle.java.
Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.CellStyle(), org.openoffice.xmerge.converter.xml.sxc.CellStyle.getFormat(), org.openoffice.xmerge.converter.xml.sxc.CellStyle.getResolved(), org.openoffice.xmerge.converter.xml.sxc.CellStyle.handleAttribute(), org.openoffice.xmerge.converter.xml.sxc.CellStyle.isSubset(), and org.openoffice.xmerge.converter.xml.sxc.CellStyle.writeAttributes().
|
staticprivate |
Definition at line 443 of file CellStyle.java.
Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.isIgnored().