LibreOffice Module xmerge (master)  1
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.openoffice.xmerge.converter.xml.sxc.CellStyle Class Reference

Represents a text. More...

Inheritance diagram for org.openoffice.xmerge.converter.xml.sxc.CellStyle:
[legend]
Collaboration diagram for org.openoffice.xmerge.converter.xml.sxc.CellStyle:
[legend]

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. More...
 
Style getResolved ()
 Return a. More...
 
Node createNode (org.w3c.dom.Document parentDoc, String name)
 Create a new. More...
 
boolean isSubset (Style style)
 Return. 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. More...
 
String getName ()
 Returns the name of this. More...
 
void setName (String newName)
 Sets the name of this. More...
 
String getFamily ()
 Return the family of this. More...
 
String getParent ()
 Return the name of the parent of this. More...
 
Style getResolved ()
 Return a. More...
 
Node createNode (org.w3c.dom.Document parentDoc, String name)
 Write a. More...
 
boolean isSubset (Style style)
 Return. 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. More...
 
String buildColorString (Color c)
 Given a. 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. More...
 
String family = null
 Family of the. More...
 
String parent = null
 Parent of the. More...
 
StyleCatalog sc
 A reference to the. More...
 

Detailed Description

Represents a text.

in an OpenOffice document.

Definition at line 35 of file CellStyle.java.

Constructor & Destructor Documentation

org.openoffice.xmerge.converter.xml.sxc.CellStyle.CellStyle ( Node  node,
StyleCatalog  sc 
)
inline

Constructor for use when going from DOM to client device format.

Parameters
nodeThe style:style containing the . (This is assumed have a family attribute of text).
scThe
StyleCatalog
, which is used for looking up ancestor 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().

org.openoffice.xmerge.converter.xml.sxc.CellStyle.CellStyle ( String  name,
String  family,
String  parent,
Format  fmt,
StyleCatalog  sc 
)
inline

Constructor for use when going from client device format to DOM.

Parameters
nameName of cell . Can be
null
.
familyFamily of text (usually text). Can be
null
.
parentName of parent text , or
null
for none.
fmtsize in points.
scThe
StyleCatalog
, which is used for looking up ancestor objects.

Definition at line 98 of file CellStyle.java.

References org.openoffice.xmerge.converter.xml.sxc.CellStyle.fmt.

Member Function Documentation

String org.openoffice.xmerge.converter.xml.sxc.CellStyle.buildColorString ( Color  c)
inlineprivate

Given a.

, return a string of the form { #rrggbb}.

Parameters
cThe value.
Returns
The 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().

Node org.openoffice.xmerge.converter.xml.sxc.CellStyle.createNode ( org.w3c.dom.Document  parentDoc,
String  name 
)
inline

Create a new.

in the

, and write this

to it.

Parameters
parentDocParent of the to create.
nameName to use for the new (e.g. style:style)
Returns
Created .

Definition at line 331 of file CellStyle.java.

References org.openoffice.xmerge.converter.xml.sxc.CellStyle.writeAttributes().

Format org.openoffice.xmerge.converter.xml.sxc.CellStyle.getFormat ( )
inline
Style org.openoffice.xmerge.converter.xml.sxc.CellStyle.getResolved ( )
inline

Return a.

object corresponding to this one, but with all of the inherited information from parent

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.

Returns
The
StyleCatalog
in which to look up ancestors.

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.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().

void org.openoffice.xmerge.converter.xml.sxc.CellStyle.handleAttribute ( String  attr,
String  value 
)
inlineprivate

Set an attribute.

Parameters
attrThe attribute to set.
valueThe 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.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, and org.openoffice.xmerge.converter.xml.sxc.Format.WORD_WRAP.

Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.CellStyle().

boolean org.openoffice.xmerge.converter.xml.sxc.CellStyle.isIgnored ( String  attribute)
inlineprivate

This code checks whether an attribute is one that we intentionally ignore.

Parameters
attributeThe attribute to check.
Returns
true
if can be ignored, otherwise
false
.

Definition at line 464 of file CellStyle.java.

References equals(), and i.

Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.handleAttribute().

boolean org.openoffice.xmerge.converter.xml.sxc.CellStyle.isSubset ( Style  style)
inline

Return.

true

if

specifies as much or less than this

, and nothing it specifies contradicts this

.

Parameters
styleThe to check.
Returns
true
if is a subset,
false
otherwise.

Definition at line 347 of file CellStyle.java.

References org.openoffice.xmerge.converter.xml.sxc.CellStyle.CellStyle(), getClass(), org.openoffice.xmerge.converter.xml.sxc.CellStyle.getFormat(), and org.openoffice.xmerge.converter.xml.sxc.Format.isSubset().

Color org.openoffice.xmerge.converter.xml.sxc.CellStyle.parseColorString ( String  value)
inlineprivate

Parse a color specification of the form { #rrggbb}.

Parameters
value

Definition at line 120 of file CellStyle.java.

References Color, org.openoffice.xmerge.util.Debug.ERROR, Integer, and org.openoffice.xmerge.util.Debug.log().

Referenced by org.openoffice.xmerge.converter.xml.sxc.CellStyle.handleAttribute().

void org.openoffice.xmerge.converter.xml.sxc.CellStyle.writeAttributes ( Element  node)
inlineprivate

Write this.

object's attributes to a

in the

.

Parameters
nodeThe to add 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.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().

Member Data Documentation

Format org.openoffice.xmerge.converter.xml.sxc.CellStyle.fmt = new Format()
private
String [] org.openoffice.xmerge.converter.xml.sxc.CellStyle.ignored
staticprivate
Initial value:
= {
"style:text-autospace", "style:text-underline-color",
"fo:margin-left", "fo:margin-right", "fo:text-indent",
"fo:margin-top", "fo:margin-bottom", "text:line-number",
"text:number-lines", "style:country-asian",
"style:font-size-asian", "style:font-name-complex",
"style:language-complex", "style:country-complex",
"style:font-size-complex", "style:punctuation-wrap",
"fo:language", "fo:country",
"style:font-name-asian", "style:language-asian",
"style:line-break", "fo:keep-with-next"
}

Definition at line 443 of file CellStyle.java.


The documentation for this class was generated from the following file: