public void TestRead()
        {

            FtCblsSubRecord record = new FtCblsSubRecord(TestcaseRecordInputStream.Create(FtCblsSubRecord.sid, data), data.Length);

            Assert.AreEqual(FtCblsSubRecord.sid, record.Sid);
            Assert.AreEqual(data.Length, record.DataSize);
        }
Beispiel #2
0
 public override Object Clone()
 {
     FtCblsSubRecord rec = new FtCblsSubRecord();
     byte[] recdata = new byte[reserved.Length];
     Array.Copy(reserved, 0, recdata, 0, recdata.Length);
     rec.reserved = recdata;
     return rec;
 }
Beispiel #3
0
        public override Object Clone()
        {
            FtCblsSubRecord rec = new FtCblsSubRecord();

            byte[] recdata = new byte[reserved.Length];
            Array.Copy(reserved, 0, recdata, 0, recdata.Length);
            rec.reserved = recdata;
            return(rec);
        }
        public void TestWrite()
        {
            FtCblsSubRecord record = new FtCblsSubRecord();
            Assert.AreEqual(FtCblsSubRecord.sid, record.Sid);
            Assert.AreEqual(data.Length, record.DataSize);

            byte[] ser = record.Serialize();
            Assert.AreEqual(ser.Length - 4, data.Length);

        }
        public void TestClone()
        {
            FtCblsSubRecord record = new FtCblsSubRecord();
            byte[] src = record.Serialize();

            FtCblsSubRecord Cloned = (FtCblsSubRecord)record.Clone();
            byte[] cln = Cloned.Serialize();

            Assert.AreEqual(record.DataSize, Cloned.DataSize);
            Assert.IsTrue(Arrays.Equals(src, cln));
        }
Beispiel #6
0
        /**
         * Creates the low level OBJ record for this shape.
         */
        private ObjRecord CreateObjRecord(HSSFSimpleShape shape, int shapeId)
        {
            ObjRecord obj = new ObjRecord();
            CommonObjectDataSubRecord c = new CommonObjectDataSubRecord();
            c.ObjectType = CommonObjectType.COMBO_BOX;
            c.ObjectId = shapeId;
            c.IsLocked = true;
            c.IsPrintable = false;
            c.IsAutoFill = true;
            c.IsAutoline = false;

            FtCblsSubRecord f = new FtCblsSubRecord();

            LbsDataSubRecord l = LbsDataSubRecord.CreateAutoFilterInstance();

            EndSubRecord e = new EndSubRecord();

            obj.AddSubRecord(c);
            obj.AddSubRecord(f);
            obj.AddSubRecord(l);
            obj.AddSubRecord(e);

            return obj;
        }
Beispiel #7
0
 protected override ObjRecord CreateObjRecord()
 {
     ObjRecord obj = new ObjRecord();
     CommonObjectDataSubRecord c = new CommonObjectDataSubRecord();
     c.ObjectType = CommonObjectType.ComboBox;
     c.IsLocked = (true);
     c.IsPrintable = (false);
     c.IsAutoFill = (true);
     c.IsAutoline = (false);
     FtCblsSubRecord f = new FtCblsSubRecord();
     LbsDataSubRecord l = LbsDataSubRecord.CreateAutoFilterInstance();
     EndSubRecord e = new EndSubRecord();
     obj.AddSubRecord(c);
     obj.AddSubRecord(f);
     obj.AddSubRecord(l);
     obj.AddSubRecord(e);
     return obj;
 }