Пример #1
0
        internal static int TotalSizeWithArray(TParsedTokenList Data, TFormulaType FmlaType)
        {
            if (Data.TextLenght > FlxConsts.Max_FormulaLen97_2003)
            {
                FlxMessages.ThrowException(FlxErr.ErrFormulaTooLong, TFormulaConvertInternalToText.AsString(Data, 0, 0, null));
            }
            int DataLenNoArray;

            byte[] bData = TFormulaConvertInternalToBiff8.GetTokenData(null, Data, FmlaType, out DataLenNoArray);
            return(bData.Length);
        }
Пример #2
0
        internal static void SaveToStream(TNameRecordList Names, IDataStream Workbook, TFormulaType FmlaType, TParsedTokenList Data, bool WriteLen)
        {
            if (Data.TextLenght > FlxConsts.Max_FormulaLen97_2003)
            {
                FlxMessages.ThrowException(FlxErr.ErrFormulaTooLong, TFormulaConvertInternalToText.AsString(Data, 0, 0, null));
            }
            int FmlaNoArrayLen;

            byte[] bData = TFormulaConvertInternalToBiff8.GetTokenData(Names, Data, FmlaType, out FmlaNoArrayLen);
            if (WriteLen)
            {
                Workbook.Write16((UInt16)FmlaNoArrayLen);
            }
            Workbook.Write(bData, bData.Length);
        }