//[0]:last, [1]:all
private static Set<Ref>[] getBothDependents(Cell cell) {
final Worksheet sheet = (Worksheet) cell.getSheet();
final Book book = (Book) sheet.getWorkbook();
final RefSheet refSheet = getRefSheet(book, sheet);
//clear/update formula cache
book.getFormulaEvaluator().notifySetFormula(cell);
//get affected dependents(last, all)
final int row = cell.getRowIndex();
final int col = cell.getColumnIndex();
Set<Ref>[] refs = ((RefSheetImpl)refSheet).getBothDependents(row, col);
//no dependent but myself is a formula cell
if (refs[0].isEmpty() && cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
final Ref srcRef = refSheet.getRef(row, col, row, col);
if (srcRef != null) {
refs[0].add(srcRef);
refs[1].add(srcRef);
}
}