Examples of CellRangeAddress8Bit


Examples of org.apache.poi.hssf.util.CellRangeAddress8Bit

        field_1_pane = 3; // pane id 3 is always present.  see OOO sec 5.75 'PANE'
        field_2_row_active_cell = activeCellRow;
        field_3_col_active_cell = activeCellCol;
        field_4_active_cell_ref_index = 0;
        field_6_refs = new CellRangeAddress8Bit[] {
            new CellRangeAddress8Bit(activeCellRow, activeCellRow, activeCellCol, activeCellCol),
        };
    }
View Full Code Here

Examples of org.apache.poi.hssf.util.CellRangeAddress8Bit

        field_4_active_cell_ref_index = in.readShort();
        int field_5_num_refs    = in.readUShort();
       
        field_6_refs = new CellRangeAddress8Bit[field_5_num_refs];
        for (int i = 0; i < field_6_refs.length; i++) {
            field_6_refs[i] = new CellRangeAddress8Bit(in);
        }
    }
View Full Code Here

Examples of org.apache.poi.hssf.util.CellRangeAddress8Bit

    }
    return result;
  }

  private static void verifySharedFormula(FormulaRecord firstFormula, Record rec) {
    CellRangeAddress8Bit range = ((SharedValueRecordBase)rec).getRange();
    assertEquals(range.getFirstRow(), firstFormula.getRow());
    assertEquals(range.getFirstColumn(), firstFormula.getColumn());
  }
View Full Code Here

Examples of org.apache.poi.hssf.util.CellRangeAddress8Bit

  protected SharedValueRecordBase(CellRangeAddress8Bit range) {
    _range = range;
  }

  protected SharedValueRecordBase() {
    this(new CellRangeAddress8Bit(0, 0, 0, 0));
  }
View Full Code Here

Examples of org.apache.poi.hssf.util.CellRangeAddress8Bit

  /**
   * reads only the range (1 {@link CellRangeAddress8Bit}) from the stream
   */
  public SharedValueRecordBase(LittleEndianInput in) {
    _range = new CellRangeAddress8Bit(in);
  }
View Full Code Here

Examples of org.apache.poi.hssf.util.CellRangeAddress8Bit

  /**
   * @return <code>true</code> if (rowIx, colIx) is within the range ({@link #getRange()})
   * of this shared value object.
   */
  public final boolean isInRange(int rowIx, int colIx) {
    CellRangeAddress8Bit r = _range;
    return r.getFirstRow() <= rowIx
      && r.getLastRow() >= rowIx
      && r.getFirstColumn() <= colIx
      && r.getLastColumn() >= colIx;
  }
View Full Code Here

Examples of org.apache.poi.hssf.util.CellRangeAddress8Bit

  /**
   * @return <code>true</code> if (rowIx, colIx) describes the first cell in this shared value
   * object's range ({@link #getRange()})
   */
  public final boolean isFirstCell(int rowIx, int colIx) {
    CellRangeAddress8Bit r = getRange();
    return r.getFirstRow() == rowIx && r.getFirstColumn() == colIx;
  }
View Full Code Here

Examples of org.apache.poi.hssf.util.CellRangeAddress8Bit

    private int field_5_reserved;
    private Formula field_7_parsed_expr;

    // for testing only
    public SharedFormulaRecord() {
        this(new CellRangeAddress8Bit(0,0,0,0));
    }
View Full Code Here

Examples of org.apache.poi.hssf.util.CellRangeAddress8Bit

                "17 00 65 00 00 01 00 02 C0 02 C0 65 00 00 01 00 " +
                "03 C0 03 C0 04 62 01 07 00";
        byte[] data = HexRead.readFromString(hex);
        RecordInputStream in = TestcaseRecordInputStream.create(data);
        ArrayRecord r1 = new ArrayRecord(in);
        CellRangeAddress8Bit range = r1.getRange();
        assertEquals(1, range.getFirstColumn());
        assertEquals(1, range.getLastColumn());
        assertEquals(1, range.getFirstRow());
        assertEquals(1, range.getLastRow());

        Ptg[] ptg = r1.getFormulaTokens();
        assertEquals("MAX(C1:C2-D1:D2)", FormulaRenderer.toFormulaString(null, ptg));

        //construct a new ArrayRecord with the same contents as r1
        Ptg[] fmlaPtg = FormulaParser.parse("MAX(C1:C2-D1:D2)", null, FormulaType.ARRAY, 0);
        ArrayRecord r2 = new ArrayRecord(Formula.create(fmlaPtg), new CellRangeAddress8Bit(1, 1, 1, 1));
        byte[] ser = r2.serialize();
        //serialize and check that the data is the same as in r1
        assertEquals(HexDump.toHex(data), HexDump.toHex(ser));

View Full Code Here

Examples of org.apache.poi.hssf.util.CellRangeAddress8Bit

                "17 00 65 00 00 01 00 02 C0 02 C0 65 00 00 01 00 " +
                "03 C0 03 C0 04 62 01 07 00";
        byte[] data = HexRead.readFromString(hex);
        RecordInputStream in = TestcaseRecordInputStream.create(data);
        ArrayRecord r1 = new ArrayRecord(in);
        CellRangeAddress8Bit range = r1.getRange();
        assertEquals(1, range.getFirstColumn());
        assertEquals(1, range.getLastColumn());
        assertEquals(1, range.getFirstRow());
        assertEquals(1, range.getLastRow());

        Ptg[] ptg = r1.getFormulaTokens();
        assertEquals("MAX(C1:C2-D1:D2)", FormulaRenderer.toFormulaString(null, ptg));

        //construct a new ArrayRecord with the same contents as r1
        Ptg[] fmlaPtg = FormulaParser.parse("MAX(C1:C2-D1:D2)", null, FormulaType.ARRAY, 0);
        ArrayRecord r2 = new ArrayRecord(Formula.create(fmlaPtg), new CellRangeAddress8Bit(1, 1, 1, 1));
        byte[] ser = r2.serialize();
        //serialize and check that the data is the same as in r1
        assertEquals(HexDump.toHex(data), HexDump.toHex(ser));

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.