use of org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageMargins in project poi by apache.
the class TestXSSFPrintSetup method testSetGetHeaderFooterMargin.
public void testSetGetHeaderFooterMargin() {
CTWorksheet worksheet = CTWorksheet.Factory.newInstance();
CTPageMargins pMargins = worksheet.addNewPageMargins();
pMargins.setHeader(1.5);
pMargins.setFooter(2);
XSSFPrintSetup printSetup = new XSSFPrintSetup(worksheet);
assertEquals(1.5, printSetup.getHeaderMargin(), 0.0);
assertEquals(2.0, printSetup.getFooterMargin(), 0.0);
printSetup.setHeaderMargin(5);
printSetup.setFooterMargin(3.5);
assertEquals(5.0, pMargins.getHeader(), 0.0);
assertEquals(3.5, pMargins.getFooter(), 0.0);
}
Aggregations