Description: Forced denominator higher than 14 and one '?' for numerator gives wrong fraction Steps to reproduce: 1. Format > Cells > Numbers, User format # ?/100 2. Enter values such from 0.01 to 0.2 each 1% Actual behavior: Values between 1% and 5% are displayed: 0 Values between 6% and 11% are displayed: 11/100 Values between 12% and 13% are displayed: 12/100 and so on Expected behavior: Values should be displayed 1/100 to 20/100 The problem is due to the fact that Forced Denominator fraction is calculated not from the value, but from nFrac/nDiv which is a rounded value http://opengrok.libreoffice.org/xref/core/svl/source/numbers/zformat.cxx#lcl_ForcedDenominator nFrac and nDiv are calculated just before in http://opengrok.libreoffice.org/xref/core/svl/source/numbers/zformat.cxx#ImpGetFractionOutput with ?/? as format
Reproduced. Arch Linux 64-bit, KDE Plasma 5 Version: 5.3.0.0.alpha0+ Build ID: ff25ea3d5ccf3a990767cbb1ef99037d3f84b072 CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; Locale: fi-FI (fi_FI.UTF-8) Built on June 26th 2016
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=97fda453bc43fbae3d0a9fd05259e92d3205fd06 tdf#100594 Calculate nFrac with fNumber for Forced Denominator 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.
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=37d97ff389d0941b32405f3433d2e595e10c76ab tdf#99996 tdf#100594 tdf#100754 Add qa unit test 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.