Package org.apache.poi.hwpf.model
Class StyleSheet
- java.lang.Object
-
- org.apache.poi.hwpf.model.StyleSheet
-
@Internal public final class StyleSheet extends java.lang.Object
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.Fields documentation is quotes from Microsoft Office Word 97-2007 Binary File Format (.doc) Specification, page 36 of 210
-
-
Field Summary
Fields Modifier and Type Field Description static int
NIL_STYLE
-
Constructor Summary
Constructors Constructor Description StyleSheet(byte[] tableStream, int offset)
StyleSheet constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
CharacterProperties
getCharacterStyle(int styleIndex)
Deprecated.byte[]
getCHPX(int styleIndex)
byte[]
getPAPX(int styleIndex)
ParagraphProperties
getParagraphStyle(int styleIndex)
Deprecated.StyleDescription
getStyleDescription(int styleIndex)
Gets the StyleDescription at index x.int
hashCode()
int
numStyles()
Gets the number of styles in the style sheet.void
writeTo(java.io.OutputStream out)
-
-
-
Field Detail
-
NIL_STYLE
public static final int NIL_STYLE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StyleSheet
public StyleSheet(byte[] tableStream, int offset)
StyleSheet constructor. Loads a document's stylesheet information,- Parameters:
tableStream
- A byte array containing a document's raw stylesheet info. Found by using FileInformationBlock.getFcStshf() and FileInformationBLock.getLcbStshf()
-
-
Method Detail
-
writeTo
public void writeTo(java.io.OutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
numStyles
public int numStyles()
Gets the number of styles in the style sheet.- Returns:
- The number of styles in the style sheet.
-
getStyleDescription
public StyleDescription getStyleDescription(int styleIndex)
Gets the StyleDescription at index x.- Parameters:
styleIndex
- the index of the desired StyleDescription.
-
getCharacterStyle
@Deprecated public CharacterProperties getCharacterStyle(int styleIndex)
Deprecated.
-
getParagraphStyle
@Deprecated public ParagraphProperties getParagraphStyle(int styleIndex)
Deprecated.
-
getCHPX
public byte[] getCHPX(int styleIndex)
-
getPAPX
public byte[] getPAPX(int styleIndex)
-
-