Package org.apache.poi.hssf.record

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


    /**
     * make the tabid record look like the current situation.
     *
     */
    private void fixTabIdRecord() {
        TabIdRecord tir = ( TabIdRecord ) records.get(records.getTabpos());
        short[]     tia = new short[ boundsheets.size() ];

        for (short k = 0; k < tia.length; k++) {
            tia[ k ] = k;
        }
        tir.setTabIdArray(tia);
    }
View Full Code Here


    /**
     * creates the TabId record containing an array
     */
    private static TabIdRecord createTabId() {
        return new TabIdRecord();
    }
View Full Code Here

    /**
     * make the tabid record look like the current situation.
     *
     */
    private void fixTabIdRecord() {
        TabIdRecord tir = ( TabIdRecord ) records.get(records.getTabpos());
        short[]     tia = new short[ boundsheets.size() ];

        for (short k = 0; k < tia.length; k++) {
            tia[ k ] = k;
        }
        tir.setTabIdArray(tia);
    }
View Full Code Here

    /**
     * creates the TabId record containing an array
     */
    private static TabIdRecord createTabId() {
        return new TabIdRecord();
    }
View Full Code Here

       );
      
       wb = writeOutAndReadBack(wb);
      
       // Ensure the tab index
       TabIdRecord tr = null;
       for(Record r : wb.getWorkbook().getRecords()) {
          if(r instanceof TabIdRecord) {
             tr = (TabIdRecord)r;
          }
       }
View Full Code Here

    /**
     * creates the TabId record containing an array
     */
    private static TabIdRecord createTabId() {
        return new TabIdRecord();
    }
View Full Code Here

            fixTabIdRecord();
        } else {
           // Ensure we have enough tab IDs
           // Can be a few short if new sheets were added
           if(records.getTabpos() > 0) {
              TabIdRecord tir = ( TabIdRecord ) records.get(records.getTabpos());
              if(tir._tabids.length < boundsheets.size()) {
                 fixTabIdRecord();
              }
           }
        }
View Full Code Here

    /**
     * make the tabid record look like the current situation.
     *
     */
    private void fixTabIdRecord() {
        TabIdRecord tir = ( TabIdRecord ) records.get(records.getTabpos());
        short[]     tia = new short[ boundsheets.size() ];

        for (short k = 0; k < tia.length; k++) {
            tia[ k ] = k;
        }
        tir.setTabIdArray(tia);
    }
View Full Code Here

     * make the tabid record look like the current situation.
     *
     * @return number of bytes written in the TabIdRecord
     */
    private int fixTabIdRecord() {
        TabIdRecord tir = ( TabIdRecord ) records.get(records.getTabpos());
        int sz = tir.getRecordSize();
        short[]     tia = new short[ boundsheets.size() ];

        for (short k = 0; k < tia.length; k++) {
            tia[ k ] = k;
        }
        tir.setTabIdArray(tia);
        return tir.getRecordSize() - sz;

    }
View Full Code Here

     */
    public void preSerialize(){
        // Ensure we have enough tab IDs
        // Can be a few short if new sheets were added
        if(records.getTabpos() > 0) {
            TabIdRecord tir = ( TabIdRecord ) records.get(records.getTabpos());
            if(tir._tabids.length < boundsheets.size()) {
                fixTabIdRecord();
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.TabIdRecord

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.