示例#1
0
        private void ReadFibBase()
        {
            UInt16 wIdent = this._reader.ReadUInt16();

            if (wIdent != 0xA5EC)
            {
                throw new Exception("This file is not \".doc\" file.");
            }

            this._nFib = this._reader.ReadUInt16();
            this._reader.ReadUInt16(); //unused
            this._reader.ReadUInt16(); //lid
            this._reader.ReadUInt16(); //pnNext

            UInt16 flags = this._reader.ReadUInt16();

            this._isComplexFile = BitHelper.GetBitFromInteger(flags, 2);
            this._hasPictures   = BitHelper.GetBitFromInteger(flags, 3);
            this._isEncrypted   = BitHelper.GetBitFromInteger(flags, 8);
            this._is1Table      = BitHelper.GetBitFromInteger(flags, 9);

            if (this._isComplexFile)
            {
                throw new Exception("Do not support the complex file.");
            }

            if (this._isEncrypted)
            {
                throw new Exception("Do not support the encvypted file.");
            }

            this._stream.Seek(32 - 12, SeekOrigin.Current);
        }