public Component getListCellRendererComponent( JList list,
Object value, int index, boolean isSelected, boolean cellHasFocus) {
Dimension d = getPreferredSize();
- int rowHeight = (int)sheet.getRow(index).getHeightInPoints();
+ HSSFRow row = sheet.getRow(index);
+ int rowHeight;
+ if(row == null) {
+ rowHeight = (int)sheet.getDefaultRowHeightInPoints();
+ } else {
+ rowHeight = (int)row.getHeightInPoints();
+ }
d.height = rowHeight+extraHeight;
setPreferredSize(d);
setText((value == null) ? "" : value.toString());
/**Main method*/
public static void main(String[] args) {
+ if(args.length < 1) {
+ throw new IllegalArgumentException("A filename to view must be supplied as the first argument, but none was given");
+ }
+
SViewer applet = new SViewer();
applet.isStandalone = true;
applet.filename = args[0];
/**Main method*/
public static void main(String[] args) {
+ if(args.length < 1) {
+ throw new IllegalArgumentException("A filename to view must be supplied as the first argument, but none was given");
+ }
try {
FileInputStream in = new FileInputStream(args[0]);
HSSFWorkbook wb = new HSSFWorkbook(in);
<!-- Don't forget to update status.xml too! -->
<release version="3.1-beta1" date="2008-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">44456 - Fix the contrib SViewer / SViewerPanel to not fail on sheets with missing rows</action>
<action dev="POI-DEVELOPERS" type="fix">44403 - Further support for unusual, but valid, arguments to the Mid function</action>
<action dev="POI-DEVELOPERS" type="fix">44410 - Support for whole-column ranges, such as C:C, in formula strings and the formula evaluator</action>
<action dev="POI-DEVELOPERS" type="fix">44421 - Update Match function to properly support Area references</action>
<!-- Don't forget to update changes.xml too! -->
<changes>
<release version="3.1-beta1" date="2008-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">44456 - Fix the contrib SViewer / SViewerPanel to not fail on sheets with missing rows</action>
<action dev="POI-DEVELOPERS" type="fix">44403 - Further support for unusual, but valid, arguments to the Mid function</action>
<action dev="POI-DEVELOPERS" type="fix">44410 - Support for whole-column ranges, such as C:C, in formula strings and the formula evaluator</action>
<action dev="POI-DEVELOPERS" type="fix">44421 - Update Match function to properly support Area references</action>