Esempio n. 1
0
 private void SetInstanceAndVersion(MsoType type)
 {
     base.Version = 15;
     if (type == MsoType.BstoreContainer)
     {
         base.Instance = 1;
     }
 }
Esempio n. 2
0
        public static MsoBaseRecord CreateFromReader(BinaryReader reader)
        {
            ushort  atom = reader.ReadUInt16();
            MsoType type = (MsoType)reader.ReadUInt16();

            switch (type)
            {
            case MsoType.DggContainer:
            case MsoType.BstoreContainer:
            case MsoType.DgContainer:
            case MsoType.SpgrContainer:
            case MsoType.SpContainer:
                return(CreateContainer(reader, type));

            case MsoType.Dgg:
                return(new MsofbtDggRecord(reader));

            case MsoType.BSE:
                return(new MsofbtBseRecord(reader, atom));

            case MsoType.Dg:
                return(new MsofbtDgRecord(reader));

            case MsoType.Spgr:
                return(new MsofbtSpgrRecord(reader));

            case MsoType.Sp:
                return(new MsofbtSpRecord(reader));

            case MsoType.OPT:
                return(new MsofbtOptRecord(reader));

            case MsoType.ClientAnchor:
                return(new MsofbtClientAnchorRecord(reader));

            case MsoType.ClientData:
                return(new MsofbtClientDataRecord(reader));

            case MsoType.SplitMenuColors:
                return(new MsoPreservedRecord(type, reader));
            }
            SkipUnknownMsoRecord(reader);
            return(null);
        }
Esempio n. 3
0
        public static MsoContainerRecord CreateContainer(BinaryReader reader, MsoType type)
        {
            switch (type)
            {
            case MsoType.DggContainer:
                return(new MsoContainerRecord(XLSDescriptors.GetByName("MSOFBTDGGCONTAINER"), reader, type));

            case MsoType.BstoreContainer:
                return(new MsoContainerRecord(XLSDescriptors.GetByName("MSOFBTBSTORECONTAINER"), reader, type));

            case MsoType.DgContainer:
                return(new MsoContainerRecord(XLSDescriptors.GetByName("MSOFBTDGCONTAINER"), reader, type));

            case MsoType.SpgrContainer:
                return(new MsoContainerRecord(XLSDescriptors.GetByName("MSOFBTSPGRCONTAINER"), reader, type));

            case MsoType.SpContainer:
                return(new MsoContainerRecord(XLSDescriptors.GetByName("MSOFBTSPCONTAINER"), reader, type));
            }
            throw new ArgumentException("Unallowed mso type for recreation mso container.");
        }
Esempio n. 4
0
 public MsoContainerRecord(XLSDescriptor descriptor, BinaryReader reader, MsoType type) : base(descriptor, reader, type)
 {
     this.items = new ArrayList();
     this.SetInstanceAndVersion(type);
 }
Esempio n. 5
0
 public MsoContainerRecord(XLSDescriptor descriptor, MsoType type) : base(descriptor, type)
 {
     this.items = new ArrayList();
     this.SetInstanceAndVersion(type);
     base.InitializeBody((byte[])null);
 }
Esempio n. 6
0
 public MsoBaseRecord(XLSDescriptor descriptor, int bodyLength, BinaryReader br, MsoType type, IoOperationInfo operationInfo) : base(descriptor, bodyLength, br)
 {
     this.type          = (ushort)type;
     this.operationInfo = operationInfo;
     this.Read(br);
 }
Esempio n. 7
0
 public MsoBaseRecord(XLSDescriptor descriptor, BinaryReader br, MsoType type) : base(descriptor, 0, br)
 {
     this.type = (ushort)type;
     this.Read(br);
 }
Esempio n. 8
0
 public MsoBaseRecord(XLSDescriptor descriptor, MsoType type) : base(descriptor)
 {
     this.type = (ushort)type;
 }
Esempio n. 9
0
 public MsoBaseRecord(MsoType type) : base((XLSDescriptor)null)
 {
     this.type = (ushort)type;
 }
Esempio n. 10
0
 public MsoPreservedRecord(MsoType type, BinaryReader reader) : base(staticDescriptor, reader, type)
 {
     this.bytes = new OptimizedBuffer();
 }