Bug fix for cell delete
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/branches/REL_1_5_BRANCH@352469 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
61f124ebb7
commit
5e3737ff0b
@ -452,8 +452,8 @@ public class RowRecord
|
||||
LittleEndian.putShort(data, 0 + offset, sid);
|
||||
LittleEndian.putShort(data, 2 + offset, ( short ) 16);
|
||||
LittleEndian.putShort(data, 4 + offset, getRowNumber());
|
||||
LittleEndian.putShort(data, 6 + offset, getFirstCol());
|
||||
LittleEndian.putShort(data, 8 + offset, getLastCol());
|
||||
LittleEndian.putShort(data, 6 + offset, getFirstCol() == -1 ? (short)0 : getFirstCol());
|
||||
LittleEndian.putShort(data, 8 + offset, getLastCol() == -1 ? (short)0 : getLastCol());
|
||||
LittleEndian.putShort(data, 10 + offset, getHeight());
|
||||
LittleEndian.putShort(data, 12 + offset, getOptimize());
|
||||
LittleEndian.putShort(data, 14 + offset, field_6_reserved);
|
||||
|
@ -292,8 +292,8 @@ public class HSSFRow
|
||||
* get the hssfcell representing a given column (logical cell) 0-based. If you
|
||||
* ask for a cell that is not defined....you get a null.
|
||||
*
|
||||
* @param cellnum - 0 based column number
|
||||
* @returns HSSFCell representing that column or null if undefined.
|
||||
* @param cellnum 0 based column number
|
||||
* @return HSSFCell representing that column or null if undefined.
|
||||
*/
|
||||
|
||||
public HSSFCell getCell(short cellnum)
|
||||
@ -441,7 +441,7 @@ public class HSSFRow
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns cell iterator of the physically defined cells. Note element 4 may
|
||||
* @return cell iterator of the physically defined cells. Note element 4 may
|
||||
* actually be row cell depending on how many are defined!
|
||||
*/
|
||||
|
||||
|
@ -115,5 +115,11 @@ public class TestHSSFRow
|
||||
assertEquals(-1, row.getLastCellNum());
|
||||
assertEquals(-1, row.getFirstCellNum());
|
||||
|
||||
// check the row record actually writes it out as 0's
|
||||
byte[] data = new byte[100];
|
||||
row.getRowRecord().serialize(0, data);
|
||||
assertEquals(0, data[6]);
|
||||
assertEquals(0, data[8]);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ import junit.framework.TestCase;
|
||||
import org.apache.poi.hssf.model.Sheet;
|
||||
import org.apache.poi.hssf.record.VCenterRecord;
|
||||
import org.apache.poi.hssf.record.WSBoolRecord;
|
||||
import org.apache.poi.hssf.record.RowRecord;
|
||||
import org.apache.poi.hssf.dev.BiffViewer;
|
||||
|
||||
import java.io.File;
|
||||
@ -193,4 +194,5 @@ public class TestHSSFSheet
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user