public class ReferenceTracker extends Object
| Constructor and Description |
|---|
ReferenceTracker() |
| Modifier and Type | Method and Description |
|---|---|
Ptg |
addCellRange(Ptg ptgRef)
adds a cellrange Ptg (Area, Area3d etc.) to be tracked
These records are stored in a row based lookup,
this row map is looked up off actual row number, ie row 1 is get(1).
|
void |
addPtgNameReference(PtgName p)
Add to the collection of PtgNames for referenceTracker
|
static void |
adjustFormulaRefs(CellHandle newcell,
int newrownum,
int offset,
boolean shiftRow)
IF the newly inserted cell is a Formula, we need to update its cell range(s)
called by shiftRow
|
Map |
clearAffectedFormulaCells(BiffRec cx)
Returns a Collection Map of cells that are affected by formula
references to this CellHandle.
|
Map |
clearAffectedFormulaCells(CellHandle cx)
Returns a Collection Map of cells that are affected by formula
references to this CellHandle.
|
Map |
clearAffectedFormulaCellsOnSheet(CellHandle cx,
String sheetname)
Returns ALL formulas on the cellhandles sheet that reference this CellHandle.
|
void |
clearCaches()
Blow out all the cacheing
|
void |
clearLookupCaches()
clear out VLOOKUP and related function caches
|
void |
clearPtgLocationCaches(String targetSheet)
Clears out the cached location of ptgrefs in the target
sheet.
|
void |
close()
clear out object references in prep for closing workbook
|
CellRange[] |
getCellRanges()
Returns an Array of the CellRanges existing in this WorkBook
specifically the Ranges referenced in Formulas, Charts, and
Named Ranges.
|
List<Ai> |
getChartReferences(BiffRec newRec)
retrieve all chart-related (==Ai) references to the particular cell
|
Map |
getCriteriaDBs() |
Map |
getListDBs() |
Map |
getLookupColCache() |
Map |
getVlookups() |
static void |
insertChartSeries(Chart c,
String sht,
int rownum)
insert chart series upon an insert row
called by WSH.shiftRow
if series are row-based
|
void |
removeCellRange(Ptg cr)
removes a cellrange Ptg (Area, Area3d etc.) to be tracked
|
static boolean |
shiftPtg(PtgRef ptgref,
String sht,
int start,
int shiftamount,
boolean isExcel2007,
boolean shiftRow)
given a PtgRef, shifts correctly given start (row or col), shiftamount (+ or - 1) and truth of "shiftRow"
|
static void |
updateAddressPerPolicy(Ptg thisptg,
String newaddr)
Update the address in a Ptg using the policy defined for the Ptg in an RDF if any.
|
void |
updateInRefTracker(PtgRef pr,
XLSRecord parent)
updates the tracked ptg by using a new parent record
|
static void |
updateReferences(int start,
int shiftamount,
Boundsheet thissheet,
boolean shiftRow)
updateReferences
Shifts, Expands or Contracts ALL affected ranges upon a row or col insert or delete.
|
public Map getLookupColCache()
public Map getVlookups()
public Map getCriteriaDBs()
public Map getListDBs()
public void clearCaches()
public void clearLookupCaches()
public Map clearAffectedFormulaCellsOnSheet(CellHandle cx, String sheetname)
public Map clearAffectedFormulaCells(CellHandle cx)
public Map clearAffectedFormulaCells(BiffRec cx)
public List<Ai> getChartReferences(BiffRec newRec)
newRec - cell to lookup referencespublic void addPtgNameReference(PtgName p)
public Ptg addCellRange(Ptg ptgRef)
cr - public void clearPtgLocationCaches(String targetSheet)
targetSheet - public void removeCellRange(Ptg cr)
cr - public void updateInRefTracker(PtgRef pr, XLSRecord parent)
pr - original ptg contained in trackerparent - new parent record of ptgpublic CellRange[] getCellRanges()
public static void updateReferences(int start,
int shiftamount,
Boundsheet thissheet,
boolean shiftRow)
start - 0-based start rowshift - shift amount can be + or -thissheet - shiftRow - true if shifting rows (false for columns)public static boolean shiftPtg(PtgRef ptgref, String sht, int start, int shiftamount, boolean isExcel2007, boolean shiftRow)
ptgref - = the ptgref to movesht - = the sheet in which the ptgref residesstart - = Start row for shifting - This is a 0 based valueshiftamount - = amount to shift the ptgrefisExcel2007 - true if use Excel-2007 maximumsshiftRow - = ?public static void insertChartSeries(Chart c, String sht, int rownum)
public static void updateAddressPerPolicy(Ptg thisptg, String newaddr)
thisptg - newaddr - public static void adjustFormulaRefs(CellHandle newcell, int newrownum, int offset, boolean shiftRow) throws Exception
copycell - oldaddr - newaddr - rownum - shiftRow - true if shifting rows and not columnsExceptionWorkSheetHandle.shiftRowpublic void close()
Copyright © 2002–2019 Starter Inc.. All rights reserved.