use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageSetup in project poi by apache.
the class TestXSSFPrintSetup method testSetGetPaperSize.
public void testSetGetPaperSize() {
CTWorksheet worksheet = CTWorksheet.Factory.newInstance();
CTPageSetup pSetup = worksheet.addNewPageSetup();
pSetup.setPaperSize(9);
XSSFPrintSetup printSetup = new XSSFPrintSetup(worksheet);
assertEquals(PaperSize.A4_PAPER, printSetup.getPaperSizeEnum());
assertEquals(9, printSetup.getPaperSize());
printSetup.setPaperSize(PaperSize.A3_PAPER);
assertEquals(8, pSetup.getPaperSize());
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageSetup in project poi by apache.
the class TestXSSFPrintSetup method testSetGetScale.
public void testSetGetScale() {
CTWorksheet worksheet = CTWorksheet.Factory.newInstance();
CTPageSetup pSetup = worksheet.addNewPageSetup();
pSetup.setScale(9);
XSSFPrintSetup printSetup = new XSSFPrintSetup(worksheet);
assertEquals(9, printSetup.getScale());
printSetup.setScale((short) 100);
assertEquals(100, pSetup.getScale());
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageSetup in project poi by apache.
the class TestXSSFPrintSetup method testSetGetPageStart.
public void testSetGetPageStart() {
CTWorksheet worksheet = CTWorksheet.Factory.newInstance();
CTPageSetup pSetup = worksheet.addNewPageSetup();
pSetup.setFirstPageNumber(9);
XSSFPrintSetup printSetup = new XSSFPrintSetup(worksheet);
assertEquals(9, printSetup.getPageStart());
printSetup.setPageStart((short) 1);
assertEquals(1, pSetup.getFirstPageNumber());
}
Aggregations