use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageSetup in project poi by apache.
the class TestXSSFPrintSetup method testSetGetValidSettings.
public void testSetGetValidSettings() {
CTWorksheet worksheet = CTWorksheet.Factory.newInstance();
CTPageSetup pSetup = worksheet.addNewPageSetup();
pSetup.setUsePrinterDefaults(false);
XSSFPrintSetup printSetup = new XSSFPrintSetup(worksheet);
assertEquals(false, printSetup.getValidSettings());
printSetup.setValidSettings(true);
assertEquals(true, pSetup.getUsePrinterDefaults());
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageSetup in project poi by apache.
the class TestXSSFPrintSetup method testSetGetUsePage.
public void testSetGetUsePage() {
CTWorksheet worksheet = CTWorksheet.Factory.newInstance();
CTPageSetup pSetup = worksheet.addNewPageSetup();
pSetup.setUseFirstPageNumber(false);
XSSFPrintSetup printSetup = new XSSFPrintSetup(worksheet);
assertEquals(false, printSetup.getUsePage());
printSetup.setUsePage(true);
assertEquals(true, pSetup.getUseFirstPageNumber());
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageSetup in project poi by apache.
the class TestXSSFPrintSetup method testSetGetOrientation.
public void testSetGetOrientation() {
CTWorksheet worksheet = CTWorksheet.Factory.newInstance();
CTPageSetup pSetup = worksheet.addNewPageSetup();
pSetup.setOrientation(STOrientation.PORTRAIT);
XSSFPrintSetup printSetup = new XSSFPrintSetup(worksheet);
assertEquals(PrintOrientation.PORTRAIT, printSetup.getOrientation());
assertEquals(false, printSetup.getLandscape());
assertEquals(false, printSetup.getNoOrientation());
printSetup.setOrientation(PrintOrientation.LANDSCAPE);
assertEquals(pSetup.getOrientation().intValue(), printSetup.getOrientation().getValue());
assertEquals(true, printSetup.getLandscape());
assertEquals(false, printSetup.getNoOrientation());
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageSetup in project poi by apache.
the class TestXSSFPrintSetup method testSetGetDraft.
public void testSetGetDraft() {
CTWorksheet worksheet = CTWorksheet.Factory.newInstance();
CTPageSetup pSetup = worksheet.addNewPageSetup();
pSetup.setDraft(false);
XSSFPrintSetup printSetup = new XSSFPrintSetup(worksheet);
assertEquals(false, printSetup.getDraft());
printSetup.setDraft(true);
assertEquals(true, pSetup.getDraft());
}
use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageSetup in project poi by apache.
the class TestXSSFPrintSetup method testSetGetNoColor.
public void testSetGetNoColor() {
CTWorksheet worksheet = CTWorksheet.Factory.newInstance();
CTPageSetup pSetup = worksheet.addNewPageSetup();
pSetup.setBlackAndWhite(false);
XSSFPrintSetup printSetup = new XSSFPrintSetup(worksheet);
assertEquals(false, printSetup.getNoColor());
printSetup.setNoColor(true);
assertEquals(true, pSetup.getBlackAndWhite());
}
Aggregations