Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||Feature request: Allow VolatileResult to be different for subsequent function calls with same arguments. (XVolatileResult)|
|Component:||programming||Assignee:||AOO issues mailing list <issues>|
|Status:||UNCONFIRMED ---||QA Contact:|
|Issue Type:||ENHANCEMENT||Latest Confirmation in:||---|
Description cfries 2012-06-16 16:34:57 UTC
As stated in the developer documentation, - see http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Variable_Results -, subsequent calls with same arguments to functions with volatile results (XVolatileResult) have to return the same (XVolatileResult) object. Hence, the add-in function implementing the XVolatileResult has to maintain a map arg->resultObject. However, this requirement is a limitation. Allowing volatile functions to return new objects for every new function call will be an improvement. An example of an application is a random number generator like RAND(). The function RAND() returns a new random number for every subsequent call, even though arguments are the same (it has not arguments). Now consider a timer based (volatile) random number generator returning a new random number ever x seconds, e.g. RANDTICKER(double delay). I experimented a lot with XVolatileResults. However, returning different objects for subsequent function calls with same arguments will lead to some (but not many) undesirable effects, like occasional claims of 522 error (circular reference). PS: I do have a real (but more specific) use case in the application of Obba ( http://obba.info ) , where I need to return a volatile value which depends on the path of the calling spreadsheet.