/** * Constructor * * @param mso a <code>MsoDrawingRecord</code> value * @param obj an <code>ObjRecord</code> value * @param dd the drawing data * @param sp an <code>int</code> value * @param ep an <code>int</code> value * @param f a <code>File</code> value * @param ws the workbook settings */ public Chart(MsoDrawingRecord mso, ObjRecord obj, DrawingData dd, int sp, int ep, File f, WorkbookSettings ws) { msoDrawingRecord = mso; objRecord = obj; startpos = sp; endpos = ep; file = f; workbookSettings = ws; // msoDrawingRecord is null if the entire sheet consists of just the // chart. In this case, as there is only one drawing on the page, // it isn't necessary to add to the drawing data record anyway if (msoDrawingRecord != null) { drawingData = dd; drawingData.addData(msoDrawingRecord.getRecord().getData()); drawingNumber = drawingData.getNumDrawings() - 1; } initialized = false; // Note: mso and obj values can be null if we are creating a chart // which takes up an entire worksheet. Check that both are null or both // not null though Assert.verify((mso != null && obj != null) || (mso == null && obj == null)); }
/** * Implementation of the EscherStream method * * @return the data */ public virtual byte[] getData() { return(msoDrawingRecord.getRecord().getData()); }