// get the firstCond bytes
tmp = new byte[0];
for (int i = 0; i< firstCond.size();i++){
Object o = firstCond.elementAt(i);
Ptg ptg = (Ptg) o;
tmp = ByteTools.append(ptg.getRecord(), tmp);
}
// get the length and add in.
short sz = (short)tmp.length;
recbytes = ByteTools.append(ByteTools.shortToLEBytes(sz), recbytes);
// add garbage
recbytes = ByteTools.append(garbageByteOne, recbytes);
recbytes = ByteTools.append(tmp, recbytes);
// get the secondCond bytes
tmp = new byte[0];
for (int i = 0; i< secondCond.size();i++){
Object o = secondCond.elementAt(i);
Ptg ptg = (Ptg) o;
tmp = ByteTools.append(ptg.getRecord(), tmp);
}
// get the length and add in.
sz = (short)tmp.length;
recbytes = ByteTools.append(ByteTools.shortToLEBytes(sz), recbytes);
// add garbage
recbytes = ByteTools.append(garbageByteTwo, recbytes);
recbytes = ByteTools.append(tmp, recbytes);
tmp = new byte[1];
if (cRangeList != null) {
tmp[0] = (byte)cRangeList.size();;
recbytes = ByteTools.append(tmp, recbytes);
for(int i=0;i<cRangeList.size();i++) {
tmp = ((PtgArea)cRangeList.get(i)).getRecord();
byte[] tmp2 = new byte[8];
tmp[0] = 0;
System.arraycopy(tmp, 0, tmp2, 0, tmp2.length);
recbytes = ByteTools.append(tmp2, recbytes);
}
// there is a trailing zero, not sure why...
if (cRangeList.size()>0) {
tmp = new byte[1];
tmp[0] = 0;
recbytes = ByteTools.append(tmp, recbytes);
}
} else if (ooxmlranges!=null && ooxmlranges.length>0) {
tmp[0] = (byte)ooxmlranges.length;
recbytes = ByteTools.append(tmp, recbytes);
for(int i=0;i<ooxmlranges.length;i++) {
Ptg/*Ref*/ p= PtgRef.createPtgRefFromString(this.getSheet().getSheetName() + "!" + ooxmlranges[i], this);
tmp= p.getRecord();
/* replace with above PtgArea pa= new PtgArea();
try {
pa.setParentRec(this);
pa.setLocation(this.getSheet().getSheetName() + "!" + ooxmlranges[i]);
} catch (Exception e) {