See OOO excelfileformat.pdf sec 4.4 'Page Settings Block'
| Modifier and Type | Class and Description |
|---|---|
| private static class | PageSettingsBlock.
PLS is potentially a continued record, but is currently uninterpreted by POI |
| Modifier and Type | Field and Description |
|---|---|
| private Record | |
| private BottomMarginRecord | |
| private PageBreakRecord | |
| private FooterRecord | |
| private HCenterRecord | |
| private HeaderRecord | |
| private HeaderFooterRecord | |
| private LeftMarginRecord | |
| private final List | |
| private PrintSetupRecord | |
| private Record | |
| private RightMarginRecord | |
| private PageBreakRecord | |
| private final List | _sviewHeaderFooters
HeaderFooterRecord records belonging to preceding CustomViewSettingsRecordAggregates. |
| private TopMarginRecord | |
| private VCenterRecord |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addLateHeaderFooter(HeaderFooterRecord
the HeaderFooterRecord to set rec)HEADERFOOTER is new in 2007. |
| public void | addLateRecords(RecordStream
the RecordStream to read from rs)This method reads PageSettingsBlock records from the supplied RecordStream until the first non-PageSettingsBlock record is encountered. |
| private void | |
| private static HCenterRecord | |
| private static PrintSetupRecord | Returns: record containing a PrintSetupRecordcreates the PrintSetup Record and sets it to defaults and marks it invalid |
| private static VCenterRecord | |
| public int[] | |
| private PageBreakRecord | |
| public FooterRecord | |
| public HCenterRecord | |
| public HeaderRecord | |
| public double | Returns: the size of the marginwhich margin to get margin)Gets the size of the margin in inches. |
| private Margin | |
| public int | |
| public int | |
| public PrintSetupRecord | |
| public int[] | |
| private PageBreakRecord | |
| public VCenterRecord | |
| public boolean | Returns: true if the specified column has a page breakthe column to check for column)Queries if the specified column has a page break |
| public static boolean | Returns: true if the specified Record sid is one belonging to the
'Page Settings Block'.the record sid sid)
|
| public boolean | Returns: true if the specified row has a page breakthe row to check for row)Queries if the specified row has a page break |
| public void | positionRecords(List<RecordBase>
the list of sheet records read so far sheetRecords)Some apps can define multiple HeaderFooterRecord records for a sheet. |
| private boolean | |
| public void | removeColumnBreak(int
the column to check for page breaks column)Removes a page break at the indicated column |
| public void | |
| public void | setColumnBreak(short
the column to add page breaks to column, short the starting row fromRow, short the ending row toRow)Sets a page break at the indicated column |
| public void | |
| public void | |
| public void | setMargin(short
which margin to get margin, double the size of the margin size)Sets the size of the margin in inches. |
| public void | setPrintSetup(PrintSetupRecord
The new PrintSetupRecord for the sheet. newPrintSetup)Sets the PrintSetupRecord. |
| public void | setRowBreak(int
the row row, short the starting column fromCol, short the ending column toCol)Sets a page break at the indicated row |
| private static void | shiftBreaks(PageBreakRecord
The page record to be shifted breaks, int Starting "main" value to shift breaks start, int Ending "main" value to shift breaks stop, int number of units (rows/columns) to shift by count)Shifts all the page breaks in the range "count" number of rows/columns |
| public void | shiftColumnBreaks(short
the starting column startingCol, short the ending column endingCol, short the number of columns to shift by count)Shifts the vertical page breaks for the indicated count |
| public void | shiftRowBreaks(int
the starting row startingRow, int the ending row endingRow, int the number of rows to shift by count)Shifts the horizontal page breaks for the indicated count |
| public void | visitContainedRecords(RecordAggregate.
The visitor to use for callbacks while walking this object rvImplements abstract org. Visit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file. |
| private static void | |
| private static void |
| _bitmap | back to summary |
|---|---|
| private Record _bitmap | |
| _bottomMargin | back to summary |
|---|---|
| private BottomMarginRecord _bottomMargin | |
| _columnBreaksRecord | back to summary |
|---|---|
| private PageBreakRecord _columnBreaksRecord | |
| _footer | back to summary |
|---|---|
| private FooterRecord _footer | |
| _hCenter | back to summary |
|---|---|
| private HCenterRecord _hCenter | |
| _header | back to summary |
|---|---|
| private HeaderRecord _header | |
| _headerFooter | back to summary |
|---|---|
| private HeaderFooterRecord _headerFooter | |
| _leftMargin | back to summary |
|---|---|
| private LeftMarginRecord _leftMargin | |
| _plsRecords | back to summary |
|---|---|
| private final List<PageSettingsBlock. | |
| _printSetup | back to summary |
|---|---|
| private PrintSetupRecord _printSetup | |
| _printSize | back to summary |
|---|---|
| private Record _printSize | |
| _rightMargin | back to summary |
|---|---|
| private RightMarginRecord _rightMargin | |
| _rowBreaksRecord | back to summary |
|---|---|
| private PageBreakRecord _rowBreaksRecord | |
| _sviewHeaderFooters | back to summary |
|---|---|
| private final List<HeaderFooterRecord> _sviewHeaderFooters HeaderFooterRecord records belonging to preceding CustomViewSettingsRecordAggregates.
The indicator of such records is a non-zero GUID,
see | |
| _topMargin | back to summary |
|---|---|
| private TopMarginRecord _topMargin | |
| _vCenter | back to summary |
|---|---|
| private VCenterRecord _vCenter | |
| PageSettingsBlock | back to summary |
|---|---|
| public PageSettingsBlock(RecordStream rs) | |
| PageSettingsBlock | back to summary |
|---|---|
| public PageSettingsBlock() Creates a PageSettingsBlock with default settings | |
| addLateHeaderFooter | back to summary |
|---|---|
| public void addLateHeaderFooter(HeaderFooterRecord rec) HEADERFOOTER is new in 2007. Some apps seem to have scattered this record long after
the
| |
| addLateRecords | back to summary |
|---|---|
| public void addLateRecords(RecordStream rs) This method reads PageSettingsBlock records from the supplied RecordStream until the first non-PageSettingsBlock record is encountered. As each record is read, it is incorporated into this PageSettingsBlock. The latest Excel version seems to write the PageSettingsBlock uninterrupted. However there are several examples (that Excel reads OK) where these records are not written together:
Note - when POI writes out this PageSettingsBlock, the records will always be written in one consolidated block (in the standard ordering) regardless of how scattered the records were when they were originally read.
| |
| checkNotPresent | back to summary |
|---|---|
| private void checkNotPresent(Record rec) | |
| createHCenter | back to summary |
|---|---|
| private static HCenterRecord createHCenter() creates the HCenter Record and sets it to false (don't horizontally center) | |
| createPrintSetup | back to summary |
|---|---|
| private static PrintSetupRecord createPrintSetup() creates the PrintSetup Record and sets it to defaults and marks it invalid
| |
| createVCenter | back to summary |
|---|---|
| private static VCenterRecord createVCenter() creates the VCenter Record and sets it to false (don't horizontally center) | |
| getColumnBreaks | back to summary |
|---|---|
public int[] getColumnBreaks()
| |
| getColumnBreaksRecord | back to summary |
|---|---|
| private PageBreakRecord getColumnBreaksRecord() | |
| getFooter | back to summary |
|---|---|
| public FooterRecord getFooter() Returns the FooterRecord.
| |
| getHCenter | back to summary |
|---|---|
| public HCenterRecord getHCenter() | |
| getHeader | back to summary |
|---|---|
| public HeaderRecord getHeader() Returns the HeaderRecord.
| |
| getMargin | back to summary |
|---|---|
| public double getMargin(short margin) Gets the size of the margin in inches.
| |
| getMarginRec | back to summary |
|---|---|
| private Margin getMarginRec(int marginIndex) | |
| getNumColumnBreaks | back to summary |
|---|---|
public int getNumColumnBreaks()
| |
| getNumRowBreaks | back to summary |
|---|---|
public int getNumRowBreaks()
| |
| getPrintSetup | back to summary |
|---|---|
| public PrintSetupRecord getPrintSetup() Returns the PrintSetupRecord.
| |
| getRowBreaks | back to summary |
|---|---|
public int[] getRowBreaks()
| |
| getRowBreaksRecord | back to summary |
|---|---|
| private PageBreakRecord getRowBreaksRecord() | |
| getVCenter | back to summary |
|---|---|
| public VCenterRecord getVCenter() | |
| isColumnBroken | back to summary |
|---|---|
| public boolean isColumnBroken(int column) Queries if the specified column has a page break
| |
| isComponentRecord | back to summary |
|---|---|
public static boolean isComponentRecord(int sid)
| |
| isRowBroken | back to summary |
|---|---|
| public boolean isRowBroken(int row) Queries if the specified row has a page break
| |
| positionRecords | back to summary |
|---|---|
| public void positionRecords(List<RecordBase> sheetRecords) Some apps can define multiple HeaderFooterRecord records for a sheet. When saving such a file Excel 2007 re-positions them according to the following rules: - take a HeaderFooterRecord and read 16-byte GUID at offset 12. If it is zero, it means the current sheet and the given HeaderFooterRecord belongs to this PageSettingsBlock - If GUID is not zero then search in preceding CustomViewSettingsRecordAggregates. Compare first 16 bytes of UserSViewBegin with the HeaderFooterRecord's GUID. If match, then append the HeaderFooterRecord to this CustomViewSettingsRecordAggregates
| |
| readARecord | back to summary |
|---|---|
| private boolean readARecord(RecordStream rs) | |
| removeColumnBreak | back to summary |
|---|---|
| public void removeColumnBreak(int column) Removes a page break at the indicated column
| |
| removeRowBreak | back to summary |
|---|---|
| public void removeRowBreak(int row) Removes a page break at the indicated row
| |
| setColumnBreak | back to summary |
|---|---|
| public void setColumnBreak(short column, short fromRow, short toRow) Sets a page break at the indicated column
| |
| setFooter | back to summary |
|---|---|
| public void setFooter(FooterRecord newFooter) Sets the FooterRecord.
| |
| setHeader | back to summary |
|---|---|
| public void setHeader(HeaderRecord newHeader) Sets the HeaderRecord.
| |
| setMargin | back to summary |
|---|---|
| public void setMargin(short margin, double size) Sets the size of the margin in inches.
| |
| setPrintSetup | back to summary |
|---|---|
| public void setPrintSetup(PrintSetupRecord newPrintSetup) Sets the PrintSetupRecord.
| |
| setRowBreak | back to summary |
|---|---|
| public void setRowBreak(int row, short fromCol, short toCol) Sets a page break at the indicated row
| |
| shiftBreaks | back to summary |
|---|---|
| private static void shiftBreaks(PageBreakRecord breaks, int start, int stop, int count) Shifts all the page breaks in the range "count" number of rows/columns
| |
| shiftColumnBreaks | back to summary |
|---|---|
| public void shiftColumnBreaks(short startingCol, short endingCol, short count) Shifts the vertical page breaks for the indicated count
| |
| shiftRowBreaks | back to summary |
|---|---|
| public void shiftRowBreaks(int startingRow, int endingRow, int count) Shifts the horizontal page breaks for the indicated count
| |
| visitContainedRecords | back to summary |
|---|---|
| public void visitContainedRecords(RecordAggregate. Implements abstract org. Doc from org. Visit each of the atomic BIFF records contained in this RecordAggregate in the order
that they should be written to file. Implementors may or may not return the actual
| |
| visitIfPresent | back to summary |
|---|---|
| private static void visitIfPresent(Record r, RecordAggregate. | |
| visitIfPresent | back to summary |
|---|---|
| private static void visitIfPresent(PageBreakRecord r, RecordAggregate. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Record | |
| private ContinueRecord[] | _plsContinues
holds any continue records found after the PLS record. |
| private static final ContinueRecord[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | visitContainedRecords(RecordAggregate.
The visitor to use for callbacks while walking this object rvImplements abstract org. Visit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file. |
| _pls | back to summary |
|---|---|
| private final Record _pls | |
| _plsContinues | back to summary |
|---|---|
| private ContinueRecord[] _plsContinues holds any continue records found after the PLS record. | |
| EMPTY_CONTINUE_RECORD_ARRAY | back to summary |
|---|---|
| private static final ContinueRecord[] EMPTY_CONTINUE_RECORD_ARRAY | |
| PLSAggregate | back to summary |
|---|---|
| public PLSAggregate(RecordStream rs) | |
| visitContainedRecords | back to summary |
|---|---|
| public void visitContainedRecords(RecordAggregate. Implements abstract org. Doc from org. Visit each of the atomic BIFF records contained in this RecordAggregate in the order
that they should be written to file. Implementors may or may not return the actual
| |