public final class FormulaRecordAggregate extends RecordAggregate implements CellValueRecordInterface
RecordAggregate.PositionTrackingVisitor, RecordAggregate.RecordVisitor
Constructor and Description |
---|
FormulaRecordAggregate(FormulaRecord formulaRec, StringRecord stringRec, SharedValueManager svm) |
Modifier and Type | Method and Description |
---|---|
CellRangeAddress |
getArrayFormulaRange() |
short |
getColumn() |
FormulaRecord |
getFormulaRecord() |
Ptg[] |
getFormulaTokens() |
int |
getRow() |
StringRecord |
getStringRecord()
debug only TODO - encapsulate
(仅调试 TODO - 封装)
|
java.lang.String |
getStringValue() |
short |
getXFIndex() |
boolean |
isPartOfArrayFormula() |
void |
notifyFormulaChanging()
Should be called by any code which is either deleting this formula cell, or changing its type.
(应由删除此公式单元格或更改其类型的任何代码调用。)
|
CellRangeAddress |
removeArrayFormula(int rowIndex, int columnIndex)
Removes an array formula
(删除数组公式)
|
void |
setArrayFormula(CellRangeAddress r, Ptg[] ptgs) |
void |
setCachedBooleanResult(boolean value) |
void |
setCachedDoubleResult(double value) |
void |
setCachedErrorResult(FormulaError error) |
void |
setCachedErrorResult(int errorCode) |
void |
setCachedStringResult(java.lang.String value) |
void |
setColumn(short col) |
void |
setParsedExpression(Ptg[] ptgs)
Also checks for a related shared formula and unlinks it if found
(还会检查相关的共享公式,如果找到则取消链接)
|
void |
setRow(int row) |
void |
setXFIndex(short xf) |
java.lang.String |
toString() |
void |
unlinkSharedFormula() |
void |
visitContainedRecords(RecordAggregate.RecordVisitor rv)
Visit each of the atomic BIFF records contained in this
RecordAggregate in the order that they should be written to file.
(按照写入文件的顺序访问此 RecordAggregate 中包含的每个原子 BIFF 记录。)
|
getRecordSize, serialize
public FormulaRecordAggregate(FormulaRecord formulaRec, StringRecord stringRec, SharedValueManager svm)
stringRec
- may be
null
if this formula does not have a cached text value.
(stringRec - 如果此公式没有缓存的文本值,则可能为 null。)
svm
- the
SharedValueManager
for the current sheet
(svm - 当前工作表的 SharedValueManager)
public FormulaRecord getFormulaRecord()
public StringRecord getStringRecord()
public short getXFIndex()
getXFIndex
in interface
CellValueRecordInterface
(接口 CellValueRecordInterface 中的 getXFIndex)
public void setXFIndex(short xf)
setXFIndex
in interface
CellValueRecordInterface
(接口 CellValueRecordInterface 中的 setXFIndex)
public void setColumn(short col)
setColumn
in interface
CellValueRecordInterface
(接口 CellValueRecordInterface 中的 setColumn)
col
- the column this cell defines
(col - 此单元格定义的列)
public void setRow(int row)
setRow
in interface
CellValueRecordInterface
(接口 CellValueRecordInterface 中的 setRow)
row
- the row this cell occurs within
(row - 此单元格所在的行)
public short getColumn()
getColumn
in interface
CellValueRecordInterface
(接口 CellValueRecordInterface 中的 getColumn)
public int getRow()
getRow
in interface
CellValueRecordInterface
(接口 CellValueRecordInterface 中的 getRow)
public java.lang.String toString()
toString
in class
java.lang.Object
public void visitContainedRecords(RecordAggregate.RecordVisitor rv)
RecordAggregate
RecordAggregate
in the order that they should be written to file. Implementors may or may not return the actual
Record
s being used to manage POI's internal implementation. Callers should not assume either way, and therefore only attempt to modify those
Record
s after cloning
(按照写入文件的顺序访问此 RecordAggregate 中包含的每个原子 BIFF 记录。实施者可能会或可能不会返回用于管理 POI 内部实施的实际记录。调用者不应采取任何一种方式,因此仅在克隆后尝试修改这些记录)
visitContainedRecords
in class
RecordAggregate
(类 RecordAggregate 中的 visitContainedRecords)
rv
- The visitor to use for callbacks while walking this object
(rv - 访问此对象时用于回调的访问者)
public java.lang.String getStringValue()
public void setCachedStringResult(java.lang.String value)
public void setCachedBooleanResult(boolean value)
public void setCachedErrorResult(int errorCode)
public void setCachedErrorResult(FormulaError error)
public void setCachedDoubleResult(double value)
public Ptg[] getFormulaTokens()
public void setParsedExpression(Ptg[] ptgs)
public void unlinkSharedFormula()
public void notifyFormulaChanging()
public boolean isPartOfArrayFormula()
public CellRangeAddress getArrayFormulaRange()
public void setArrayFormula(CellRangeAddress r, Ptg[] ptgs)
public CellRangeAddress removeArrayFormula(int rowIndex, int columnIndex)
null
(包含指定单元格的数组公式的范围。从不为空)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.