It is convenient if org.apache.poi.hwpf.model.StyleSheet can tell how many styles it contains. For this, I made a numStyles method: /** * Gets the number of styles in the style sheet. * @return The number of styles in the style sheet. */ public int numStyles() { return _styleDescriptions.length; } This can be used, for example, to list all styles in a document. I use this in a Cocoon generator which gives an somewhat complete XML version of a Word document. This generator will be released as an open source component.
Created attachment 21138 [details] Adds the numStyles method to StyleSheet A patch that adds the method has been attached.
Committed, thanks