Hi Regina, On Saturday, 2009-07-04 14:53:45 +0200, Regina Henschel wrote:
> I generate a file with a formula =FDISTL(a,b,c) and store it in > version ODF1.2. Unzipping the file I find "of:=FDIST(a,b,c)", which > is correct. > > Now I open the file in OOo2.4.2. I get the version warning to > upgrade. (BTW, you get the warning only for first opening.) Then it > opens and the cell with "of:=FDIST(a,b,c)" is calculated with cell > content =FDIST(a,b,c) instead of showing a #NAME? error. This must > not happen, because =FDIST in OOo2.4.2 means the right tail, which > is internally "of:=LEGACY.FDIST". The user does not know, that the > result is wrong. Ouch.. > Similar for the four parameter form. "of:=FDIST(a,b,c,d)" results in > cell content "=FDIST(a,b,c,d)". The user gets an Err:504 here, > because of the forth parameter. Apart from the of:FDIST vs. oooc:FDIST problem this is just normal for functions that get new parameters added. Features not understood by older versions can't be correctly handled by them. If that results in an error it's ok. > If you now save the file in OOo2.4.2 and reopen it in OOo3.2, then > the original =fdistl() cell contents are not restored. We have data > loss. "Content not restored"? What exactly is imported/displayed, and what is missing? I assume it is imported as FDIST instead of FDISTL (UI names), correct? > Is there any place in source of OOo3.2 where I can avoid that error? > Or can it only be solved in OOo2.4.x? The erroneous handling of of:FDIST as oooc:FDIST in 2.4.2 could only be fixed with a change in 2.x; however, a correct fix could only be to either make 2.x not load 'of' namespace as formulas at all, or completely implement handling of both namespaces, which would be quite tough, partly the same I did for OOo3.0 An intermediate workaround to not make the function calculate wrong results in 2.4.2 because of of:FDIST vs. oooc:FDIST could be to always forcedly write the 4th parameter, such that 2.4.2 will return an error, which is at least better than a wrong result. More nasty than nice, but ... For the "contents not restored" I'd need more details. If it is the function being imported as oooc:FDIST instead of of:FDIST, we might trick the compiler into translating that to of:FDIST if the function has 4 parameters, given that we wrote always 4 parameters as mentioned above. Again, more nasty than nice, but ... > (2) > Another problem is the following scenario. Save in OOo3.2 with > version ODF1.0. Open in OOo3.1.1. In cells with content "=FDISTL()" > you get correctly content "=fdistl()" and #NAME? error, because this > function is unknown to OOo3.1.1. Now save the file in OOo3.1.1 with > version ODF1.2. and open it in OOo3.2. The cell content is shown as > "=fdistl()", but the now known function It is not really known, because of:FDISTL doesn't exist. > is not identified and the > cells show a #NAME? error. Unzipping the file you see a > "of:=fdistl()", which small instead of capital letters. Even a hard > recalculate does not help. > > Any solution for this? We could introduce an alias handling in the compiler and tie that to the <meta:generator> element's value and accept the alias only for documents created by versions OOo3.0 and OOo3.1 However, given all these quirks I'm hesitating to implement FDISTL at the current stage, especially with regard to the OOo2.4.2 problems. Eike -- PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication. Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD
pgpDSrWMtXM9p.pgp
Description: PGP signature