| java.lang.Object org.apache.poi.hdf.model.hdftypes.StyleSheet
StyleSheet | public class StyleSheet implements HDFType(Code) | | Represents a document's stylesheet. A word documents formatting is stored as
compressed styles that are based on styles contained in the stylesheet. This
class also contains static utility functions to uncompress different
formatting properties.
author: Ryan Ackley |
Constructor Summary | |
public | StyleSheet(byte[] styleSheet) StyleSheet constructor. |
Method Summary | |
static void | doCHPOperation(CharacterProperties oldCHP, CharacterProperties newCHP, int operand, int param, byte[] varParam, byte[] grpprl, int offset, StyleSheet styleSheet) Used in decompression of a chpx. | static void | doPAPOperation(ParagraphProperties newPAP, int operand, int param, byte[] varParam, byte[] grpprl, int offset, int spra) Performs an operation on a ParagraphProperties object. | static void | doSEPOperation(SectionProperties newSEP, int operand, int param, byte[] varParam) Used in decompression of a sepx. | static void | doTAPOperation(TableProperties newTAP, int operand, int param, byte[] varParam) Used to uncompress a table property. | public static boolean | getFlag(int x) Converts an int into a boolean. | public StyleDescription | getStyleDescription(int x) Gets the StyleDescription at index x. | public static Object | uncompressProperty(byte[] grpprl, Object parent, StyleSheet styleSheet) Used to uncompress a property stored in a grpprl. | public static Object | uncompressProperty(byte[] grpprl, Object parent, StyleSheet styleSheet, boolean doIstd) Used to uncompress a property stored in a grpprl. |
StyleSheet | public StyleSheet(byte[] styleSheet)(Code) | | StyleSheet constructor. Loads a document's stylesheet information,
Parameters: styleSheet - A byte array containing a document's raw stylesheetinfo. Found by using FileInformationBlock.getFcStshf() andFileInformationBLock.getLcbStshf() |
doCHPOperation | static void doCHPOperation(CharacterProperties oldCHP, CharacterProperties newCHP, int operand, int param, byte[] varParam, byte[] grpprl, int offset, StyleSheet styleSheet)(Code) | | Used in decompression of a chpx. This performs an operation defined by
a single sprm.
Parameters: oldCHP - The base CharacterProperties. Parameters: newCHP - The current CharacterProperties. Parameters: operand - The operand defined by the sprm (See Word file format spec) Parameters: param - The parameter defined by the sprm (See Word file format spec) Parameters: varParam - The variable length parameter defined by the sprm. (SeeWord file format spec) Parameters: grpprl - The entire chpx that this operation is a part of. Parameters: offset - The offset in the grpprl of the next sprm Parameters: styleSheet - The StyleSheet for this document. |
doPAPOperation | static void doPAPOperation(ParagraphProperties newPAP, int operand, int param, byte[] varParam, byte[] grpprl, int offset, int spra)(Code) | | Performs an operation on a ParagraphProperties object. Used to uncompress
from a papx.
Parameters: newPAP - The ParagraphProperties object to perform the operation on. Parameters: operand - The operand that defines the operation. Parameters: param - The operation's parameter. Parameters: varParam - The operation's variable length parameter. Parameters: grpprl - The original papx. Parameters: offset - The current offset in the papx. Parameters: spra - A part of the sprm that defined this operation. |
doSEPOperation | static void doSEPOperation(SectionProperties newSEP, int operand, int param, byte[] varParam)(Code) | | Used in decompression of a sepx. This performs an operation defined by
a single sprm.
Parameters: newSEP - The SectionProperty to perfrom the operation on. Parameters: operand - The operation to perform. Parameters: param - The operation's parameter. Parameters: varParam - The operation variable length parameter. |
doTAPOperation | static void doTAPOperation(TableProperties newTAP, int operand, int param, byte[] varParam)(Code) | | Used to uncompress a table property. Performs an operation defined
by a sprm stored in a tapx.
Parameters: newTAP - The TableProperties object to perform the operation on. Parameters: operand - The operand that defines this operation. Parameters: param - The parameter for this operation. Parameters: varParam - Variable length parameter for this operation. |
getFlag | public static boolean getFlag(int x)(Code) | | Converts an int into a boolean. If the int is non-zero, it returns true.
Otherwise it returns false.
Parameters: x - The int to convert. A boolean whose value depends on x. |
getStyleDescription | public StyleDescription getStyleDescription(int x)(Code) | | Gets the StyleDescription at index x.
Parameters: x - the index of the desired StyleDescription. |
uncompressProperty | public static Object uncompressProperty(byte[] grpprl, Object parent, StyleSheet styleSheet)(Code) | | Used to uncompress a property stored in a grpprl. These include
CharacterProperties, ParagraphProperties, TableProperties, and
SectionProperties.
Parameters: grpprl - The compressed form of the property. Parameters: parent - The base property of the property. Parameters: styleSheet - The document's stylesheet. An object that should be casted to the appropriate property. |
uncompressProperty | public static Object uncompressProperty(byte[] grpprl, Object parent, StyleSheet styleSheet, boolean doIstd)(Code) | | Used to uncompress a property stored in a grpprl. These include
CharacterProperties, ParagraphProperties, TableProperties, and
SectionProperties.
Parameters: grpprl - The compressed form of the property. Parameters: parent - The base property of the property. Parameters: styleSheet - The document's stylesheet. An object that should be casted to the appropriate property. |
|
|