Hi Regina, On Tuesday, 2009-03-17 18:04:12 +0100, Regina Henschel wrote:
> But export to "Microsoft Excel 2003 XML (.xml) is problematic. > If OOo is set to save in "odf1.2", the file opens with errors in Excel. > All formulae are stripped. The error log says for example > GRUND: Ungültiger Wert > WERT: of:=LOGNORMDIST(0.6;[.B12];[.B11]) > I think, there should not be this kind of WERT, because that form was > unkown 2003. That's http://qa.openoffice.org/issues/show_bug.cgi?id=96018 > If OOo is set to save in "odf1.1", the cases with parameter count <= 3 > are opened with formulas, only the cases with parameter count=4 give an > error and the formulas are stripped. The error log says for example > GRUND: Ungültiger Wert > WERT: =LOGNORMDIST(0.6,R[-1]C,R[-2]C,R[-3]C) > I think that is the correct behaviour. Yes, it is. > Now the OOo-part: > > I have added in FormulaMissingContext::AddMoreArgs() the lines > <code> > case ocLogNormDist: > if (mnCurArg == 0) > { > pNewArr->AddOpCode (ocSep ); > pNewArr->AddDouble( 0.0 ); // 2nd, mean = 0.0 > } > if (mnCurArg == 1) That should be if (mnCurArg <= 1) instead. The AddMoreArgs() method is called once for each function, both arguments have to be added if only one was present. > { > pNewArr->AddOpCode (ocSep ); > pNewArr->AddDouble( 1.0 ); // 3rd, standard > deviatioen = 1.0 > } > break; > </code> > > If OOo is set to save to odf1.2, then I get the transformation > =LOGNORMDIST(0,6;3) --> =LOGNORMDIST(0,6;3;1) > That is undesirable. It is contrary to the new feature, that the > parameter is optional. We want to add the parameters in any case because otherwise OOo3.0/3.1 wouldn't be able to interpret the formula, as they expect 3 parameters. This is perfectly well. While 3.2 will be able to read without arguments for the optional parameters, it will write something that can be read by any 3.x release. > And I get the transformation > =LOGNORMDIST(0,6) --> =LOGNORMDIST(0,6;0) > It shouldn't be transformed at all (see above). But when it is > transformed, why is the third parameter missing? See above, mnCurArg==0 in this case. > It is not missing, when > using "odf1.1", see below. > > If OOo is set to save to odf1.1, then I get the transformations > =LOGNORMDIST(0,6;3) --> =LOGNORMDIST(0,6;3;1) > =LOGNORMDIST(0,6) --> =LOGNORMDIST(0,6;0;1) > I think, those transformations are OK. Huh? That would be strange for the second case. Are you sure it was produced using the code you posted above? Seems more you fixed already what I lined out ;-) Eike -- OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer. SunSign 0x87F8D412 : 2F58 5236 DB02 F335 8304 7D6C 65C9 F9B5 87F8 D412 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't send personal mail to the e...@sun.com account, which I use for mailing lists only and don't read from outside Sun. Use er...@sun.com Thanks.
pgpJ1ExIAIpWV.pgp
Description: PGP signature