Пример #1
0
        /**
         * Constructs a Delta record and Sets its fields appropriately.
         * @param in the RecordInputstream to Read the record from
         */

        public DeltaRecord(RecordInputStream in1)
        {
            field_1_max_change = in1.ReadDouble();
            if(in1.Remaining > 0) // support malformed record
            {
                in1.ReadDouble();
            }
        }
Пример #2
0
        /**
         * Constructs a ValueRange record and Sets its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */

        public ValueRangeRecord(RecordInputStream in1)
        {
            field_1_minimumAxisValue = in1.ReadDouble();
            field_2_maximumAxisValue = in1.ReadDouble();
            field_3_majorIncrement = in1.ReadDouble();
            field_4_minorIncrement = in1.ReadDouble();
            field_5_categoryAxisCross = in1.ReadDouble();
            field_6_options = in1.ReadShort();

        }
Пример #3
0
        /**
         * Constructs a PrintSetup (SetUP) record and Sets its fields appropriately.
         * @param in the RecordInputstream to Read the record from
         */

        public PrintSetupRecord(RecordInputStream in1)
        {
            field_1_paper_size    = in1.ReadShort();
            field_2_scale         = in1.ReadShort();
            field_3_page_start    = in1.ReadShort();
            field_4_fit_width     = in1.ReadShort();
            field_5_fit_height    = in1.ReadShort();
            field_6_options       = in1.ReadShort();
            field_7_hresolution   = in1.ReadShort();
            field_8_vresolution   = in1.ReadShort();
            field_9_headermargin  = in1.ReadDouble();
            field_10_footermargin = in1.ReadDouble();
            field_11_copies       = in1.ReadShort();
        }
Пример #4
0
        public OldFormulaRecord(RecordInputStream ris) :
            base(ris, ris.Sid == biff2_sid)
        {
            ;

            if (IsBiff2)
            {
                field_4_value = ris.ReadDouble();
            }
            else
            {
                long valueLongBits = ris.ReadLong();
                specialCachedValue = SpecialCachedValue.Create(valueLongBits);
                if (specialCachedValue == null)
                {
                    field_4_value = BitConverter.Int64BitsToDouble(valueLongBits);
                }
            }

            if (IsBiff2)
            {
                field_5_options = (short)ris.ReadUByte();
            }
            else
            {
                field_5_options = ris.ReadShort();
            }

            int expression_len = ris.ReadShort();
            int nBytesAvailable = ris.Available();
            field_6_Parsed_expr = Formula.Read(expression_len, ris, nBytesAvailable);
        }
Пример #5
0
        public OldFormulaRecord(RecordInputStream ris) :
            base(ris, ris.Sid == biff2_sid)
        {
            ;

            if (IsBiff2)
            {
                field_4_value = ris.ReadDouble();
            }
            else
            {
                long valueLongBits = ris.ReadLong();
                specialCachedValue = SpecialCachedValue.Create(valueLongBits);
                if (specialCachedValue == null)
                {
                    field_4_value = BitConverter.Int64BitsToDouble(valueLongBits);
                }
            }

            if (IsBiff2)
            {
                field_5_options = (short)ris.ReadUByte();
            }
            else
            {
                field_5_options = ris.ReadShort();
            }

            int expression_len  = ris.ReadShort();
            int nBytesAvailable = ris.Available();

            field_6_Parsed_expr = Formula.Read(expression_len, ris, nBytesAvailable);
        }
Пример #6
0
 private static object ReadAConstantValue(RecordInputStream in1)
 {
     byte grbit = (byte)in1.ReadByte();
     switch (grbit)
     {
         case TYPE_EMPTY:
             in1.ReadLong(); // 8 byte 'not used' field
             return EMPTY_REPRESENTATION;
         case TYPE_NUMBER:
             return in1.ReadDouble();
         case TYPE_STRING:
             return in1.ReadUnicodeString();
         case TYPE_bool:
             return ReadBoolean(in1);
         case TYPE_ERROR_CODE:
             int errCode = in1.ReadUShort();
             // next 6 bytes are Unused
             in1.ReadUShort();
             in1.ReadInt();
             return ErrorConstant.ValueOf(errCode);
     }
     throw new Exception("Unknown grbit value (" + grbit + ")");
 }
Пример #7
0
        /**
         * Constructs a Delta record and Sets its fields appropriately.
         * @param in the RecordInputstream to Read the record from
         */

        public DeltaRecord(RecordInputStream in1)
        {
            field_1_max_Change = in1.ReadDouble();
        }
Пример #8
0
        /**
         * Constructs a Number record and Sets its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */

        public NumberRecord(RecordInputStream in1):base(in1)
        {
            field_4_value = in1.ReadDouble();
        }
Пример #9
0
 /**
  * Constructs a TopMargin record and Sets its fields appropriately.
  *
  * @param in the RecordInputstream to Read the record from
  */
 public TopMarginRecord(RecordInputStream in1)
 {
     field_1_margin = in1.ReadDouble();
 }
Пример #10
0
        /**
         * Constructs a Number record and Sets its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */

        public NumberRecord(RecordInputStream in1) : base(in1)
        {
            field_4_value = in1.ReadDouble();
        }
Пример #11
0
 /**
  * Constructs a RightMargin record and Sets its fields appropriately.     *     * @param id    id must be 0x27 or an exception     *              will be throw upon validation     * @param size  size the size of the data area of the record     * @param data  data of the record (should not contain sid/len)
  */
 public RightMarginRecord(RecordInputStream in1)
 {
     field_1_margin = in1.ReadDouble();
 }
Пример #12
0
        /**
         * Constructs a Delta record and Sets its fields appropriately.
         * @param in the RecordInputstream to Read the record from
         */

        public DeltaRecord(RecordInputStream in1)
        {
            field_1_max_change = in1.ReadDouble();
        }
Пример #13
0
        /**
         * Constructs a PrintSetup (SetUP) record and Sets its fields appropriately.
         * @param in the RecordInputstream to Read the record from
         */

        public PrintSetupRecord(RecordInputStream in1)
        {
            field_1_paper_size = in1.ReadShort();
            field_2_scale = in1.ReadShort();
            field_3_page_start = in1.ReadShort();
            field_4_fit_width = in1.ReadShort();
            field_5_fit_height = in1.ReadShort();
            field_6_options = in1.ReadShort();
            field_7_hresolution = in1.ReadShort();
            field_8_vresolution = in1.ReadShort();
            field_9_headermargin = in1.ReadDouble();
            field_10_footermargin = in1.ReadDouble();
            field_11_copies = in1.ReadShort();
        }
Пример #14
0
 /** Create a NumberPtg from a byte array Read from disk */
 public NumberPtg(RecordInputStream in1)
 {
     field_1_value = in1.ReadDouble();
 }