Browse Source

Push the fix for bug #55248 up to the Sheet interface (was XSSF only before)

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1516124 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_3_10_BETA2
Nick Burch 10 years ago
parent
commit
b7db2fceef

+ 13
- 0
src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java View File

@@ -1242,6 +1242,19 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
return _sheet.getLeftCol();
}

/**
* 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(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.

+ 10
- 0
src/java/org/apache/poi/ss/usermodel/Sheet.java View File

@@ -582,6 +582,16 @@ public interface Sheet extends Iterable<Row> {
* @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);

/**

+ 1
- 1
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java View File

@@ -2411,7 +2411,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* @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) {

Loading…
Cancel
Save