예제 #1
0
        public void TestColumnGreater255()
        {
            RefPtgBase ptg;
            ptg = new RefPtg("IW1");
            Assert.AreEqual(256, ptg.Column);
            Assert.AreEqual("IW1", ptg.FormatReferenceAsString());

            ptg = new RefPtg("JA1");
            Assert.AreEqual(260, ptg.Column);
            Assert.AreEqual("JA1", ptg.FormatReferenceAsString());
        }
예제 #2
0
 public MockRefEval(RefPtg ptg, ValueEval value)
     : base(-1, -1, ptg.Row, ptg.Column)
 {
     _value = value;
 }
예제 #3
0
        /**
 *
 * @param sheetIden may be <code>null</code>
 * @param part1
 * @param part2 may be <code>null</code>
 */
        private ParseNode CreateAreaRefParseNode(SheetIdentifier sheetIden, SimpleRangePart part1,
                SimpleRangePart part2)
        {

            int extIx;
            if (sheetIden == null)
            {
                extIx = Int32.MinValue;
            }
            else
            {
                String sName = sheetIden.SheetID.Name;
                if (sheetIden.BookName == null)
                {
                    extIx = _book.GetExternalSheetIndex(sName);
                }
                else
                {
                    extIx = _book.GetExternalSheetIndex(sheetIden.BookName, sName);
                }
            }
            Ptg ptg;
            if (part2 == null)
            {
                CellReference cr = part1.getCellReference();
                if (sheetIden == null)
                {
                    ptg = new RefPtg(cr);
                }
                else
                {
                    ptg = new Ref3DPtg(cr, extIx);
                }
            }
            else
            {
                AreaReference areaRef = CreateAreaRef(part1, part2);

                if (sheetIden == null)
                {
                    ptg = new AreaPtg(areaRef);
                }
                else
                {
                    ptg = new Area3DPtg(areaRef, extIx);
                }
            }
            return new ParseNode(ptg);
        }
예제 #4
0
        /**
         *
         * @param sheetIden may be <code>null</code>
         * @param part1
         * @param part2 may be <code>null</code>
         */
        private ParseNode CreateAreaRefParseNode(SheetIdentifier sheetIden, SimpleRangePart part1,
                SimpleRangePart part2)
        {
            Ptg ptg;
            if (part2 == null)
            {
                CellReference cr = part1.CellReference;
                if (sheetIden == null)
                {
                    ptg = new RefPtg(cr);
                }
                else
                {
                    ptg = _book.Get3DReferencePtg(cr, sheetIden);
                }
            }
            else
            {
                AreaReference areaRef = CreateAreaRef(part1, part2);

                if (sheetIden == null)
                {
                    ptg = new AreaPtg(areaRef);
                }
                else
                {
                    ptg = _book.Get3DReferencePtg(areaRef, sheetIden);
                }
            }
            return new ParseNode(ptg);
        }