Similar to bug 59039 when loading an .ods document with an array formula that in one of it's cells has an error result, that result is not preserved until the formula is recalculated. Steps to reproduce: 1. A1: 1 2. A2: =1/0 3. enter array formula in A3:A4 {=A1:A2} => result in A4 is #DIV/0! 4. save as .ods 5. reload 6. notice error in A4 is displayed left justified as string 7. in some cell enter =ISERROR(A4) => result FALSE, should be TRUE Is correct only after formula in A3:A4 was forced to recalculate, e.g. Ctrl+F9
@Eike: Because Markus is already assigned, I suppose this behavior is already tested and confirmed. Can we set this bug as NEW if so? Or do you want an independent test for this bug? Kind regards, Joren
@Joren: Just forgot to set to New, done. @Markus,Kohei: side note: no, this is not fixed with b6fbc8642928893ca608a35b802032cfe42e40bb / 97a10ade202537a60bf15ad58f2e44cfb785bb3f from bug 58539
Ok, we have several unrelated bugs here with the matrix handling that add together to a lot of nasty behavior. First thing is that matrix formula cells are not registered in the formula tree. Fixing that shows another bug because we are setting the formula string for CompileXML which means we have no access to the real ScTokenArray during import wich we would need for the ScFormulaCell::StartListeningTo call. And finally there is the here mentioned problem of error string handling in formula cells which needs a fix for the other two bugs first. I have already a fix for the missing calls to StartListeningTo, but the problem with storing the formula string instead of the token array needs a bit of inspection. I hope that we can just skip the problem in ScMyTables::AddMatrixRange and compile the formula already to a normal ScTokenArray.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7f4269b9798c348b1ede4ad0d777f6a0977b7e16 for error value in matrix force recalc, fdo#59293 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.
I finally went a little bit different road. We are now forcing a recalculation of the matrix if it contains a possible error value. We might try to switch in the future to only forcing a recalculation of the cells with error values but we need to fill the ScMatrix for this manually with values.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=143c102df00d8ae84094ffd13454dffaa6fc6c7a&h=libreoffice-4-0 for error value in matrix force recalc, fdo#59293 It will be available in LibreOffice 4.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.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d81787416087827200ee12a8fbd25747fbfc3959 add test case for fdo#59293 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.