Hi Winfried,

On Tuesday, 2015-03-10 13:26:50 +0100, Winfried Donkers wrote:

> The -now reverted- patch for tdf#88547 made it possible to convert an array 
> of date strings to an array of numeric date values.
> From tdf#88547 I learned that Excel accepts these arguments in functions like 
> WORKDAY.INTL(), NETWORKDAYS.INTL(), MODE.MULT() and others. 
> In https://bugs.documentfoundation.org/show_bug.cgi?id=89872#c3 you say
> "The way how GetNumberSequenceArray() is used (and was implemented) it should 
> ignore all string and empty values like all spreadsheet functions do that 
> expect a number sequence as parameter.".
> 
> Now MODE.MULT() and the like do expect a number sequence as parameter _and_ 
> are expected to accept arrays of date strings.

Indeed..

> I want to fix 88547 in a way that doesn't break the use of 
> GetNumberSequenceArray() as it did with my original patch, but I'm not sure 
> which way to go.

I suggest to implement a new function similar to
GetNumberSequenceArray() that additionally accepts and tries to convert
strings and puts a double error to the array element if it fails, not
setting nGlobalError.

> Currently I think a proper solution would be to check whether we have a real 
> non-empty string before we convert it to numeric and push an error when 
> conversion to numeric fails; i.e. expand on my original patch of 
> GetNumberSequenceArray().

Please don't merge it into GetNumberSequenceArray(), for performance
reasons. Create a new function instead.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack

Attachment: pgpXCNKRkBgRL.pgp
Description: PGP signature

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to