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

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


            if (ptg instanceof Area3DPtg) {
                Area3DPtg a3p = (Area3DPtg) ((OperandPtg) ptg).copy();
                a3p.setExternSheetIndex(newExtSheetIx);
                ptgs[i] = a3p;
            } else if (ptg instanceof Ref3DPtg) {
                Ref3DPtg r3p = (Ref3DPtg) ((OperandPtg) ptg).copy();
                r3p.setExternSheetIndex(newExtSheetIx);
                ptgs[i] = r3p;
            }
        }
        NameRecord newNameRecord = createBuiltInName(NameRecord.BUILTIN_FILTER_DB, newSheetIndex+1);
        newNameRecord.setNameDefinition(ptgs);
View Full Code Here


    byte ptgSid = in.readByte();
    switch(ptgSid) {
      case AreaPtg.sid:   return new AreaPtg(in);
      case Area3DPtg.sid: return new Area3DPtg(in);
      case RefPtg.sid:  return new RefPtg(in);
      case Ref3DPtg.sid:  return new Ref3DPtg(in);
    }
    return null;
  }
View Full Code Here

        return _iBook.getExternalSheetIndex(workbookName, sheetName);
    }
   
    public Ptg get3DReferencePtg(CellReference cr, SheetIdentifier sheet) {
        int extIx = getSheetExtIx(sheet);
        return new Ref3DPtg(cr, extIx);
    }
View Full Code Here

                OperationEvaluationContext refWorkbookContext = new OperationEvaluationContext(
                        refWorkbookEvaluator, refWorkbookEvaluator.getWorkbook(), -1, -1, -1, _tracker);
               
                Ptg ptg = evaluationName.getNameDefinition()[0];
                if (ptg instanceof Ref3DPtg){
                    Ref3DPtg ref3D = (Ref3DPtg)ptg;
                    return refWorkbookContext.getRef3DEval(ref3D);
                } else if (ptg instanceof Ref3DPxg){
                    Ref3DPxg ref3D = (Ref3DPxg)ptg;
                    return refWorkbookContext.getRef3DEval(ref3D);
                } else if(ptg instanceof Area3DPtg){
View Full Code Here

    if (ptg instanceof AreaErrPtg ||ptg instanceof RefErrorPtg
        || ptg instanceof DeletedArea3DPtg || ptg instanceof DeletedRef3DPtg) {
        return ErrorEval.REF_INVALID;
    }
    if (ptg instanceof Ref3DPtg) {
      Ref3DPtg rptg = (Ref3DPtg) ptg;
      return ec.getRef3DEval(rptg.getRow(), rptg.getColumn(), rptg.getExternSheetIndex());
    }
    if (ptg instanceof Area3DPtg) {
      Area3DPtg aptg = (Area3DPtg) ptg;
      return ec.getArea3DEval(aptg.getFirstRow(), aptg.getFirstColumn(), aptg.getLastRow(), aptg.getLastColumn(), aptg.getExternSheetIndex());
    }
    if (ptg instanceof RefPtg) {
      RefPtg rptg = (RefPtg) ptg;
      return ec.getRefEval(rptg.getRow(), rptg.getColumn());
    }
    if (ptg instanceof AreaPtg) {
      AreaPtg aptg = (AreaPtg) ptg;
      return ec.getAreaEval(aptg.getFirstRow(), aptg.getFirstColumn(), aptg.getLastRow(), aptg.getLastColumn());
    }
View Full Code Here

    if (ptg instanceof AreaErrPtg ||ptg instanceof RefErrorPtg
        || ptg instanceof DeletedArea3DPtg || ptg instanceof DeletedRef3DPtg) {
        return ErrorEval.REF_INVALID;
    }
    if (ptg instanceof Ref3DPtg) {
      Ref3DPtg rptg = (Ref3DPtg) ptg;
      return ec.getRef3DEval(rptg.getRow(), rptg.getColumn(), rptg.getExternSheetIndex());
    }
    if (ptg instanceof Area3DPtg) {
      Area3DPtg aptg = (Area3DPtg) ptg;
      return ec.getArea3DEval(aptg.getFirstRow(), aptg.getFirstColumn(), aptg.getLastRow(), aptg.getLastColumn(), aptg.getExternSheetIndex());
    }
    if (ptg instanceof RefPtg) {
      RefPtg rptg = (RefPtg) ptg;
      return ec.getRefEval(rptg.getRow(), rptg.getColumn());
    }
    if (ptg instanceof AreaPtg) {
      AreaPtg aptg = (AreaPtg) ptg;
      return ec.getAreaEval(aptg.getFirstRow(), aptg.getFirstColumn(), aptg.getLastRow(), aptg.getLastColumn());
    }
View Full Code Here

            if (evaluationName.getNameDefinition().length > 1) {
               throw new RuntimeException("Complex name formulas not supported yet");
            }
            Ptg ptg = evaluationName.getNameDefinition()[0];
            if(ptg instanceof Ref3DPtg){
               Ref3DPtg ref3D = (Ref3DPtg)ptg;
               int sheetIndex = refWorkbookEvaluator.getSheetIndexByExternIndex(ref3D.getExternSheetIndex());
               String sheetName = refWorkbookEvaluator.getSheetName(sheetIndex);
               SheetRefEvaluator sre = createExternSheetRefEvaluator(workbookName, sheetName);
               return new LazyRefEval(ref3D.getRow(), ref3D.getColumn(), sre);
            }else if(ptg instanceof Area3DPtg){
               Area3DPtg area3D = (Area3DPtg)ptg;
               int sheetIndex = refWorkbookEvaluator.getSheetIndexByExternIndex(area3D.getExternSheetIndex());
               String sheetName = refWorkbookEvaluator.getSheetName(sheetIndex);
               SheetRefEvaluator sre = createExternSheetRefEvaluator(workbookName, sheetName);
View Full Code Here

            if (evaluationName.getNameDefinition().length > 1) {
               throw new RuntimeException("Complex name formulas not supported yet");
            }
            Ptg ptg = evaluationName.getNameDefinition()[0];
            if(ptg instanceof Ref3DPtg){
               Ref3DPtg ref3D = (Ref3DPtg)ptg;
               int sheetIndex = refWorkbookEvaluator.getSheetIndexByExternIndex(ref3D.getExternSheetIndex());
               String sheetName = refWorkbookEvaluator.getSheetName(sheetIndex);
               SheetRefEvaluator sre = createExternSheetRefEvaluator(workbookName, sheetName);
               return new LazyRefEval(ref3D.getRow(), ref3D.getColumn(), sre);
            }else if(ptg instanceof Area3DPtg){
               Area3DPtg area3D = (Area3DPtg)ptg;
               int sheetIndex = refWorkbookEvaluator.getSheetIndexByExternIndex(area3D.getExternSheetIndex());
               String sheetName = refWorkbookEvaluator.getSheetName(sheetIndex);
               SheetRefEvaluator sre = createExternSheetRefEvaluator(workbookName, sheetName);
View Full Code Here

    byte ptgSid = in.readByte();
    switch(ptgSid) {
      case AreaPtg.sid:   return new AreaPtg(in);
      case Area3DPtg.sid: return new Area3DPtg(in);
      case RefPtg.sid:  return new RefPtg(in);
      case Ref3DPtg.sid:  return new Ref3DPtg(in);
    }
    return null;
  }
View Full Code Here

    if (ptg instanceof AreaErrPtg ||ptg instanceof RefErrorPtg
        || ptg instanceof DeletedArea3DPtg || ptg instanceof DeletedRef3DPtg) {
        return ErrorEval.REF_INVALID;
    }
    if (ptg instanceof Ref3DPtg) {
      Ref3DPtg rptg = (Ref3DPtg) ptg;
      return ec.getRef3DEval(rptg.getRow(), rptg.getColumn(), rptg.getExternSheetIndex());
    }
    if (ptg instanceof Area3DPtg) {
      Area3DPtg aptg = (Area3DPtg) ptg;
      return ec.getArea3DEval(aptg.getFirstRow(), aptg.getFirstColumn(), aptg.getLastRow(), aptg.getLastColumn(), aptg.getExternSheetIndex());
    }
    if (ptg instanceof RefPtg) {
      RefPtg rptg = (RefPtg) ptg;
      return ec.getRefEval(rptg.getRow(), rptg.getColumn());
    }
    if (ptg instanceof AreaPtg) {
      AreaPtg aptg = (AreaPtg) ptg;
      return ec.getAreaEval(aptg.getFirstRow(), aptg.getFirstColumn(), aptg.getLastRow(), aptg.getLastColumn());
    }
View Full Code Here

TOP

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

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.