[Lazarus] fpspreadsheet bug - and fix

Werner Pamler werner.pamler at freenet.de
Thu Oct 23 01:28:24 CEST 2014


 >  No idea who is the current maintainer of fpspreadsheet
I'm doing most of the development currently, no idea if I am the 
maintainer then...

Thanks for pointing me to this bug which I've seen for some time, but 
did not take seriously enough. But your solution is not working here, in 
fact I don't understand why it is working at all since the fpsfunc needs 
the TsBuiltInExpressionManager which is declared in fpsexprparser.

Now I removed the dependence on fpsfunc from fpexprparser, and after 
moving the "RegisterStdBuiltins" from fpexprparser to fpsfunc and the 
"ExprFormatSettings" from fpsfunc to fpsexprparser, the packages and 
demo projects compile. But now the built-ins - a central element of the 
parser - are no longer registered in the parser unit itself which does 
not seem right to me ( --> r3678).

I am aware of the fork of the exprparser, and initially I had been 
trying to extend it to fit into the fpspreadsheet infrastructure. But 
soon I realized some limitations of the exprparser: The parser uses 
hard-coded programming-style expressions which are not used in the 
spreadsheet environment. The hard-coded "and", for example" interferes 
with the "AND()" function of the standard spreadsheets. My main 
difficulty was how to put cell references into the existing code. This 
naturally leads to a dependence on fpspreadsheet. And even with the 
present version I am fighting with the rather strict data type checks of 
the parser. Finally I decided to fork the parser to get me a step 
forward. But if you have a better idea I'd be happy to use it.






More information about the Lazarus mailing list