pe.setParentRec(parent);
pe.setLocation(s);
return pe;
}
}
WorkBook bk= parent.getWorkBook();
String sht= "((?:\\\\?+.)*?!)?+";
String rangeMatch= "(.*(:).*){2,}?"; //matches 2 or more range ops (:'s)
String opMatch= "(.*([ ,]).*)+"; //matches union or isect op ( " " or ,)
String m= sht + "((" + opMatch + ")|(" + rangeMatch +"))";
// is address a complex range??
if (address.matches(m) || range.indexOf("(")>-1) {
//NOTE: this can be a MemFunc OR a MemArea --
// PtgMemFunc= a NON-CONSTANT cell address, cell range address or cell range list
// Whenever one operand of the reference subexpression is a function, a defined name, a 3D
// reference, or an external reference (and no error occurs), a PtgMemFunc token is used.
// PtgMemArea= constant cell address, cell range address, or cell range list on the same sheet
PtgMemFunc pmf= new PtgMemFunc();
pmf.setParentRec(parent);
pmf.setLocation(address); // TODO HANDLE FUNCTION MEMFUNCS ALA OFFSET(x,y,0):OFFSET(x,y,0)
ptg= pmf;
} else if (range.indexOf(":") > 0) { // it's a range, either PtgRef3d or PtgArea3d
String[] ops= StringTool.getTokensUsingDelim(range, ":");
if ((bk.getName(ops[0])!=null || bk.getName(ops[1])!=null)) {
PtgMemFunc pmf= new PtgMemFunc();
pmf.setParentRec(parent);
pmf.setLocation(address);
ptg= pmf;
} else if (sh1!=null) {