Return-Path: X-Original-To: apmail-poi-commits-archive@minotaur.apache.org Delivered-To: apmail-poi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 619B21076E for ; Wed, 21 Aug 2013 09:41:47 +0000 (UTC) Received: (qmail 85955 invoked by uid 500); 21 Aug 2013 09:41:46 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 85849 invoked by uid 500); 21 Aug 2013 09:41:43 -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 85799 invoked by uid 99); 21 Aug 2013 09:41:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Aug 2013 09:41:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Aug 2013 09:41:37 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 139D72388900; Wed, 21 Aug 2013 09:41:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1516124 - in /poi/trunk/src: java/org/apache/poi/hssf/usermodel/HSSFSheet.java java/org/apache/poi/ss/usermodel/Sheet.java ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Date: Wed, 21 Aug 2013 09:41:15 -0000 To: commits@poi.apache.org From: nick@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130821094116.139D72388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: nick Date: Wed Aug 21 09:41:15 2013 New Revision: 1516124 URL: http://svn.apache.org/r1516124 Log: Push the fix for bug #55248 up to the Sheet interface (was XSSF only before) Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java?rev=1516124&r1=1516123&r2=1516124&view=diff ============================================================================== --- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java (original) +++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java Wed Aug 21 09:41:15 2013 @@ -1249,6 +1249,19 @@ public final class HSSFSheet implements * @param toprow the top row to show in desktop window pane * @param leftcol the left column to show in desktop window pane */ + public void showInPane(int toprow, int leftcol) { + int maxrow = SpreadsheetVersion.EXCEL97.getLastRowIndex(); + if (toprow > maxrow) throw new IllegalArgumentException("Maximum row number is " + maxrow); + + showInPane((short)toprow, (short)leftcol); + } + /** + * Sets desktop window pane display area, when the + * file is first opened in a viewer. + * + * @param toprow the top row to show in desktop window pane + * @param leftcol the left column to show in desktop window pane + */ public void showInPane(short toprow, short leftcol) { _sheet.setTopRow(toprow); _sheet.setLeftCol(leftcol); Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java?rev=1516124&r1=1516123&r2=1516124&view=diff ============================================================================== --- poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java (original) +++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Sheet.java Wed Aug 21 09:41:15 2013 @@ -582,6 +582,16 @@ public interface Sheet extends Iterable< * @param toprow the top row to show in desktop window pane * @param leftcol the left column to show in desktop window pane */ + void showInPane(int toprow, int leftcol); + + /** + * Sets desktop window pane display area, when the + * file is first opened in a viewer. + * + * @param toprow the top row to show in desktop window pane + * @param leftcol the left column to show in desktop window pane + * @deprecated Use {@link #showInPane(int, int)} as there can be more than 32767 rows. + */ void showInPane(short toprow, short leftcol); /** Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=1516124&r1=1516123&r2=1516124&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Wed Aug 21 09:41:15 2013 @@ -2411,7 +2411,7 @@ public class XSSFSheet extends POIXMLDoc * @param toprow the top row to show in desktop window pane * @param leftcol the left column to show in desktop window pane * - * @deprecated Use the version of showInPane() with ints as there can be more than 32767 rows. + * @deprecated Use {@link #showInPane(int, int)} as there can be more than 32767 rows. */ @Deprecated public void showInPane(short toprow, short leftcol) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org For additional commands, e-mail: commits-help@poi.apache.org