In trying to write the sheet reference code, i came accross some issues. Oen of the problems in bug 9632 is that when we ask the Area3D or Ref3D ptgs to return their string representations, they will need access to the WorkBook object to return the correct value, since they just hold an index to a externSheet , whose name is available through a different externsheet record. The same issue will arise when we do named ranges in formulas.
The issue also arises in writing (while parsing a formula), but I have solved that by passing a reference to the book to the FormulaParser (tho that would make the dependency matrix circular, but i dont think one can help it very much). However, to pass references to the book while constructing all formulaptgs seems to be a very impractical solution. One idea i had in mind was to use a thread local variable to store the book. This can be made safe for the user. It is also relatively elegant. However, a poi developer will have to be careful about the call stack (so as to set threadlocals correctly) when writing formula or named range related code. But with some amount of error checking, i think we can make it work. What do you guys think? It would be helpful is a negative response is accompanied by an alternative solution :-) Regards - Avik -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
