| Summary: | So-called improper fractions are badly formatted with a fix denominator to "0/0" under a certain condition. | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Wolfgang Jäger <jag> |
| Component: | Calc | Assignee: | Laurent Balland <jumbo4444> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | jag, jumbo4444 |
| Priority: | medium | ||
| Version: | 5.3.0.3 release | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:7.6.0 target:7.5.3 target:7.4.7 | ||
| Crash report or crash signature: | Regression By: | ||
|
Description
Wolfgang Jäger
2023-02-28 20:17:46 UTC
Confirmed with Version: 7.5.0.3 (X86_64) / LibreOffice Community Build ID: c21113d003cd3efa8c53188764377a8272d9d6de CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR Calc: threaded Reproduce with free denominator as well 1. Enter value 1.95 2. Format as ?/? (no integer part) Actual result: 0/0 Expected result: 2/1 No problem if value is 2 or slightly above like 2.001. Bug occurs when value is below integer. No change if other digit codes (# or 0) are used to create fraction format. I think the bug was introduced by https://cgit.freedesktop.org/libreoffice/core/commit/svl/source/numbers/zformat.cxx?id=5706b29974c1c3ab0ba5a23685accf2fbebc3e06 https://opengrok.libreoffice.org/xref/core/svl/source/numbers/zformat.cxx?r=2cb2e2b9#2891 nDiv should not be reset to 0, but to 1 or forced denominator unfortunately, all our unit tests round down the value, so this bug was not detected. Laurent Balland committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/dc9b8c31aaf72812dc205f610638098898a4cde7 tdf#153887 Fraction number format: avoid 0/0 It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Laurent Balland committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/072f84001b2d28915085909a4d9a5a52bd7f6b61 tdf#153887 Fraction number format: avoid 0/0 It will be available in 7.5.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Laurent Balland committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/40beefc591d8417f1291834fe66a348678241820 tdf#153887 Fraction number format: avoid 0/0 It will be available in 7.4.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. |