Exemple #1
0
        /// <summary> Constructor
        ///
        /// </summary>
        /// <param name="val">the escher record value
        /// </param>
        private EscherRecordType(int val)
        {
            _Value = val;

            EscherRecordType[] newtypes = new EscherRecordType[types.Length + 1];
            Array.Copy(types, 0, newtypes, 0, types.Length);
            newtypes[types.Length] = this;
            types = newtypes;
        }
Exemple #2
0
        /// <summary> Accessor to get the item from a particular value
        ///
        /// </summary>
        /// <param name="val">the escher record value
        /// </param>
        /// <returns> the type corresponding to val, or UNKNOWN if a match could not
        /// be found
        /// </returns>
        public static EscherRecordType getType(int val)
        {
            EscherRecordType type = UNKNOWN;

            for (int i = 0; i < types.Length; i++)
            {
                if (val == types[i]._Value)
                {
                    type = types[i];
                    break;
                }
            }

            return(type);
        }
Exemple #3
0
        static EscherRecordType()
        {
            types = new EscherRecordType[0];

            // Init values
            UNKNOWN          = new EscherRecordType(0x0);
            DGG_CONTAINER    = new EscherRecordType(0xf000);
            BSTORE_CONTAINER = new EscherRecordType(0xf001);
            DG_CONTAINER     = new EscherRecordType(0xf002);
            SPGR_CONTAINER   = new EscherRecordType(0xf003);
            SP_CONTAINER     = new EscherRecordType(0xf004);

            DGG           = new EscherRecordType(0xf006);
            BSE           = new EscherRecordType(0xf007);
            DG            = new EscherRecordType(0xf008);
            SPGR          = new EscherRecordType(0xf009);
            SP            = new EscherRecordType(0xf00a);
            OPT           = new EscherRecordType(0xf00b);
            CLIENT_ANCHOR = new EscherRecordType(0xf010);

            CLIENT_DATA       = new EscherRecordType(0xf011);
            SPLIT_MENU_COLORS = new EscherRecordType(0xf11e);
        }
Exemple #4
0
 protected internal EscherAtom(EscherRecordType type) : base(type)
 {
 }
Exemple #5
0
 /// <summary> Constructor
 ///
 /// </summary>
 /// <param name="type">the type
 /// </param>
 protected internal EscherRecord(EscherRecordType type)
 {
     data = new EscherRecordData(type);
 }
Exemple #6
0
        private void  initialize()
        {
            int curpos = Pos + HEADER_LENGTH;
            int endpos = Pos + Length;

            EscherRecord newRecord = null;

            while (curpos < endpos)
            {
                EscherRecordData erd = new EscherRecordData(EscherStream, curpos);

                EscherRecordType type = erd.Type;
                if (type == EscherRecordType.DGG)
                {
                    newRecord = new Dgg(erd);
                }
                else if (type == EscherRecordType.DG)
                {
                    newRecord = new Dg(erd);
                }
                else if (type == EscherRecordType.BSTORE_CONTAINER)
                {
                    newRecord = new BStoreContainer(erd);
                }
                else if (type == EscherRecordType.SPGR_CONTAINER)
                {
                    newRecord = new SpgrContainer(erd);
                }
                else if (type == EscherRecordType.SP_CONTAINER)
                {
                    newRecord = new SpContainer(erd);
                }
                else if (type == EscherRecordType.SPGR)
                {
                    newRecord = new Spgr(erd);
                }
                else if (type == EscherRecordType.SP)
                {
                    newRecord = new Sp(erd);
                }
                else if (type == EscherRecordType.CLIENT_ANCHOR)
                {
                    newRecord = new ClientAnchor(erd);
                }
                else if (type == EscherRecordType.CLIENT_DATA)
                {
                    newRecord = new ClientData(erd);
                }
                else if (type == EscherRecordType.BSE)
                {
                    newRecord = new BlipStoreEntry(erd);
                }
                else if (type == EscherRecordType.OPT)
                {
                    newRecord = new Opt(erd);
                }
                else if (type == EscherRecordType.SPLIT_MENU_COLORS)
                {
                    newRecord = new SplitMenuColors(erd);
                }
                else
                {
                    newRecord = new EscherAtom(erd);
                }

                children.Add(newRecord);
                curpos += newRecord.Length;
            }

            initialized = true;
        }
Exemple #7
0
 protected internal EscherContainer(EscherRecordType type) : base(type)
 {
     Container = true;
     children  = new ArrayList();
 }
Exemple #8
0
 /// <summary> Constructor
 ///
 /// </summary>
 /// <param name="t">the type of the escher record
 /// </param>
 public EscherRecordData(EscherRecordType t)
 {
     type     = t;
     recordId = type.Value;
 }