Exemplo n.º 1
0
        /**
         * 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));
        }
Exemplo n.º 2
0
        /**
         * Constructor used when reading images
         *
         * @param mso the drawing record
         * @param obj the object record
         * @param dd the drawing data for all drawings on this sheet
         * @param dg the drawing group
         * @param ws the workbook settings
         */
        public CheckBox(MsoDrawingRecord mso, ObjRecord obj, DrawingData dd,
                        DrawingGroup dg, WorkbookSettings ws)
        {
            drawingGroup     = dg;
            msoDrawingRecord = mso;
            drawingData      = dd;
            objRecord        = obj;
            initialized      = false;
            workbookSettings = ws;
            origin           = Origin.READ;
            drawingData.addData(msoDrawingRecord.getData());
            drawingNumber = drawingData.getNumDrawings() - 1;
            drawingGroup.addDrawing(this);

            Assert.verify(mso != null && obj != null);

            initialize();
        }
Exemplo n.º 3
0
        /**
         * Constructor used when reading images
         *
         * @param mso the drawing record
         * @param obj the object record
         * @param dd the drawing data for all drawings on this sheet
         * @param dg the drawing group
         */
        public Drawing(MsoDrawingRecord mso,
                       ObjRecord obj,
                       DrawingData dd,
                       DrawingGroup dg,
                       Sheet s)
        {
            drawingGroup     = dg;
            msoDrawingRecord = mso;
            drawingData      = dd;
            objRecord        = obj;
            sheet            = s;
            initialized      = false;
            origin           = Origin.READ;
            drawingData.addData(msoDrawingRecord.getData());
            drawingNumber = drawingData.getNumDrawings() - 1;
            drawingGroup.addDrawing(this);

            Assert.verify(mso != null && obj != null);

            initialize();
        }
Exemplo n.º 4
0
        /**
         * Constructor used when reading images
         *
         * @param mso the drawing record
         * @param obj the object record
         * @param dd the drawing data for all drawings on this sheet
         * @param dg the drawing group
         * @param ws the workbook settings
         */
        public ComboBox(MsoDrawingRecord mso,ObjRecord obj,DrawingData dd,
            DrawingGroup dg,WorkbookSettings ws)
        {
            drawingGroup = dg;
            msoDrawingRecord = mso;
            drawingData = dd;
            objRecord = obj;
            initialized = false;
            workbookSettings = ws;
            origin = Origin.READ;
            drawingData.addData(msoDrawingRecord.getData());
            drawingNumber = drawingData.getNumDrawings() - 1;
            drawingGroup.addDrawing(this);

            Assert.verify(mso != null && obj != null);

            initialize();
        }
Exemplo n.º 5
0
        /**
         * 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));
        }
Exemplo n.º 6
0
        /**
         * Constructor used when reading images
         *
         * @param mso the drawing record
         * @param obj the object record
         * @param dd the drawing data for all drawings on this sheet
         * @param dg the drawing group
         */
        public Drawing(MsoDrawingRecord mso,
            ObjRecord obj,
            DrawingData dd,
            DrawingGroup dg,
            Sheet s)
        {
            drawingGroup = dg;
            msoDrawingRecord = mso;
            drawingData = dd;
            objRecord = obj;
            sheet = s;
            initialized = false;
            origin = Origin.READ;
            drawingData.addData(msoDrawingRecord.getData());
            drawingNumber = drawingData.getNumDrawings() - 1;
            drawingGroup.addDrawing(this);

            Assert.verify(mso != null && obj != null);

            initialize();
        }