<changes>
<release version="3.8-beta2" date="2011-??-??">
+ <action dev="poi-developers" type="fix">49381 - Correct createFreezePane in XSSF, so that the left row/column matches the documentation + HSSF</action>
<action dev="poi-developers" type="fix">49253 - When setting repeating rows and columns for XSSF, don't break the print settings if they were already there</action>
<action dev="poi-developers" type="fix">49219 - ExternalNameRecord support for DDE Link entries without an operation</action>
<action dev="poi-developers" type="fix">50846 - More XSSFColor theme improvements, this time for Cell Borders</action>
pane.setTopLeftCell(new CellReference(rowSplit, 0).formatAsString());
pane.setActivePane(STPane.BOTTOM_LEFT);
} else {
- pane.setTopLeftCell(new CellReference(leftmostColumn, topRow).formatAsString());
+ pane.setTopLeftCell(new CellReference(topRow, leftmostColumn).formatAsString());
pane.setActivePane(STPane.BOTTOM_RIGHT);
}
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.hssf.util.PaneInformation;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
assertEquals(true, ps2.getValidSettings());
assertEquals(false, ps2.getLandscape());
}
+
+ /**
+ * CreateFreezePane column/row order check
+ */
+ public void test49381() throws Exception {
+ Workbook[] wbs = new Workbook[] { new HSSFWorkbook(), new XSSFWorkbook() };
+ int colSplit = 1;
+ int rowSplit = 2;
+ int leftmostColumn = 3;
+ int topRow = 4;
+
+ for(Workbook wb : wbs) {
+ Sheet s = wb.createSheet();
+
+ // Populate
+ for(int rn=0; rn<= topRow; rn++) {
+ Row r = s.createRow(rn);
+ for(int cn=0; cn<leftmostColumn; cn++) {
+ Cell c = r.createCell(cn, Cell.CELL_TYPE_NUMERIC);
+ c.setCellValue(100*rn + cn);
+ }
+ }
+
+ // Create the Freeze Pane
+ s.createFreezePane(colSplit, rowSplit, leftmostColumn, topRow);
+ PaneInformation paneInfo = s.getPaneInformation();
+
+ // Check it
+ assertEquals(colSplit, paneInfo.getVerticalSplitPosition());
+ assertEquals(rowSplit, paneInfo.getHorizontalSplitPosition());
+ assertEquals(leftmostColumn, paneInfo.getVerticalSplitLeftColumn());
+ assertEquals(topRow, paneInfo.getHorizontalSplitTopRow());
+ }
+ }
}