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
|
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. |
getRecordSize, serialize
public FormulaRecordAggregate(FormulaRecord formulaRec, StringRecord stringRec, SharedValueManager svm)
stringRec
- may be null
if this formula does not have a cached text
value.svm
- the SharedValueManager
for the current sheetpublic FormulaRecord getFormulaRecord()
public StringRecord getStringRecord()
public short getXFIndex()
getXFIndex
in interface CellValueRecordInterface
public void setXFIndex(short xf)
setXFIndex
in interface CellValueRecordInterface
public void setColumn(short col)
setColumn
in interface CellValueRecordInterface
col
- the column this cell definespublic void setRow(int row)
setRow
in interface CellValueRecordInterface
row
- the row this cell occurs withinpublic short getColumn()
getColumn
in interface CellValueRecordInterface
public int getRow()
getRow
in interface CellValueRecordInterface
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 cloningvisitContainedRecords
in class RecordAggregate
rv
- The visitor to use for callbacks while walking this objectpublic 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.