Created attachment 131286 [details] Sample case as described in bug report Description: With 'Precision as shown' activated, precision is taken from the first subformat. If format is composed of 2 or 3 subformat, and they don't have the same precision, it leads to incorrect behavior Steps to reproduce: 1. Activate 'Precision as shown' option: Tools > Options > LibreOffice Calc > Calculate 2. In A1, enter =-1/3 3. In A2, enter =3*A1 A2 displays '-1' as no rounding is operate with General format 4. Change number format of A1 to 0.0;-0.00 (see attached file) Actual behavior: A1 displays -0.30 A2 displays -0.9 Expected behavior: A1 should display -0.33 A2 should display -0.99 Bug is located in RoundValueAsShown http://opengrok.libreoffice.org/xref/core/sc/source/core/data/documen4.cxx#RoundValueAsShown where precision is taken from the first subformat
Confirmed in Version: 5.4.0.0.alpha0+ Build ID: 880033edde516fc30225005245253293a6a58ba4 CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e7f769bc67d3f132b477b3c253f8065243b9b8ac tdf#106052 Treat SubFormat for "Precision as shown" It will be available in 5.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.
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7496f7d3cae8a932dc43ede8a30a99289366a264 Tests for "Precision as shown" following tdf#105657 tdf#106052 It will be available in 5.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.
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=09478b2211bbc9ec34d8de8452e30cf1254a250c&h=libreoffice-5-3 tdf#106052 Treat SubFormat for "Precision as shown" It will be available in 5.3.3. 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.
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e9d13f703f212b317682c35877571903da18b4af&h=libreoffice-5-3 Tests for "Precision as shown" following tdf#105657 tdf#106052 It will be available in 5.3.3. 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.