Comment 24 for bug 775608

Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

Created attachment 46313
patch from launchpad lp#775608

It looks like the error has been introduced with:
http://cgit.freedesktop.org/libreoffice/calc/commit/?id=c9d53a9a25770f6736c5f2342d57c237bde2f23

Copy-paste from https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/775608 :

= RATIONALE =
This is:
- a severe regression from the previous release of Ubuntu
- while it might directly not cause a loss of user data, it might cause corruption of user data which might be even worse

= RESOLUTION =
The bug has been found to be caused by an call to the function IterateMatrix() in sc/source/core/tool/interpr1.cxx with the wrong order of parameters. This causes the initial value of the iteration to be wrong for PRODUCT. It seems to be right still for other functions by pure luck (i.e. as fMem is 0 it works out correctly for most calls - but for PRODUCT calls fRes has to be 1 initially).

= REPRODUCING THE BUG =
TEST CASE:
- Open calc spreadsheet
- type in "=PRODUCT({1, 2, 3})" as formula for a cell
- expected result: 6
- actual result: 1

Reopening from review and commit to 3-3 branch as patch is available.