Examples of HeaderRecord


Examples of org.apache.poi.hssf.record.HeaderRecord

   * Creates a PageSettingsBlock with default settings
   */
  public PageSettingsBlock() {
    _rowBreaksRecord = new HorizontalPageBreakRecord();
    _columnBreaksRecord = new VerticalPageBreakRecord();
    _header = new HeaderRecord("");
    _footer = new FooterRecord("");
    _hCenter = createHCenter();
    _vCenter = createVCenter();
    _printSetup = createPrintSetup();
  }
View Full Code Here

Examples of org.apache.poi.hssf.record.HeaderRecord

    visitIfPresent(_rowBreaksRecord, rv);
    visitIfPresent(_columnBreaksRecord, rv);
    // Write out empty header / footer records if these are missing
    if (_header == null) {
      rv.visitRecord(new HeaderRecord(""));
    } else {
      rv.visitRecord(_header);
    }
    if (_footer == null) {
      rv.visitRecord(new FooterRecord(""));
View Full Code Here

Examples of org.apache.poi.hssf.record.HeaderRecord

    nr.setColumn((short) colIx);
    nr.setValue(3.0);

    Record[] recs = {
        BOFRecord.createSheetBOF(),
        new HeaderRecord("&LSales Figures"),
        new FooterRecord("&LJanuary"),
        ur(UnknownRecord.HEADER_FOOTER_089C, "9C 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C4 60 00 00 00 00 00 00 00 00"),
        new DimensionsRecord(),
        new WindowTwoRecord(),
        ur(UnknownRecord.USERSVIEWBEGIN_01AA, "ED 77 3B 86 BC 3F 37 4C A9 58 60 23 43 68 54 4B 01 00 00 00 64 00 00 00 40 00 00 00 02 00 00 00 3D 80 04 00 00 00 00 00 00 00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 3F FF FF 01 00"),
        new HeaderRecord("&LSales Figures"),
        new FooterRecord("&LJanuary"),
        ur(UnknownRecord.HEADER_FOOTER_089C, "9C 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C4 60 00 00 00 00 00 00 00 00"),
        ur(UnknownRecord.USERSVIEWEND_01AB, "01, 00"),

        EOFRecord.instance,
View Full Code Here

Examples of org.apache.poi.hssf.record.HeaderRecord

    nr.setColumn((short) colIx);
    nr.setValue(3.0);

    Record[] recs = {
        BOFRecord.createSheetBOF(),
        new HeaderRecord("&LSales Figures"),
        new FooterRecord("&LJanuary"),
        new DimensionsRecord(),
        new WindowTwoRecord(),
        ur(UnknownRecord.HEADER_FOOTER_089C, "9C 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C4 60 00 00 00 00 00 00 00 00"),
        EOFRecord.instance,
View Full Code Here

Examples of org.apache.poi.hssf.record.HeaderRecord

   */
  public void testLateMargins_bug47199() {

    Record[] recs = {
        BOFRecord.createSheetBOF(),
        new HeaderRecord("&LSales Figures"),
        new FooterRecord("&LJanuary"),
        new DimensionsRecord(),
        createBottomMargin(0.787F),
        new WindowTwoRecord(),
        EOFRecord.instance,
View Full Code Here

Examples of org.apache.poi.hssf.record.HeaderRecord

   */
  public void testDuplicatePSBRecord_bug47199() {

    // Hypothetical setup of PSB records which should cause POI to crash
    Record[] recs = {
        new HeaderRecord("&LSales Figures"),
        new HeaderRecord("&LInventory"),
    };
    RecordStream rs = new RecordStream(Arrays.asList(recs), 0);

    try {
      new PageSettingsBlock(rs);
View Full Code Here

Examples of org.apache.poi.hssf.record.HeaderRecord

    assertEquals(FooterRecord.class, outRecs[1].getClass());
    assertEquals(HCenterRecord.class, outRecs[2].getClass());
    assertEquals(VCenterRecord.class, outRecs[3].getClass());
   
    // make sure the added header / footer records are empty
    HeaderRecord hr = (HeaderRecord) outRecs[0];
    assertEquals("", hr.getText());
    FooterRecord fr = (FooterRecord) outRecs[1];
    assertEquals("", fr.getText());
  }
View Full Code Here

Examples of org.apache.poi.hssf.record.HeaderRecord

  protected HSSFHeader(PageSettingsBlock psb) {
    _psb = psb;
  }

  protected String getRawText() {
    HeaderRecord hf = _psb.getHeader();
    if (hf == null) {
      return "";
    }
    return hf.getText();
  }
View Full Code Here

Examples of org.apache.poi.hssf.record.HeaderRecord

    return hf.getText();
  }

  @Override
  protected void setHeaderFooterText(String text) {
    HeaderRecord hfr = _psb.getHeader();
    if (hfr == null) {
      hfr = new HeaderRecord(text);
      _psb.setHeader(hfr);
    } else {
      hfr.setText(text);
    }
  }
View Full Code Here

Examples of org.apache.poi.hssf.record.HeaderRecord

        return r;
    }

    private HeaderRecord createHeaderRecord()
    {
        HeaderRecord r = new HeaderRecord();
        r.setHeader(null);
        return r;
    }
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.