[35799] getXFIndexForColAt(short ) added
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353752 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bb8ab29fa0
commit
482c71e61a
@ -822,7 +822,7 @@ public class Sheet implements Model
|
|||||||
//Add the references to the DBCells in the IndexRecord (one for each block)
|
//Add the references to the DBCells in the IndexRecord (one for each block)
|
||||||
int blockCount = rows.getRowBlockCount();
|
int blockCount = rows.getRowBlockCount();
|
||||||
//Calculate the size of this IndexRecord
|
//Calculate the size of this IndexRecord
|
||||||
int indexRecSize = index.getRecordSizeForBlockCount(blockCount);
|
int indexRecSize = IndexRecord.getRecordSizeForBlockCount(blockCount);
|
||||||
|
|
||||||
int rowBlockOffset = 0;
|
int rowBlockOffset = 0;
|
||||||
int cellBlockOffset = 0;
|
int cellBlockOffset = 0;
|
||||||
@ -1834,6 +1834,37 @@ public class Sheet implements Model
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get the index to the ExtendedFormatRecord "associated" with
|
||||||
|
* the column at specified 0-based index. (In this case, an
|
||||||
|
* ExtendedFormatRecord index is actually associated with a
|
||||||
|
* ColumnInfoRecord which spans 1 or more columns)
|
||||||
|
* <br/>
|
||||||
|
* Returns the index to the default ExtendedFormatRecord (0xF)
|
||||||
|
* if no ColumnInfoRecord exists that includes the column
|
||||||
|
* index specified.
|
||||||
|
* @param column
|
||||||
|
* @return index of ExtendedFormatRecord associated with
|
||||||
|
* ColumnInfoRecord that includes the column index or the
|
||||||
|
* index of the default ExtendedFormatRecord (0xF)
|
||||||
|
*/
|
||||||
|
public short getXFIndexForColAt(short column) {
|
||||||
|
short retval = 0;
|
||||||
|
ColumnInfoRecord ci = null;
|
||||||
|
if (columns != null) {
|
||||||
|
for (Iterator iterator = columns.getIterator(); iterator.hasNext();) {
|
||||||
|
ci = (ColumnInfoRecord) iterator.next();
|
||||||
|
if ((ci.getFirstColumn() <= column)
|
||||||
|
&& (column <= ci.getLastColumn())) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ci = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
retval = (ci != null) ? ci.getXFIndex() : 0xF;
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the width for a given column in 1/20th of a character width units
|
* set the width for a given column in 1/20th of a character width units
|
||||||
* @param column - the column number
|
* @param column - the column number
|
||||||
|
Loading…
Reference in New Issue
Block a user