put field initialisation in Workbook constructor

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@893045 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Josh Micich 2009-12-22 00:13:56 +00:00
parent cac5b3d60f
commit ce3db22c12

View File

@ -128,13 +128,13 @@ public final class Workbook {
/** /**
* this contains the Worksheet record objects * this contains the Worksheet record objects
*/ */
private final WorkbookRecordList records = new WorkbookRecordList(); private final WorkbookRecordList records;
/** /**
* this contains a reference to the SSTRecord so that new stings can be added * this contains a reference to the SSTRecord so that new stings can be added
* to it. * to it.
*/ */
protected SSTRecord sst = null; protected SSTRecord sst;
private LinkTable linkTable; // optionally occurs if there are references in the document. (4.10.3) private LinkTable linkTable; // optionally occurs if there are references in the document. (4.10.3)
@ -143,26 +143,36 @@ public final class Workbook {
* holds the "boundsheet" records (aka bundlesheet) so that they can have their * holds the "boundsheet" records (aka bundlesheet) so that they can have their
* reference to their "BOF" marker * reference to their "BOF" marker
*/ */
private final List<BoundSheetRecord> boundsheets = new ArrayList<BoundSheetRecord>(); private final List<BoundSheetRecord> boundsheets;
private final List<FormatRecord> formats = new ArrayList<FormatRecord>(); private final List<FormatRecord> formats;
private final List<HyperlinkRecord> hyperlinks = new ArrayList<HyperlinkRecord>(); private final List<HyperlinkRecord> hyperlinks;
protected int numxfs = 0; // hold the number of extended format records /** the number of extended format records */
protected int numfonts = 0; // hold the number of font records private int numxfs;
private int maxformatid = -1; // holds the max format id /** the number of font records */
private boolean uses1904datewindowing = false; // whether 1904 date windowing is being used private int numfonts;
private DrawingManager2 drawingManager; /** holds the max format id */
private List<EscherBSERecord> escherBSERecords = new ArrayList<EscherBSERecord>(); private int maxformatid;
/** whether 1904 date windowing is being used */
private boolean uses1904datewindowing;
private DrawingManager2 drawingManager;
private List<EscherBSERecord> escherBSERecords;
private WindowOneRecord windowOne; private WindowOneRecord windowOne;
private FileSharingRecord fileShare; private FileSharingRecord fileShare;
private WriteAccessRecord writeAccess; private WriteAccessRecord writeAccess;
private WriteProtectRecord writeProtect; private WriteProtectRecord writeProtect;
/** private Workbook() {
* Creates new Workbook with no intitialization --useless right now records = new WorkbookRecordList();
* @see #createWorkbook(List)
*/ boundsheets = new ArrayList<BoundSheetRecord>();
public Workbook() { formats = new ArrayList<FormatRecord>();
hyperlinks = new ArrayList<HyperlinkRecord>();
numxfs = 0;
numfonts = 0;
maxformatid = -1;
uses1904datewindowing = false;
escherBSERecords = new ArrayList<EscherBSERecord>();
} }
/** /**