You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2008/02/21 11:36:10 UTC
svn commit: r629738 - in /poi/trunk/src:
contrib/src/org/apache/poi/hssf/contrib/view/ documentation/content/xdocs/
Author: nick
Date: Thu Feb 21 02:36:08 2008
New Revision: 629738
URL: http://svn.apache.org/viewvc?rev=629738&view=rev
Log:
Fix from Josh from bug #44456 - Update contrib SViewer to not fail if a HSSFRow is null
Modified:
poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVRowHeader.java
poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java
poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewerPanel.java
poi/trunk/src/documentation/content/xdocs/changes.xml
poi/trunk/src/documentation/content/xdocs/status.xml
Modified: poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVRowHeader.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVRowHeader.java?rev=629738&r1=629737&r2=629738&view=diff
==============================================================================
--- poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVRowHeader.java (original)
+++ poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SVRowHeader.java Thu Feb 21 02:36:08 2008
@@ -73,7 +73,13 @@
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());
Modified: poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java?rev=629738&r1=629737&r2=629738&view=diff
==============================================================================
--- poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java (original)
+++ poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewer.java Thu Feb 21 02:36:08 2008
@@ -143,6 +143,10 @@
/**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];
Modified: poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewerPanel.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewerPanel.java?rev=629738&r1=629737&r2=629738&view=diff
==============================================================================
--- poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewerPanel.java (original)
+++ poi/trunk/src/contrib/src/org/apache/poi/hssf/contrib/view/SViewerPanel.java Thu Feb 21 02:36:08 2008
@@ -260,6 +260,9 @@
/**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);
Modified: poi/trunk/src/documentation/content/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/changes.xml?rev=629738&r1=629737&r2=629738&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/changes.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/changes.xml Thu Feb 21 02:36:08 2008
@@ -36,6 +36,7 @@
<!-- 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>
Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=629738&r1=629737&r2=629738&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Thu Feb 21 02:36:08 2008
@@ -33,6 +33,7 @@
<!-- 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>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org