Examples of DBCellRecord


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

          final int rowBlockSize = serializeRowBlock(block, pos, data);
          pos += rowBlockSize;
          //Serialize a block of cells for those rows
          final int startRowNumber = getStartRowNumberForBlock(block);
          final int endRowNumber = getEndRowNumberForBlock(block);
          DBCellRecord cellRecord = new DBCellRecord();
          //Note: Cell references start from the second row...
          int cellRefOffset = (rowBlockSize-20);
          for (int row=startRowNumber;row<=endRowNumber;row++) {
            if (null != cells && cells.rowHasCells(row)) {
              final int rowCellSize = cells.serializeCellRow(row, pos, data);
              pos += rowCellSize;
              //Add the offset to the first cell for the row into the DBCellRecord.
              cellRecord.addCellOffset((short)cellRefOffset);
              cellRefOffset = rowCellSize;
            }
          }
          //Calculate Offset from the start of a DBCellRecord to the first Row
          cellRecord.setRowOffset(pos - rowStartPos);
          pos += cellRecord.serialize(pos, data);

        }
        return pos - offset;
    }
View Full Code Here

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

          final int rowBlockSize = serializeRowBlock(block, pos, data);
          pos += rowBlockSize;
          //Serialize a block of cells for those rows
          final int startRowNumber = getStartRowNumberForBlock(block);
          final int endRowNumber = getEndRowNumberForBlock(block);
          DBCellRecord cellRecord = new DBCellRecord();
          //Note: Cell references start from the second row...
          int cellRefOffset = (rowBlockSize-20);
          for (int row=startRowNumber;row<=endRowNumber;row++) {
            if (cells.rowHasCells(row)) {
              final int rowCellSize = cells.serializeCellRow(row, pos, data);
              pos += rowCellSize;
              //Add the offset to the first cell for the row into the DBCellRecord.
              cellRecord.addCellOffset((short)cellRefOffset);
              cellRefOffset = rowCellSize;
            }
          }
          //Calculate Offset from the start of a DBCellRecord to the first Row
          cellRecord.setRowOffset(pos - rowStartPos);
          pos += cellRecord.serialize(pos, data);

        }
        return pos - offset;
    }
View Full Code Here

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

          final int rowBlockSize = serializeRowBlock(block, pos, data);
          pos += rowBlockSize;
          //Serialize a block of cells for those rows
          final int startRowNumber = getStartRowNumberForBlock(block);
          final int endRowNumber = getEndRowNumberForBlock(block);
          DBCellRecord cellRecord = new DBCellRecord();
          //Note: Cell references start from the second row...
          int cellRefOffset = (rowBlockSize-20);
          for (int row=startRowNumber;row<=endRowNumber;row++) {
            if (cells.rowHasCells(row)) {
              final int rowCellSize = cells.serializeCellRow(row, pos, data);
              pos += rowCellSize;
              //Add the offset to the first cell for the row into the DBCellRecord.
              cellRecord.addCellOffset((short)cellRefOffset);
              cellRefOffset = rowCellSize;
            }
          }
          //Calculate Offset from the start of a DBCellRecord to the first Row
          cellRecord.setRowOffset(pos - rowStartPos);
          pos += cellRecord.serialize(pos, data);

        }
        return pos - offset;
    }
View Full Code Here

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

          final int rowBlockSize = serializeRowBlock(block, pos, data);
          pos += rowBlockSize;
          //Serialize a block of cells for those rows
          final int startRowNumber = getStartRowNumberForBlock(block);
          final int endRowNumber = getEndRowNumberForBlock(block);
          DBCellRecord cellRecord = new DBCellRecord();
          //Note: Cell references start from the second row...
          int cellRefOffset = (rowBlockSize-20);
          for (int row=startRowNumber;row<=endRowNumber;row++) {
            if (null != cells && cells.rowHasCells(row)) {
              final int rowCellSize = cells.serializeCellRow(row, pos, data);
              pos += rowCellSize;
              //Add the offset to the first cell for the row into the DBCellRecord.
              cellRecord.addCellOffset((short)cellRefOffset);
              cellRefOffset = rowCellSize;
            }
          }
          //Calculate Offset from the start of a DBCellRecord to the first Row
          cellRecord.setRowOffset(pos - rowStartPos);
          pos += cellRecord.serialize(pos, data);

        }
        return pos - offset;
    }
View Full Code Here

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

          final int rowBlockSize = serializeRowBlock(block, pos, data);
          pos += rowBlockSize;
          //Serialize a block of cells for those rows
          final int startRowNumber = getStartRowNumberForBlock(block);
          final int endRowNumber = getEndRowNumberForBlock(block);
          DBCellRecord cellRecord = new DBCellRecord();
          //Note: Cell references start from the second row...
          int cellRefOffset = (rowBlockSize-20);
          for (int row=startRowNumber;row<=endRowNumber;row++) {
            if (null != cells && cells.rowHasCells(row)) {
              final int rowCellSize = cells.serializeCellRow(row, pos, data);
              pos += rowCellSize;
              //Add the offset to the first cell for the row into the DBCellRecord.
              cellRecord.addCellOffset((short)cellRefOffset);
              cellRefOffset = rowCellSize;
            }
          }
          //Calculate Offset from the start of a DBCellRecord to the first Row
          cellRecord.setRowOffset(pos - rowStartPos);
          pos += cellRecord.serialize(pos, data);

        }
        return pos - offset;
    }
View Full Code Here

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

            final int rowBlockSize = visitRowRecordsForBlock(blockIndex, rv);
            pos += rowBlockSize;
            // Serialize a block of cells for those rows
            final int startRowNumber = getStartRowNumberForBlock(blockIndex);
            final int endRowNumber = getEndRowNumberForBlock(blockIndex);
            DBCellRecord cellRecord = new DBCellRecord();
            // Note: Cell references start from the second row...
            int cellRefOffset = (rowBlockSize - RowRecord.ENCODED_SIZE);
            for (int row = startRowNumber; row <= endRowNumber; row++) {
                if (_valuesAgg.rowHasCells(row)) {
                    stv.setPosition(0);
                    _valuesAgg.visitCellsForRow(row, stv);
                    int rowCellSize = stv.getPosition();
                    pos += rowCellSize;
                    // Add the offset to the first cell for the row into the
                    // DBCellRecord.
                    cellRecord.addCellOffset((short) cellRefOffset);
                    cellRefOffset = rowCellSize;
                }
            }
            // Calculate Offset from the start of a DBCellRecord to the first Row
            cellRecord.setRowOffset(pos);
            rv.visitRecord(cellRecord);
        }
        for (int i=0; i< _unknownRecords.size(); i++) {
            // Potentially breaking the file here since we don't know exactly where to write these records
            rv.visitRecord((Record) _unknownRecords.get(i));
View Full Code Here

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

            final int rowBlockSize = visitRowRecordsForBlock(blockIndex, rv);
            pos += rowBlockSize;
            // Serialize a block of cells for those rows
            final int startRowNumber = getStartRowNumberForBlock(blockIndex);
            final int endRowNumber = getEndRowNumberForBlock(blockIndex);
            DBCellRecord cellRecord = new DBCellRecord();
            // Note: Cell references start from the second row...
            int cellRefOffset = (rowBlockSize - RowRecord.ENCODED_SIZE);
            for (int row = startRowNumber; row <= endRowNumber; row++) {
                if (_valuesAgg.rowHasCells(row)) {
                    stv.setPosition(0);
                    _valuesAgg.visitCellsForRow(row, stv);
                    int rowCellSize = stv.getPosition();
                    pos += rowCellSize;
                    // Add the offset to the first cell for the row into the
                    // DBCellRecord.
                    cellRecord.addCellOffset((short) cellRefOffset);
                    cellRefOffset = rowCellSize;
                }
            }
            // Calculate Offset from the start of a DBCellRecord to the first Row
            cellRecord.setRowOffset(pos);
            rv.visitRecord(cellRecord);
        }
        for (int i=0; i< _unknownRecords.size(); i++) {
            // Potentially breaking the file here since we don't know exactly where to write these records
            rv.visitRecord((Record) _unknownRecords.get(i));
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.