LibreOffice Module xmerge (master)
1
|
This class represents a paragraph. More...
Public Member Functions | |
ParaStyle (Node node, StyleCatalog sc) | |
Constructor for use when going from DOM to client device format. More... | |
ParaStyle (String name, String familyName, String parentName, String attribs[], String values[], StyleCatalog sc) | |
Constructor for use when going from client device format to DOM. More... | |
ParaStyle (String name, String familyName, String parentName, int attribs[], String values[], StyleCatalog lookup) | |
Alternate constructor for use when going from client device format to DOM. More... | |
Style | getResolved () |
Return the. More... | |
void | dumpCSV () |
Dump this. More... | |
Node | createNode (org.w3c.dom.Document parentDoc, String name) |
Create the. More... | |
boolean | isSubset (Style style) |
Return. More... | |
![]() | |
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... | |
Static Public Member Functions | |
static void | dumpHdr () |
Print a Comma Separated Value (CSV) header line for the spreadsheet dump. More... | |
Static Public Attributes | |
static final int | ALIGN_RIGHT = 1 |
Align right. More... | |
static final int | ALIGN_CENTER = 2 |
Align center. More... | |
static final int | ALIGN_JUST = 3 |
Align justified. More... | |
static final int | ALIGN_LEFT = 4 |
Align left. More... | |
static final int | LH_PCT = 0x40000000 |
Line height percentage. More... | |
Private Member Functions | |
boolean | isIgnored (String attribute) |
This code checks whether an attribute is one that we intentionally ignore. More... | |
void | setAttribute (String attr, String value) |
Set an attribute for this paragraph. More... | |
void | setAttribute (int attr, String value) |
Set an attribute for this paragraph. More... | |
void | writeAttributes (Element node) |
Add. More... | |
Static Private Member Functions | |
static String | toCSV (String value) |
Private function to return the value as an element in a Comma Separated Value (CSV) format. More... | |
static String | toLastCSV (String value) |
Private function to return the value as a last element in a Comma Separated Value (CSV) format. More... | |
Private Attributes | |
boolean | isSet [] = new boolean[NR_PROPERTIES] |
Array of flags indicating which attributes are set for this paragraph. More... | |
int | value [] = new int[NR_PROPERTIES] |
Array of attribute values for this paragraph. More... | |
final String | attrName [] |
Array of attribute names for this paragraph. More... | |
final Class<?> | algor [] |
Array of attribute structures for this paragraph. More... | |
Static Private Attributes | |
static final int | TEXT_INDENT = 4 |
Indent left property. More... | |
static final int | LINE_HEIGHT = 5 |
Indent right property. More... | |
static final int | TEXT_ALIGN = 6 |
Align text property. More... | |
static final int | NR_PROPERTIES = 7 |
Total number of properties. More... | |
static final int | LH_VALUEMASK = 0x00FFFFFF |
Line height mask. More... | |
static String[] | ignored |
Ignored tags. More... | |
Additional Inherited Members | |
![]() | |
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... | |
This class represents a paragraph.
.
Table with all paragraph style attributes and their values Attribute Value MARGIN_LEFT mm * 100 MARGIN_RIGHT mm * 100 MARGIN_TOP mm * 100 (space on top of paragraph) MARGIN_BOTTOM mm * 100 TEXT_INDENT mm * 100 (first line indent) LINE_HEIGHT mm * 100, unless or'ed with LH_PCT, in which case it is a percentage (e.g. 200% for double spacing) Can also be or'ed with LH_ATLEAST. Value is stored in bits indicated by LH_VALUEMASK. TEXT_ALIGN ALIGN_RIGHT, ALIGN_CENTER, ALIGN_JUST, ALIGN_LEFT
Definition at line 139 of file ParaStyle.java.
|
inline |
Constructor for use when going from DOM to client device format.
node | A style:style which, which is assumed to have family attribute of paragraph. |
sc | The StyleCatalog
|
Definition at line 215 of file ParaStyle.java.
References i, org.openoffice.xmerge.converter.xml.ParaStyle.setAttribute(), and String.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.getResolved(), and org.openoffice.xmerge.converter.xml.ParaStyle.isSubset().
|
inline |
Constructor for use when going from client device format to DOM.
name | Name of the . Can be null
|
familyName | Family of the { -} usually paragraph, text, etc. Can be null
|
parentName | Name of the parent , or null
|
attribs | Array of attributes to set. |
values | Array of values to set. |
sc | The StyleCatalog
|
Definition at line 256 of file ParaStyle.java.
References i, and org.openoffice.xmerge.converter.xml.ParaStyle.setAttribute().
|
inline |
Alternate constructor for use when going from client device format to DOM.
name | Name of the . Can be null
|
familyName | Family of the { -} usually paragraph, text, etc. Can be null
|
parentName | Name of the parent , or null if none. |
attribs | Array of attributes indices to set. |
values | Array of values to set. |
lookup | The StyleCatalog
|
Definition at line 276 of file ParaStyle.java.
References i, and org.openoffice.xmerge.converter.xml.ParaStyle.setAttribute().
|
inline |
Create the.
with the specified elements.
parentDoc | Parent of the to create. |
name | Name of the . |
Definition at line 442 of file ParaStyle.java.
References org.openoffice.xmerge.converter.xml.ParaStyle.writeAttributes().
|
inline |
Dump this.
as a Comma Separated Value (CSV) line.
Definition at line 420 of file ParaStyle.java.
References org.openoffice.xmerge.converter.xml.Style.family, index, org.openoffice.xmerge.converter.xml.Style.name, org.openoffice.xmerge.converter.xml.Style.parent, String, System, org.openoffice.xmerge.converter.xml.ParaStyle.toCSV(), and org.openoffice.xmerge.converter.xml.ParaStyle.toLastCSV().
|
inlinestatic |
Print a Comma Separated Value (CSV) header line for the spreadsheet dump.
Definition at line 410 of file ParaStyle.java.
References System, org.openoffice.xmerge.converter.xml.ParaStyle.toCSV(), and org.openoffice.xmerge.converter.xml.ParaStyle.toLastCSV().
|
inline |
Return the.
in use.
Definition at line 337 of file ParaStyle.java.
References clone(), org.openoffice.xmerge.util.Debug.ERROR, Exception, org.openoffice.xmerge.converter.xml.Style.family, org.openoffice.xmerge.converter.xml.ParaStyle.getResolved(), i, org.openoffice.xmerge.converter.xml.ParaStyle.isSet, org.openoffice.xmerge.util.Debug.log(), org.openoffice.xmerge.converter.xml.Style.name, org.openoffice.xmerge.converter.xml.ParaStyle.NR_PROPERTIES, org.openoffice.xmerge.converter.xml.ParaStyle.ParaStyle(), org.openoffice.xmerge.converter.xml.Style.parent, and org.openoffice.xmerge.converter.xml.ParaStyle.value.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.getResolved().
|
inlineprivate |
This code checks whether an attribute is one that we intentionally ignore.
attribute | The attribute to check. |
Definition at line 291 of file ParaStyle.java.
References i.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.setAttribute().
|
inline |
Return.
if
is a subset of the
.
style |
Definition at line 457 of file ParaStyle.java.
References getClass(), i, org.openoffice.xmerge.converter.xml.ParaStyle.isSet, org.openoffice.xmerge.converter.xml.ParaStyle.NR_PROPERTIES, org.openoffice.xmerge.converter.xml.ParaStyle.ParaStyle(), and org.openoffice.xmerge.converter.xml.ParaStyle.value.
|
inlineprivate |
Set an attribute for this paragraph.
.
attr | The attribute to set. |
value | The attribute value to set. |
Definition at line 305 of file ParaStyle.java.
References i, org.openoffice.xmerge.util.Debug.INFO, org.openoffice.xmerge.converter.xml.ParaStyle.isIgnored(), org.openoffice.xmerge.util.Debug.log(), and org.openoffice.xmerge.converter.xml.ParaStyle.NR_PROPERTIES.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.ParaStyle().
|
inlineprivate |
Set an attribute for this paragraph.
.
attr | The attribute index to set. |
value | The attribute value to set. |
Definition at line 322 of file ParaStyle.java.
References org.openoffice.xmerge.util.Debug.ERROR, Exception, I, and org.openoffice.xmerge.util.Debug.log().
|
inlinestaticprivate |
Private function to return the value as an element in a Comma Separated Value (CSV) format.
value | The value to format. |
Definition at line 385 of file ParaStyle.java.
References String.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.dumpCSV(), and org.openoffice.xmerge.converter.xml.ParaStyle.dumpHdr().
|
inlinestaticprivate |
Private function to return the value as a last element in a Comma Separated Value (CSV) format.
value | The value to format. |
Definition at line 400 of file ParaStyle.java.
References String.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.dumpCSV(), and org.openoffice.xmerge.converter.xml.ParaStyle.dumpHdr().
Add.
attributes to the given
.
This may involve writing child
objects as well.
node | The to add attributes. |
Definition at line 496 of file ParaStyle.java.
References Double, i, Integer, org.openoffice.xmerge.converter.xml.ParaStyle.LH_VALUEMASK, org.openoffice.xmerge.converter.xml.ParaStyle.LINE_HEIGHT, String, and org.openoffice.xmerge.converter.xml.ParaStyle.TEXT_INDENT.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.createNode().
|
private |
Array of attribute structures for this paragraph.
.
Definition at line 170 of file ParaStyle.java.
|
static |
Align center.
Definition at line 183 of file ParaStyle.java.
|
static |
Align justified.
Definition at line 185 of file ParaStyle.java.
|
static |
Align left.
Definition at line 187 of file ParaStyle.java.
|
static |
Align right.
Definition at line 181 of file ParaStyle.java.
|
private |
Array of attribute names for this paragraph.
.
Definition at line 159 of file ParaStyle.java.
|
staticprivate |
Ignored tags.
Definition at line 196 of file ParaStyle.java.
|
private |
Array of flags indicating which attributes are set for this paragraph.
.
Definition at line 155 of file ParaStyle.java.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.getResolved(), and org.openoffice.xmerge.converter.xml.ParaStyle.isSubset().
|
static |
Line height percentage.
Definition at line 190 of file ParaStyle.java.
|
staticprivate |
Line height mask.
Definition at line 193 of file ParaStyle.java.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.writeAttributes().
|
staticprivate |
Indent right property.
Definition at line 144 of file ParaStyle.java.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.writeAttributes().
|
staticprivate |
Total number of properties.
Definition at line 149 of file ParaStyle.java.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.getResolved(), org.openoffice.xmerge.converter.xml.ParaStyle.isSubset(), and org.openoffice.xmerge.converter.xml.ParaStyle.setAttribute().
|
staticprivate |
Align text property.
Definition at line 146 of file ParaStyle.java.
|
staticprivate |
Indent left property.
Definition at line 142 of file ParaStyle.java.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.writeAttributes().
|
private |
Array of attribute values for this paragraph.
.
Definition at line 157 of file ParaStyle.java.
Referenced by org.openoffice.xmerge.converter.xml.ParaStyle.getResolved(), and org.openoffice.xmerge.converter.xml.ParaStyle.isSubset().