Beispiel #1
0
        public void TestConvertSharedFormulasOperandClasses_bug45123()
        {
            ILittleEndianInput in1 = TestcaseRecordInputStream.CreateLittleEndian(SHARED_FORMULA_WITH_REF_ARRAYS_DATA);
            int encodedLen         = in1.ReadUShort();

            Ptg[] sharedFormula = Ptg.ReadTokens(encodedLen, in1);

            SharedFormula sf = new SharedFormula(SpreadsheetVersion.EXCEL97);

            Ptg[] ConvertedFormula = sf.ConvertSharedFormulas(sharedFormula, 100, 200);

            RefPtg refPtg = (RefPtg)ConvertedFormula[1];

            Assert.AreEqual("$C101", refPtg.ToFormulaString());
            if (refPtg.PtgClass == Ptg.CLASS_REF)
            {
                throw new AssertionException("Identified bug 45123");
            }

            ConfirmOperandClasses(sharedFormula, ConvertedFormula);
        }