Package org.apache.poi.ss.formula.ptg

Examples of org.apache.poi.ss.formula.ptg.Ptg


    sb.append("    .ix      = ").append(field_2_ixals).append("\n");
    sb.append("    .name    = ").append(field_4_name).append("\n");
    if(field_5_name_definition != null) {
            Ptg[] ptgs = field_5_name_definition.getTokens();
            for (int i = 0; i < ptgs.length; i++) {
                Ptg ptg = ptgs[i];
                sb.append(ptg.toString()).append(ptg.getRVAType()).append("\n");
            }
    }
    sb.append("[/EXTERNALNAME]\n");
    return sb.toString();
  }
View Full Code Here


        NameRecord origNameRecord = getNameRecord(filterDbNameIndex);
        // copy original formula but adjust 3D refs to the new external sheet index
        int newExtSheetIx = checkExternSheet(newSheetIndex);
        Ptg[] ptgs = origNameRecord.getNameDefinition();
        for (int i=0; i< ptgs.length; i++) {
            Ptg ptg = ptgs[i];

            if (ptg instanceof Area3DPtg) {
                Area3DPtg a3p = (Area3DPtg) ((OperandPtg) ptg).copy();
                a3p.setExternSheetIndex(newExtSheetIx);
                ptgs[i] = a3p;
View Full Code Here

    for (int k = 0; k < ptgs.length; k++ ) {
      if (k>0) {
        sb.append("\n");
      }
      sb.append("    Ptg[").append(k).append("]=");
      Ptg ptg = ptgs[k];
      sb.append(ptg.toString()).append(ptg.getRVAType());
    }
  }
View Full Code Here

        Ptg[] ptgs = { aptg, };

        if (!shifter.adjustFormula(ptgs, currentExternSheetIx)) {
            return cra;
        }
        Ptg ptg0 = ptgs[0];
        if (ptg0 instanceof AreaPtg) {
            AreaPtg bptg = (AreaPtg) ptg0;
            return new CellRangeAddress(bptg.getFirstRow(), bptg.getLastRow(), bptg.getFirstColumn(), bptg.getLastColumn());
        }
        if (ptg0 instanceof AreaErrPtg) {
            return null;
        }
        throw new IllegalStateException("Unexpected shifted ptg class (" + ptg0.getClass().getName() + ")");
    }
View Full Code Here

        NameRecord origNameRecord = getNameRecord(filterDbNameIndex);
        // copy original formula but adjust 3D refs to the new external sheet index
        int newExtSheetIx = checkExternSheet(newSheetIndex);
        Ptg[] ptgs = origNameRecord.getNameDefinition();
        for (int i=0; i< ptgs.length; i++) {
            Ptg ptg = ptgs[i];

            if (ptg instanceof Area3DPtg) {
                Area3DPtg a3p = (Area3DPtg) ((OperandPtg) ptg).copy();
                a3p.setExternSheetIndex(newExtSheetIx);
                ptgs[i] = a3p;
View Full Code Here

TOP

Related Classes of org.apache.poi.ss.formula.ptg.Ptg

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.