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 2013/08/21 11:41:15 UTC

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

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