From commits-return-296-apmail-poi-commits-archive=poi.apache.org@poi.apache.org Thu Feb 21 10:36:41 2008 Return-Path: Delivered-To: apmail-poi-commits-archive@locus.apache.org Received: (qmail 99924 invoked from network); 21 Feb 2008 10:36:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2008 10:36:41 -0000 Received: (qmail 5725 invoked by uid 500); 21 Feb 2008 10:36:36 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 5683 invoked by uid 500); 21 Feb 2008 10:36:35 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 5674 invoked by uid 99); 21 Feb 2008 10:36:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2008 02:36:35 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2008 10:36:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 186231A9832; Thu, 21 Feb 2008 02:36:20 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r629738 - in /poi/trunk/src: contrib/src/org/apache/poi/hssf/contrib/view/ documentation/content/xdocs/ Date: Thu, 21 Feb 2008 10:36:10 -0000 To: commits@poi.apache.org From: nick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080221103620.186231A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 @@ + 44456 - Fix the contrib SViewer / SViewerPanel to not fail on sheets with missing rows 44403 - Further support for unusual, but valid, arguments to the Mid function 44410 - Support for whole-column ranges, such as C:C, in formula strings and the formula evaluator 44421 - Update Match function to properly support Area references 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 @@ + 44456 - Fix the contrib SViewer / SViewerPanel to not fail on sheets with missing rows 44403 - Further support for unusual, but valid, arguments to the Mid function 44410 - Support for whole-column ranges, such as C:C, in formula strings and the formula evaluator 44421 - Update Match function to properly support Area references --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org