Fix bug #48485 - Add extra paper size constans to PrintSetup, such as A3, B4 and B5

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@929064 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2010-03-30 10:05:53 +00:00
parent a0925a6320
commit c01a095d32
3 changed files with 57 additions and 8 deletions

View File

@ -34,6 +34,7 @@
<changes>
<release version="3.7-SNAPSHOT" date="2010-??-??">
<action dev="POI-DEVELOPERS" type="fix">48485 - Add extra paper size constans to PrintSetup, such as A3, B4 and B5</action>
<action dev="POI-DEVELOPERS" type="fix">Make poifs.filesystem.DirectoryNode preserve the original ordering of its files, which HSMF needs to be able to correctly match up chunks</action>
<action dev="POI-DEVELOPERS" type="add">Support evaluation of indirect defined names in INDIRECT</action>
<action dev="POI-DEVELOPERS" type="fix">43670 - Improve HDGF ChunkV11 separator detection, and short string detection, to solve the "Negative length of ChunkHeader" problem</action>

View File

@ -17,6 +17,7 @@
package org.apache.poi.hssf.record;
import org.apache.poi.ss.usermodel.PrintSetup;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
@ -25,12 +26,14 @@ import org.apache.poi.util.BitFieldFactory;
* Title: PAGESETUP (0x00A1)<p/>
* Description: Stores print setup options -- bogus for HSSF (and marked as such)<p/>
* REFERENCE: PG 385 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)<p/>
* REFERENCE: PG 412 Microsoft Excel Binary File Format Structure v20091214<p/>
* @author Andrew C. Oliver (acoliver at apache dot org)
* @author Jason Height (jheight at chariot dot net dot au)
* @version 2.0-pre
*/
public final class PrintSetupRecord extends StandardRecord {
public final static short sid = 0x00A1;
/** Constants for this are held in {@link PrintSetup} */
private short field_1_paper_size;
private short field_2_scale;
private short field_3_page_start;

View File

@ -18,24 +18,69 @@
package org.apache.poi.ss.usermodel;
public interface PrintSetup {
/** US Letter 8 1/2 x 11 in */
public static final short LETTER_PAPERSIZE = 1;
/** US Letter Small 8 1/2 x 11 in */
public static final short LETTER_SMALL_PAGESIZE = 2;
/** US Tabloid 11 x 17 in */
public static final short TABLOID_PAPERSIZE = 3;
/** US Ledger 17 x 11 in */
public static final short LEDGER_PAPERSIZE = 4;
/** US Legal 8 1/2 x 14 in */
public static final short LEGAL_PAPERSIZE = 5;
/** US Statement 5 1/2 x 8 1/2 in */
public static final short STATEMENT_PAPERSIZE = 6;
/** US Executive 7 1/4 x 10 1/2 in */
public static final short EXECUTIVE_PAPERSIZE = 7;
/** A3 - 297x420 mm */
public static final short A3_PAPERSIZE = 8;
/** A4 - 210x297 mm */
public static final short A4_PAPERSIZE = 9;
/** A4 Small - 210x297 mm */
public static final short A4_SMALL_PAPERSIZE = 10;
/** A5 - 148x210 mm */
public static final short A5_PAPERSIZE = 11;
/** B4 (JIS) 250x354 mm */
public static final short B4_PAPERSIZE = 12;
/** B5 (JIS) 182x257 mm */
public static final short B5_PAPERSIZE = 13;
/** Folio 8 1/2 x 13 in */
public static final short FOLIO8_PAPERSIZE = 14;
/** Quarto 215x275 mm */
public static final short QUARTO_PAPERSIZE = 15;
/** 10 x 14 in */
public static final short TEN_BY_FOURTEEN_PAPERSIZE = 16;
/** 11 x 17 in */
public static final short ELEVEN_BY_SEVENTEEN_PAPERSIZE = 17;
/** US Note 8 1/2 x 11 in */
public static final short NOTE8_PAPERSIZE = 18;
/** US Envelope #9 3 7/8 x 8 7/8 */
public static final short ENVELOPE_9_PAPERSIZE = 19;
/** US Envelope #10 4 1/8 x 9 1/2 */
public static final short ENVELOPE_10_PAPERSIZE = 20;
/** Envelope DL 110x220 mm */
public static final short ENVELOPE_DL_PAPERSIZE = 27;
/** Envelope C5 162x229 mm */
public static final short ENVELOPE_CS_PAPERSIZE = 28;
public static final short ENVELOPE_C5_PAPERSIZE = 28;
/** Envelope C3 324x458 mm */
public static final short ENVELOPE_C3_PAPERSIZE = 29;
/** Envelope C4 229x324 mm */
public static final short ENVELOPE_C4_PAPERSIZE = 30;
/** Envelope C6 114x162 mm */
public static final short ENVELOPE_C6_PAPERSIZE = 31;
public static final short ENVELOPE_MONARCH_PAPERSIZE = 37;
/** A4 Extra - 9.27 x 12.69 in */
public static final short A4_EXTRA_PAPERSIZE = 53;
/** A4 Transverse - 210x297 mm */
public static final short A4_TRANSVERSE_PAPERSIZE = 55;
/** A4 Plus - 210x330 mm */
public static final short A4_PLUS_PAPERSIZE = 60;
/** US Letter Rotated 11 x 8 1/2 in */
public static final short LETTER_ROTATED_PAPERSIZE = 75;
/** A4 Rotated - 297x210 mm */
public static final short A4_ROTATED_PAPERSIZE = 77;
/**
* Set the paper size.