If a matrix is passed as argument to a function that expects a scalar parameter and it is not in array/matrix mode, then the top left element of the matrix is passed. However, if a numeric value is expected then a text string should be converted according to the conversion settings, which here are ignored and any text returns 0 instead. This affects not only WEEKS. Seems I need to figure out a general handling. =WEEKS(DATE(2014;11;1);DATE(2014;11;30);{"Hello";"Eike";"!"}) works. Should trigger error. So actually whether the result should be error or not should depend on the settings, furthermore other values than 0 or 1 should return error where currently all values not 1 are treated as 0. Affect WEEKS, WEEKSINYEAR and other functions.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=481b8589d135baced12469bec4ee734b23faac21 introduce ScMatrix::GetDoubleWithStringConversion() preparing for tdf#100409 It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f219bd4c3599e0933760f8a9f0155fc97a9ab23c Resolves: tdf#100409 GetDoubleWithStringConversion() in GetDoubleFromMatrix() It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=56c916992276baf374664d0bfca4181919b849f5&h=libreoffice-5-2 introduce ScMatrix::GetDoubleWithStringConversion() preparing for tdf#100409 It will be available in 5.2.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5795989729274cdf8a8e6e1a55fb7cf12ab7fe7d&h=libreoffice-5-2 Resolves: tdf#100409 GetDoubleWithStringConversion() in GetDoubleFromMatrix() It will be available in 5.2.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=388014fc19b2a785f887cdfee91100fc9ab8d58d Resolves: tdf#100409 do not return coded double error for single matrix value It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Last commit notification ^^^ should had gone to bug 102215 ...
There is already a test for this issue in sc/qa/unit/data/functions/date_time/fods/weeks.fods