public class PtgArea extends PtgRef implements Ptg
Offset Size Contents
----------------------------------------------------
0 2 Index to first row (065535) or offset of first row (method [B], -3276832767)
2 2 Index to last row (065535) or offset of last row (method [B], -3276832767)
4 2 Index to first column or offset of first column, with relative flags (see table above)
6 2 Index to last column or offset of last column, with relative flags (see table above)
Only the low-order 14 bits specify the Col, the other bits specify
relative vs absolute for both the col or the row.
Bits Mask Name Contents
-----------------------------------------------------
15 8000h fRwRel =1 if row offset relative,
=0 if otherwise
14 4000h fColRel =1 if row offset relative,
=0 if otherwise
13-0 3FFFh col Ordinal column offset or number
Ptg,
Formula,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected PtgRef |
firstPtg |
protected PtgRef |
lastPtg |
static long |
serialVersionUID |
col, externalLink1, externalLink2, fColRel, formulaCol, formulaRow, fRwRel, hashcode, is3dRef, rw, sheetname, useReferenceTracker, wholeCol, wholeRowparent_recARRAY, 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 |
|---|
PtgArea() |
PtgArea(boolean useReferenceTracker) |
PtgArea(int[] loc,
XLSRecord parent,
boolean relativeRefs) |
PtgArea(PtgRef ptg1,
PtgRef ptg2,
XLSRecord parent)
Creates a new PtgArea from 2 component ptgs, used by shared formula
to create ptgareas.
|
PtgArea(String range,
XLSRecord parent) |
PtgArea(String range,
XLSRecord parent,
boolean relativeRefs) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(CellHandle ch)
returns whether this CellRange Contains a Cell
|
boolean |
contains(int[] rc)
returns whether this PtgArea Contains the specified row/col coordinate
[0] = firstrow
[1] = firstcol
[2] = lastrow
[3] = lastcol
|
boolean |
contains(String sn,
int[] rc)
check to see if the sheet and row/col are contained
in this ref
|
Ptg[] |
getColComponents(int colNum) |
Ptg[] |
getComponents()
Returns all of the cells of this range as PtgRef's.
|
PtgRef |
getFirstPtg() |
protected long |
getHashCode()
uniquely identifies a row/col
to unencrypt:
col= hashcode%maxcols
row= hashcode/maxcols -1
|
int[] |
getIntLocation()
returns the location of the ptg as an array of ints.
|
boolean |
getIsOperand() |
boolean |
getIsReference() |
PtgRef |
getLastPtg() |
int |
getLength()
return the length of the Ptg
|
String |
getLocation()
Returns the location of the Ptg as a string (ie c4)
|
BiffRec[] |
getRefCells() |
int[] |
getRowCol()
returns the row/col ints for the ref
Format is FirstRow,FirstCol,LastRow,LastCol
|
Ptg[] |
getRowComponents(int rowNum)
return the ptg components for a certain column within a ptgArea()
|
String |
getString()
return the human-readable String representation of
this ptg -- if applicable
|
Object |
getValue()
returns the value of the cell refereced by the PtgRef
|
void |
init(byte[] b) |
void |
populateVals()
parse all the values out of the byte array and
populate the classes values
|
void |
setFirstPtg(PtgRef ref) |
void |
setLastPtg(PtgRef ref) |
void |
setLocation(int[] rowcol)
Set the location of this PtgArea.
|
void |
setLocation(String address)
Set the location of this PtgRef.
|
void |
setLocation(String[] loc)
set Ptg to parsed location
|
void |
setParentRec(XLSRecord rec)
constructor must pass in 'parent' XLSRecord so that there
is a handle for updating...
|
void |
setPtgType(short type)
set the Ptg Id type to one of:
VALUE, REFERENCE or Array
25H (tAreaR), 45H (tAreaV), 65H (tAreaA)
The Ptg type is important for certain functions which require a specific type of operand |
void |
setWholeRowCol()
set the wholeRow and/or wholeCol flag for this PtgArea
for ranges such as:
$B:$B and $5:%9
|
String |
toString() |
void |
updateRecord()
Updates the record bytes so it can be pulled back out.
|
addToRefTracker, changeLocation, clearLocationCache, close, createPtgRefFromString, equals, getFormattedValue, getHashCode, getIsRefErr, getIsWholeCol, getIsWholeRow, getLocationWithSheet, getRealIntLocation, getSheetName, getUseReferenceTracker, is3dRef, isBlank, isColRel, isRowRel, removeFromRefTracker, setArrayTypeRef, setColRel, setExternalReference, setIsWholeCol, setIsWholeRow, setIsWholeRowCol, setLocation, setRelativeRowCol, setRowRel, setSheetName, setUseReferenceTracker, updateInRefTrackercalculatePtg, clone, evaluate, getArrayLen, getDoubleVal, getDoubleValue, getDoubleValueFromObject, getIntVal, getIsArray, getIsBinaryOperator, getIsControl, getIsFunction, getIsOperator, getIsPrimitiveOperator, getIsStandAloneOperator, getIsUnaryOperator, getLocationPolicy, getLock, getNumParams, getOpcode, getParentRec, getPtgVal, getRecord, getString2, getStringValuesFromPtgs, getTextString, getTrackercell, getValuesFromObjects, getValuesFromPtgs, initTrackerCell, qualifyCellAddress, qualifySheetname, readRow, setLocationPolicy, setLock, setTrackercell, setVars, updateAddressFromTrackerCellfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcalculatePtg, clone, close, evaluate, getDoubleVal, getIntVal, getIsArray, getIsBinaryOperator, getIsControl, getIsFunction, getIsOperator, getIsPrimitiveOperator, getIsStandAloneOperator, getIsUnaryOperator, getLocationPolicy, getLock, getNumParams, getOpcode, getParentRec, getPtgVal, getRecord, getString2, getTextString, getTrackercell, initTrackerCell, isBlank, setLocationPolicy, setLock, setTrackercell, setVars, updateAddressFromTrackerCellpublic static final long serialVersionUID
protected PtgRef firstPtg
protected PtgRef lastPtg
public PtgArea(PtgRef ptg1, PtgRef ptg2, XLSRecord parent)
public PtgArea(int[] loc,
XLSRecord parent,
boolean relativeRefs)
public PtgArea()
public PtgArea(boolean useReferenceTracker)
public boolean getIsOperand()
getIsOperand in interface PtggetIsOperand in class PtgRefpublic boolean getIsReference()
getIsReference in interface PtggetIsReference in class PtgRefpublic void populateVals()
PtgRefpopulateVals in class PtgRefpublic Ptg[] getComponents()
getComponents in interface PtggetComponents in class GenericPtgpublic int[] getRowCol()
public boolean contains(CellHandle ch)
the - cell to testpublic boolean contains(String sn, int[] rc)
sheetname - rc - public boolean contains(int[] rc)
the - rc coordinates to testpublic String getString()
public void setWholeRowCol()
public void setPtgType(short type)
setPtgType in class PtgRefpublic void setParentRec(XLSRecord rec)
PtgsetParentRec in interface PtgsetParentRec in class PtgRefpublic void setLocation(String address)
PtgRefsetLocation in interface PtgsetLocation in class PtgRefpublic void setLocation(String[] loc)
setLocation in class PtgRefloc - String[] sheet1, range, sheet2, exref1, exref2public int[] getIntLocation()
getIntLocation in interface PtggetIntLocation in class PtgRefpublic void setLocation(int[] rowcol)
setLocation in class PtgRefpublic String getLocation()
PtgRefgetLocation in interface PtggetLocation in class PtgRefGenericPtg.getLocation()public void updateRecord()
PtgRefupdateRecord in interface PtgupdateRecord in class PtgRefpublic int getLength()
Ptgpublic Object getValue()
PtgRefpublic Ptg[] getColComponents(int colNum)
public Ptg[] getRowComponents(int rowNum)
rowNum - public PtgRef getFirstPtg()
public PtgRef getLastPtg()
public void setFirstPtg(PtgRef ref)
ref - public void setLastPtg(PtgRef ref)
ref - public BiffRec[] getRefCells()
getRefCells in class PtgRefprotected long getHashCode()
PtgRefgetHashCode in class PtgRefCopyright © 2002–2019 Starter Inc.. All rights reserved.