return opResult;
}
protected CellRefImpl prepareSrcRef(OperationEvaluationContext ec) {
final XelContext ctx = XelContextHolder.getXelContext();
CellRefImpl srcRef = null;
boolean isOld = false;
final String srcSheetName = ec.getSheetName();
final int srcRow = ec.getRowIndex();
final int srcCol = ec.getColumnIndex();
final RefBook srcRefBook = BookHelper.getOrCreateRefBook(_book);
final RefSheet srcRefSheet = srcRefBook.getOrCreateRefSheet(srcSheetName);
if (ctx != null) {
final String srcRefKey = srcRefBook.getBookName()+"]"+srcSheetName+"!"+new CellReference(srcRow, srcCol).formatAsString();
final Object[] refs = (Object[]) ctx.getAttribute(srcRefKey);
if (refs != null) {
srcRef = (CellRefImpl) refs[0];
isOld = ((Boolean)refs[1]).booleanValue();
} else {
srcRef = (CellRefImpl) srcRefSheet.getRef(srcRow, srcCol, srcRow, srcCol);
if (srcRef == null) { // a new evaluated one
srcRef = (CellRefImpl) srcRefSheet.getOrCreateRef(srcRow, srcCol, srcRow, srcCol);
} else {
isOld = !srcRef.getPrecedents().isEmpty();
}
ctx.setAttribute(srcRefKey, new Object[] {srcRef, Boolean.valueOf(isOld)});
}
if (isOld) { //an old src ref, no need to add dependency
return null;