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

Represents a text Style in an OpenOffice document. More...

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

Public Member Functions

 RowStyle (Node node, StyleCatalog sc)
 Constructor for use when going from DOM to client device format. More...
 
 RowStyle (String name, String family, String parent, int rowHeight, StyleCatalog sc)
 Constructor for use when going from client device format to DOM. More...
 
int getRowHeight ()
 Returns the height of this row. 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

void setRowHeight (int RowHeight)
 Sets the height of this row. More...
 
int parseRowHeight (String value)
 Parse a rowheight in the form "1.234cm" to twips. 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...
 

Private Attributes

int rowHeight = 255
 

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

Detailed Description

Represents a text Style in an OpenOffice document.

Definition at line 34 of file RowStyle.java.

Constructor & Destructor Documentation

◆ RowStyle() [1/2]

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

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

Parameters
nodeThe style:style Node containing the Style. (This Node is assumed have a family attribute of text).
scThe StyleCatalog, which is used for looking up ancestor Style objects.

Definition at line 46 of file RowStyle.java.

References org.openoffice.xmerge.converter.xml.sxc.RowStyle.handleAttribute(), i, and String.

Referenced by org.openoffice.xmerge.converter.xml.sxc.RowStyle.getResolved(), and org.openoffice.xmerge.converter.xml.sxc.RowStyle.isSubset().

◆ RowStyle() [2/2]

org.openoffice.xmerge.converter.xml.sxc.RowStyle.RowStyle ( String  name,
String  family,
String  parent,
int  rowHeight,
StyleCatalog  sc 
)
inline

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

Parameters
nameName of text Style. Can be null.
familyFamily of text Style (usually text). Can be null.
parentName of parent text Style, or null for none.
rowHeightThe height of this row.
scThe StyleCatalog, which is used for looking up ancestor Style objects.

Definition at line 97 of file RowStyle.java.

References org.openoffice.xmerge.converter.xml.Style.family, org.openoffice.xmerge.converter.xml.Style.name, org.openoffice.xmerge.converter.xml.Style.parent, and org.openoffice.xmerge.converter.xml.sxc.RowStyle.rowHeight.

Member Function Documentation

◆ createNode()

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

Create a new Node in the Document, and write this Style to it.

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

Definition at line 207 of file RowStyle.java.

References org.openoffice.xmerge.converter.xml.Style.name, and org.openoffice.xmerge.converter.xml.sxc.RowStyle.writeAttributes().

◆ getResolved()

Style org.openoffice.xmerge.converter.xml.sxc.RowStyle.getResolved ( )
inline

◆ getRowHeight()

int org.openoffice.xmerge.converter.xml.sxc.RowStyle.getRowHeight ( )
inline

◆ handleAttribute()

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

◆ isSubset()

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

Return true if style specifies as much or less than this Style, and nothing it specifies contradicts this Style.

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

Reimplemented from org.openoffice.xmerge.converter.xml.Style.

Definition at line 223 of file RowStyle.java.

References org.openoffice.xmerge.converter.xml.sxc.RowStyle.getRowHeight(), org.openoffice.xmerge.converter.xml.sxc.RowStyle.rowHeight, and org.openoffice.xmerge.converter.xml.sxc.RowStyle.RowStyle().

◆ parseRowHeight()

int org.openoffice.xmerge.converter.xml.sxc.RowStyle.parseRowHeight ( String  value)
inlineprivate

Parse a rowheight in the form "1.234cm" to twips.

Parameters
valueString specification to parse.
Returns
The twips equivalent.

Definition at line 127 of file RowStyle.java.

References org.openoffice.xmerge.util.TwipsConverter.convert2twips(), and value.

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

◆ setRowHeight()

void org.openoffice.xmerge.converter.xml.sxc.RowStyle.setRowHeight ( int  RowHeight)
inlineprivate

Sets the height of this row.

Parameters
RowHeightThe height of this row.

Definition at line 116 of file RowStyle.java.

Referenced by org.openoffice.xmerge.converter.xml.sxc.RowStyle.getResolved().

◆ writeAttributes()

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

Write this Style object's attributes to a Node in the Document.

Parameters
nodeThe Node to add Style attributes.

Definition at line 237 of file RowStyle.java.

References org.openoffice.xmerge.converter.xml.sxc.RowStyle.rowHeight, String, and org.openoffice.xmerge.util.TwipsConverter.twips2cm().

Referenced by org.openoffice.xmerge.converter.xml.sxc.RowStyle.createNode().

Member Data Documentation

◆ rowHeight

int org.openoffice.xmerge.converter.xml.sxc.RowStyle.rowHeight = 255
private

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