openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Weir <robw...@apache.org>
Subject Re: Issue 122927 -- spreadsheet formula compatibility
Date Thu, 15 Aug 2013 14:21:22 GMT
On Thu, Aug 15, 2013 at 10:07 AM, sebb <sebbaz@gmail.com> wrote:
> On 15 August 2013 14:47, Rob Weir <robweir@apache.org> wrote:
>> On Thu, Aug 15, 2013 at 9:41 AM, janI <jani@apache.org> wrote:
>>> On Aug 15, 2013 3:06 PM, "Rob Weir" <robweir@apache.org> wrote:
>>>>
>>>> https://issues.apache.org/ooo/show_bug.cgi?id=122927
>>>>
>>>> It boils down to how an IF() statements are evaluated.
>>>>
>>>> Remember, the typical form is IF(Condition;X;Y) where you give a
>>>> return value for the case where Condition is TRUE and another value
>>>> when Condition is FALSE.
>>>>
>>>> But it is also possible to leave out the last parameter and have a
>>>> formula like this:
>>>>
>>>> IF(Condition;X)
>>>>
>>>> So what does the formula evaluate to if Condition is FALSE?
>>>>
>>>> The behavior in 4.0.0, returning FALSE, is correct according to the
>>>> ODF 1.2 specification and is the same as what Excel does.  However, it
>>>> is different than what earlier versions of OpenOffice did, namely
>>>> returning 0.0.
>>>>
>>>> We obviously cannot do both.  I think the AOO 4.0.0 behavior is
>>>> correct and should remain.
>>>
>>> I dont understand why we cannot do both, most programming languages
>>> interpret falase==0 and true==1, that allows the use of boolean functions
>>> in calculations.
>>>
>>
>> If the user takes the results of the IF() calculation and uses it in
>> another formula, then FALSE is automatically treated as 0 in any other
>> formula where a number is expected.  You are correct in your
>> assumption there.   So no one gets a wrong answer in a calculation
>> because of the change.
>>
>> What is different is what appears in the cell that actually has the
>> IF() statement in it.  AOO 4.0 and Excel show FALSE.  Earlier versions
>> of AOO showed 0.   In this sense we can have one default behavior or
>> the other, but not both.
>
> Could you not add a setting that controls the behaviour?
>
> For a fresh install AOO 4.x will show FALSE.
> But if the user sets the appropriate backwards compatibilty option, it
> will show 0.
>

In theory yes, but in practice users don't really think about this as
a per-installation setting.  They want their spreadsheet to look the
same as it was when it was created, even if it was created in a
different version of OpenOffice, or in a different spreadsheet
application altogether.

So a more targeted fix would be to trigger backwards compatibility
mode whenever you read a spreadsheet that was created in older
versions of AOO.

Even better is to have a declarative approach where the behaviors are
encoded in the document itself as metadata.  This approach has been
discussed, but is not yet standardized.

-Rob

>> -Rob
>>
>>
>>> rgds
>>> jan i
>>>>
>>>> I'd like to close the issue as NOTABUG.  But I'd like to get a few
>>>> more thoughts on this first.
>>>>
>>>> Regards,
>>>>
>>>> -Rob
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Mime
View raw message