public abstract class GenericPtg extends Object implements Ptg, Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected XLSRecord |
parent_rec |
static long |
serialVersionUID |
ARRAY, CALCULATED, PTG_ADD_LENGTH, PTG_AREA_LENGTH, PTG_AREA3D_LENGTH, PTG_AREAERR3D_LENGTH, PTG_ATR_LENGTH, PTG_BOOL_LENGTH, PTG_CONCAT_LENGTH, PTG_DIV_LENGTH, PTG_ENDSHEET_LENGTH, PTG_EQ_LENGTH, PTG_EXP_LENGTH, PTG_FUNC_LENGTH, PTG_FUNCVAR_LENGTH, PTG_GE_LENGTH, PTG_GT_LENGTH, PTG_INT, PTG_INT_LENGTH, PTG_ISECT_LENGTH, PTG_LE_LENGTH, PTG_LOCATION_POLICY_LOCKED, PTG_LOCATION_POLICY_TRACK, PTG_LOCATION_POLICY_UNLOCKED, PTG_LT_LENGTH, PTG_MEM_AREA_N_LENGTH, PTG_MEM_AREA_NV_LENGTH, PTG_MEMERR_LENGTH, PTG_MLT_LENGTH, PTG_MYSTERY_LENGTH, PTG_NAME_LENGTH, PTG_NAMEX_LENGTH, PTG_NE_LENGTH, PTG_NUM_LENGTH, PTG_PAREN_LENGTH, PTG_PERCENT_LENGTH, PTG_POWER_LENGTH, PTG_RANGE_LENGTH, PTG_REF_LENGTH, PTG_REF3D_LENGTH, PTG_REFERR_LENGTH, PTG_REFERR3D_LENGTH, PTG_SUB_LENGTH, PTG_TYPE_ARRAY, PTG_TYPE_SINGLE, PTG_UMINUS_LENGTH, PTG_UNION_LENGTH, PTG_UPLUS_LENGTH, REFERENCE, UNCALCULATED, VALUEAI, ALLOWDUPES, ALRUNS, AREA, AREAFORMAT, ATTACHEDLABEL, AUTOFILTER, AXCENT, AXESUSED, AXIS, AXISLINEFORMAT, AXISPARENT, BACKUP, BAR, BEGIN, BLANK, BOF, BOOKBOOL, BOOLERR, BOPPOP, BOPPOPCUSTOM, BOTTOM_MARGIN, BOTTOMMARGIN, BOUNDSHEET, CALC_MODE_PROP, CALCCOUNT, CALCMODE, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, CATLAB, CATSERRANGE, CF, CF12, CHART, CHART3DBARSHAPE, CHARTFORMAT, CHARTFORMATLINK, CHARTFRTINFO, CHARTLINE, CODENAME, COLINFO, CONDFMT, CONDFMT12, CONTINUE, COUNTRY, CRN, CRTLAYOUT12, CRTLAYOUT12A, DAT, DATAFORMAT, DATALABEXT, DATALABEXTCONTENTS, DATE1904, DBCELL, DCON, DCONBIN, DCONNAME, DCONREF, DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM, DEFAULTENCODING, DEFAULTROWHEIGHT, DEFAULTTEXT, DEFCOLWIDTH, DELTA, DIMENSIONS, DROPBAR, DSF, DV, DVAL, END, ENDBLOCK, ENDEXTSST, ENDOBJECT, EOF, EXCEL2K, EXTERNCOUNT, EXTERNNAME, EXTERNSHEET, EXTSST, FBI, FEATHEADR, FILE_LOCK, FILEPASS, FONT, FONTBASIS, FONTX, FOOTERREC, FORMAT, FORMULA, FRAME, FRTFONTLIST, FRTWRAPPER, GARBAGE, GELFRAME, GUTS, HCENTER, HEADERREC, HLINK, HORIZONTAL_PAGE_BREAKS, IFMT, INDEX, INTERFACE_HDR, ITERATION, LABEL, LABELSST, LEFT_MARGIN, LEFTMARGIN, LEGEND, LEGENDXN, LINE, LINEFORMAT, MARKERFORMAT, MAXCOLS, MAXCOLS_BIFF8, MAXRECLEN, MAXROWS, MAXROWS_BIFF8, MERGEDCELLS, MSODRAWING, MSODRAWINGGROUP, MSODRAWINGSELECTION, MULBLANK, MULRK, NAME, NOTE, NUMBER, OBJ, OBJECTLINK, OBJPROTECT, OBPROJ, PALETTE, PANE, PASSWORD, PHONETIC, PICF, PIE, PIEFORMAT, PIVOTCHARTBITS, PIVOTCHARTLINK, PLOTAREA, PLOTGROWTH, PLS, PLV, POS, PRECISION, PRINT_GRIDLINES, PRINT_ROW_HEADERS, PRINTGRID, PRINTROWCOL, PROT4REV, PROTECT, QSISXTAG, RADAR, RADARAREA, RANGEPROTECTION, REFMODE, REFTRACK_PROP, RIGHT_MARGIN, RIGHTMARGIN, RK, ROW, RRD_HEAD, RRD_INFO, RSTRING, RTENTEXU, RTMERGECELLS, SBASEREF, SCATTER, SCENPROTECT, SCL, SELECTION, SERAUXERRBAR, SERAUXTREND, SERFMT, SERIES, SERIESLIST, SERIESTEXT, SERPARENT, SERTOCRT, SETUP, SHAREDUPES, SHEETLAYOUT, SHEETPROTECTION, SHRFMLA, SHTPROPS, SIIINDEX, SST, STARTBLOCK, STARTOBJECT, STRING_ENCODING_AUTO, STRING_ENCODING_COMPRESSED, STRING_ENCODING_UNICODE, STRINGREC, STYLE, SUPBOOK, SURFACE, SXADDL, SXBOOL, SXDB, SXDBB, SXDBEX, SXDI, SXEX, SXFDB, SXFDBTYPE, SXFORMAT, SXIVD, SXLI, SXNUM, SXPI, SXSTREAMID, SXSTRING, SXVD, SXVDEX, SXVI, SXVIEW, SXVIEWEX9, SXVIEWLINK, SXVS, TABID, TABLE, TABLESTYLES, TEXTDISP, THREED, TICK, TOP_MARGIN, TOPMARGIN, TXO, TYPE_BLANK, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FORMULA, TYPE_FP, TYPE_INT, TYPE_STRING, UNICODEENCODING, UNITS, USERBVIEW, USERSVIEWBEGIN, USERSVIEWEND, USETEMPFILE_PROP, USR_EXCL, VALIDATEWORKBOOK, VALUERANGE, VB_MODULE, VCENTER, VERTICAL_PAGE_BREAKS, WINDOW_PROTECT, WINDOW1, WINDOW2, WK_CHART, WK_FILE, WK_GLOBALS, WK_MACROSHEET, WK_WORKSHEET, WSBOOL, XCT, XF, XLS_MAX_COLS, YMULT| Constructor and Description |
|---|
GenericPtg() |
| Modifier and Type | Method and Description |
|---|---|
Ptg |
calculatePtg(Ptg[] parsething)
return a Ptg consisting of the calculated values
of the ptg's passed in.
|
Object |
clone()
Creates a deep clone of this Ptg.
|
void |
close()
clear out object references in prep for closing workbook
|
Object |
evaluate(Object[] obj)
pass in arbitrary number of values (probably other Ptgs)
and return the resultant value.
|
static int |
getArrayLen(Object o) |
Ptg[] |
getComponents()
If a record consists of multiple sub records (ie PtgArea) return those
records, else return null;
|
double |
getDoubleVal()
Gets the value of the ptg represented as an double.
|
static double |
getDoubleValue(Object o,
XLSRecord parent)
convert a value to a double, throws exception if cannot
|
static double |
getDoubleValueFromObject(Object o)
converts a single Ptg number-type value to a double
|
int[] |
getIntLocation() |
int |
getIntVal()
Gets the value of the ptg represented as an int.
|
boolean |
getIsArray() |
boolean |
getIsBinaryOperator() |
boolean |
getIsControl() |
boolean |
getIsFunction() |
boolean |
getIsOperand() |
boolean |
getIsOperator()
determine the general Ptg type
|
boolean |
getIsPrimitiveOperator()
determines whether this operator is a 'primitive' such as +,-,=,<,>,!=,==,etc.
|
boolean |
getIsReference() |
boolean |
getIsStandAloneOperator() |
boolean |
getIsUnaryOperator() |
String |
getLocation()
When the ptg is a reference to a location this returns that location
|
int |
getLocationPolicy()
returns the Location Policy of the Ptg is locked
used during automated BiffRec movement updates
|
int |
getLock()
a locking mechanism so that Ptgs are not endlessly
re-calculated
|
int |
getNumParams()
Returns the number of Params to pass to the Ptg
|
byte |
getOpcode()
return the byte header for the Ptg
|
XLSRecord |
getParentRec() |
Ptg |
getPtgVal()
Gets the (return) value of this Ptg as an operand Ptg.
|
byte[] |
getRecord()
So, here you see we can get the static type from the record itself
then format the output record.
|
String |
getString()
return the human-readable String representation of
this ptg -- if applicable
|
String |
getString2()
return the human-readable String representation of
the "closing" portion of this Ptg
such as a closing parenthesis.
|
protected static String[] |
getStringValuesFromPtgs(Ptg[] pthings)
returns an array of strings from ptg's sent in.
|
String |
getTextString()
return the human-readable String representation of
this ptg -- if applicable
|
BiffRec |
getTrackercell()
if the Ptg needs to keep a handle to a cell, this is it...
|
Object |
getValue()
returns the value of an operand ptg.
|
protected static double[] |
getValuesFromObjects(Object[] pthings)
Returns an array of doubles from number-type ptg's sent in.
|
protected static Object[] |
getValuesFromPtgs(Ptg[] pthings)
Returns an array of doubles from number-type ptg's sent in.
|
void |
init(byte[] b) |
void |
initTrackerCell()
if the Ptg needs to keep a handle to a cell, this is it...
|
boolean |
isBlank() |
static String |
qualifyCellAddress(String s)
return cell address with $'s e.g.
|
static String |
qualifySheetname(String s)
return properly quoted sheetname
|
int |
readRow(byte b0,
byte b1)
generic reading of a row byte pair with handling for Excel 2007 if necessary
|
void |
setLocation(String s)
setLocation moves a ptg that is a reference to a location, such as
a ptg range being modified
|
void |
setLocationPolicy(int b)
lock the Location of the Ptg so that it will not
be updated during automated BiffRec movement updates
|
void |
setLock(int x)
a locking mechanism so that Ptgs are not endlessly
re-calculated
|
void |
setParentRec(XLSRecord f)
constructor must pass in 'parent' XLSRecord so that there
is a handle for updating...
|
void |
setTrackercell(BiffRec trackercell)
if the Ptg needs to keep a handle to a cell, this is it...
|
void |
setVars(Ptg[] parr)
Operator Ptgs take other Ptgs as arguments
so we need to pass them in to get a meaningful
value.
|
void |
updateAddressFromTrackerCell()
if the Ptg needs to keep a handle to a cell, this is it...
|
void |
updateRecord()
update the Ptg
|
public static final long serialVersionUID
protected XLSRecord parent_rec
public Object clone()
Ptgpublic int getLock()
public void setLock(int x)
public boolean getIsOperator()
PtggetIsOperator in interface Ptgpublic boolean getIsBinaryOperator()
getIsBinaryOperator in interface Ptgpublic boolean getIsUnaryOperator()
getIsUnaryOperator in interface Ptgpublic boolean getIsStandAloneOperator()
getIsStandAloneOperator in interface Ptgpublic boolean getIsPrimitiveOperator()
PtggetIsPrimitiveOperator in interface Ptgpublic boolean getIsOperand()
getIsOperand in interface Ptgpublic boolean getIsFunction()
getIsFunction in interface Ptgpublic boolean getIsControl()
getIsControl in interface Ptgpublic boolean getIsArray()
getIsArray in interface Ptgpublic boolean getIsReference()
getIsReference in interface Ptgpublic int getLocationPolicy()
getLocationPolicy in interface Ptgpublic void setLocationPolicy(int b)
setLocationPolicy in interface Ptgb - setting of the lock the location policy for this Ptgpublic void updateRecord()
updateRecord in interface Ptgpublic int getNumParams()
getNumParams in interface Ptgpublic void setVars(Ptg[] parr)
public Ptg[] getComponents()
PtggetComponents in interface Ptgpublic Object evaluate(Object[] obj)
public String getTextString()
getTextString in interface Ptgpublic String getString()
Ptgpublic String getString2()
getString2 in interface Ptgpublic byte getOpcode()
Ptgpublic void init(byte[] b)
public Ptg calculatePtg(Ptg[] parsething) throws FunctionNotSupportedException, CalculationException
calculatePtg in interface PtgCalculationExceptionFunctionNotSupportedExceptionpublic Ptg getPtgVal()
public Object getValue()
public int getIntVal()
public double getDoubleVal()
getDoubleVal in interface Ptgpublic byte[] getRecord()
public void setLocation(String s)
PtgsetLocation in interface Ptgpublic String getLocation() throws FormulaNotFoundException
PtggetLocation in interface PtgFormulaNotFoundExceptionpublic int[] getIntLocation()
throws FormulaNotFoundException
getIntLocation in interface PtgFormulaNotFoundExceptionpublic void setParentRec(XLSRecord f)
PtgsetParentRec in interface Ptgpublic XLSRecord getParentRec()
getParentRec in interface Ptgprotected static Object[] getValuesFromPtgs(Ptg[] pthings)
pthings - protected static double[] getValuesFromObjects(Object[] pthings) throws NumberFormatException
pthings - NumberFormatExceptionpublic static double getDoubleValue(Object o, XLSRecord parent) throws NumberFormatException
o - NumberFormatExceptionpublic static double getDoubleValueFromObject(Object o)
protected static String[] getStringValuesFromPtgs(Ptg[] pthings)
public void updateAddressFromTrackerCell()
updateAddressFromTrackerCell in interface Ptgpublic void initTrackerCell()
initTrackerCell in interface Ptgpublic BiffRec getTrackercell()
PtggetTrackercell in interface Ptgpublic void setTrackercell(BiffRec trackercell)
PtgsetTrackercell in interface Ptgtrackercell - The trackercell to set.public static final String qualifySheetname(String s)
s - public static String qualifyCellAddress(String s)
s - public static int getArrayLen(Object o)
public int readRow(byte b0,
byte b1)
b0 - b1 - Copyright © 2002–2019 Starter Inc.. All rights reserved.