From 590e49c143e1773f037e46eb650286f391be79bb Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Wed, 20 Jul 2022 13:13:28 +0000 Subject: [bug-66173] add new XSSFSheet createSplitPane method to avoid bug in existing method git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1902876 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java | 3 ++- .../org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'poi-examples') diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java index 54c3879e41..14869874ef 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/SplitAndFreezePanes.java @@ -24,6 +24,7 @@ import java.io.IOException; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.PaneType; import org.apache.poi.ss.usermodel.Sheet; public class SplitAndFreezePanes { @@ -41,7 +42,7 @@ public class SplitAndFreezePanes { // Freeze the columns and rows (forget about scrolling position of the lower right quadrant). sheet3.createFreezePane(2, 2); // Create a split with the lower left side being the active quadrant - sheet4.createSplitPane(2000, 2000, 0, 0, Sheet.PANE_LOWER_LEFT); + sheet4.createSplitPane(2000, 2000, 0, 0, PaneType.LOWER_LEFT); try (FileOutputStream fileOut = new FileOutputStream("workbook.xls")) { wb.write(fileOut); diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java index 4a8afee879..04698abdde 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/SplitAndFreezePanes.java @@ -20,6 +20,7 @@ package org.apache.poi.examples.xssf.usermodel; import java.io.FileOutputStream; import java.io.IOException; +import org.apache.poi.ss.usermodel.PaneType; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; @@ -42,7 +43,7 @@ public class SplitAndFreezePanes { // Freeze the columns and rows (forget about scrolling position of the lower right quadrant). sheet3.createFreezePane(2, 2); // Create a split with the lower left side being the active quadrant - sheet4.createSplitPane(2000, 2000, 0, 0, Sheet.PANE_LOWER_LEFT); + sheet4.createSplitPane(2000, 2000, 0, 0, PaneType.LOWER_LEFT); try (FileOutputStream fileOut = new FileOutputStream("splitFreezePane.xlsx")) { wb.write(fileOut); -- cgit v1.2.3