[Libreoffice] [REVIEW][3-4] date change regression fdo#44385

Noel Power nopower at suse.com
Fri Jan 20 07:30:54 PST 2012


On 20/01/12 13:40, Andrew Douglas Pitonyak wrote:
> On 01/20/2012 06:32 AM, Noel Power wrote:
note there is a mistake in the table below
>>
>> [*] table of behaviour in vba, pre the bug being introduced and post 
>> patch
>>
>>                                mso    old behaviour  present
>>                             --------------------------------
>> date + num                    Date      Date          Date
>> date - num                    Date      Double        Date
>> date * num                    Double    Double        Double
>> date / num                    Double    Double        Double
>> date + date                   Date      Double        Double [1]
should read
date / num                    Double    Date        Double
                                        ^^^^
e.g.

                                mso    old behaviour  present
                             --------------------------------
date + num                    Date      Date          Date
date - num                    Date      Double        Date
date * num                    Double    Double        Double
date / num                    Double    Double        Double
date + date                   Date      Date          Double [1]
date - date                   Double    Double        Double
date * date                   Double    Double        Double

in other words other than the date - num example the 'old' the old and 
new behaviour *should* match

> The only thing with which I disagree is that I would have addition and 
> subtraction return the same types. So, I would say that if date + date 
> returns a date (as your chart shows for MSO) then I would have date - 
> date return a date as well. If not, then I would leave your original 
> change as is so that they are consistent for addition and subtraction.
I would prefer to preserve compatibility ( especially for (+/-) ) as 
these are afaics the only operators that really make sense. I have a 
patch to do that that I would like to commit to master
>
> What type is "-date"? I see that never returned a date so (date + 
> (-date)) will return a date. 
no idea, it shouldn't be any different then it was before though

Noel



More information about the LibreOffice mailing list