Package org.apache.poi.hssf.record.formula

Examples of org.apache.poi.hssf.record.formula.MemFuncPtg


        Stack ptgs = new Stack();

        if (settingRowAndColumn)
        {
            MemFuncPtg memFuncPtg = new MemFuncPtg();
            memFuncPtg.setLenRefSubexpression(23);
            ptgs.add(memFuncPtg);
        }
        if (startColumn >= 0)
        {
            Area3DPtg area3DPtg1 = new Area3DPtg();
View Full Code Here


        Stack ptgs = new Stack();

        if (settingRowAndColumn)
        {
            MemFuncPtg memFuncPtg = new MemFuncPtg();
            memFuncPtg.setLenRefSubexpression(23);
            ptgs.add(memFuncPtg);
        }
        if (startColumn >= 0)
        {
            Area3DPtg area3DPtg1 = new Area3DPtg();
View Full Code Here

        assertEquals("test", nr.getNameText());

        List def =nr.getNameDefinition();
        assertEquals(4, def.size());

        MemFuncPtg ptgA = (MemFuncPtg)def.get(0);
        Area3DPtg ptgB = (Area3DPtg)def.get(1);
        Area3DPtg ptgC = (Area3DPtg)def.get(2);
        UnionPtg ptgD = (UnionPtg)def.get(3);
        assertEquals("", ptgA.toFormulaString(wb));
        assertEquals(refA, ptgB.toFormulaString(wb));
        assertEquals(refB, ptgC.toFormulaString(wb));
        assertEquals(",", ptgD.toFormulaString(wb));

        assertEquals(ref, nr.getAreaReference(wb));
View Full Code Here

        List temp = new ArrayList();

        if (settingRowAndColumn) {
            final int exprsSize = 2 * 11 + 1; // 2 * Area3DPtg.SIZE + UnionPtg.SIZE
            temp.add(new MemFuncPtg(exprsSize));
        }
        if (startColumn >= 0) {
            Area3DPtg colArea = new Area3DPtg(0, MAX_ROW, startColumn, endColumn,
                    false, false, false, false, externSheetIndex);
            temp.add(colArea);
View Full Code Here

        nameRecord.setStatusBarLength((byte)0);
        Stack ptgs = new Stack();

        if (settingRowAndColumn)
        {
            MemFuncPtg memFuncPtg = new MemFuncPtg();
            memFuncPtg.setLenRefSubexpression(23);
            ptgs.add(memFuncPtg);
        }
        if (startColumn >= 0)
        {
            Area3DPtg area3DPtg1 = new Area3DPtg();
View Full Code Here

        assertEquals("test", nr.getNameText());

        Ptg[] def =nr.getNameDefinition();
        assertEquals(4, def.length);

        MemFuncPtg ptgA = (MemFuncPtg)def[0];
        Area3DPtg ptgB = (Area3DPtg)def[1];
        Area3DPtg ptgC = (Area3DPtg)def[2];
        UnionPtg ptgD = (UnionPtg)def[3];
        assertEquals("", ptgA.toFormulaString());
        assertEquals(refA, ptgB.toFormulaString(eb));
        assertEquals(refB, ptgC.toFormulaString(eb));
        assertEquals(",", ptgD.toFormulaString());

        assertEquals(ref, HSSFFormulaParser.toFormulaString(wb, nr.getNameDefinition()));
View Full Code Here

                ParseNode[] children = {
                    new ParseNode(ptgA),   
                    new ParseNode(ptgB),
                };
                ParseNode result = new ParseNode(RangePtg.instance, children);
                MemFuncPtg memFuncPtg = new MemFuncPtg(result.getEncodedSize());
                return new ParseNode(memFuncPtg, result);
            }
            return new ParseNode(simplified);
        }
        return new ParseNode(ptgA);
View Full Code Here

                    ParseNode other = comparisonExpression();
                    result = new ParseNode(UnionPtg.instance, result, other);
                    continue;
            }
            if (hasUnions) {
                MemFuncPtg memFuncPtg = new MemFuncPtg(result.getEncodedSize());
                result = new ParseNode(memFuncPtg, result);
            }
            return result;
        }
    }
View Full Code Here

        UnionPtg.class,
        Ref3DPtg.class,
        UnionPtg.class,
    };
    confirmTokenClasses(ptgs, expectedClasses);
    MemFuncPtg mf = (MemFuncPtg)ptgs[0];
    assertEquals(45, mf.getLenRefSubexpression());
  }
View Full Code Here

        Ref3DPtg.class,
        Ref3DPtg.class,
        RangePtg.class,
    };
    confirmTokenClasses(ptgs, expectedClasses);
    MemFuncPtg mf = (MemFuncPtg)ptgs[0];
    assertEquals(15, mf.getLenRefSubexpression());
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.formula.MemFuncPtg

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.