Using LibreOffice Calc 5.1.0.1 (x64) creating a field with the following formats and entering an integer / whole number leads to whitespace being appended to the given number. Example custom number formats: "# ?/?" - Always adds additional whitespace for each added question mark; maybe intentional but not clear from the documentation "# #/#" - Undocumented; does not add additional whitespace but also seems to not remove the whitespace before the optional fraction, leading to a non-removable trailing whitespace leftover (this seems to happen in the first case too)
"# ?/?" - reproducible with LibreOffice 3.5.0 Build ID: d6cde02, lowering version Version: 5.2.0.0.alpha0+ Build ID: a27fac3b8f2bae18f62bab315051732df1bb29ab CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-01-01_05:08:26
It is an undocumented feature. This Help page should be improved: https://help.libreoffice.org/Common/Number_Format_Codes#Decimal_Places_and_Significant_Digits
I agree with the first one ('# ?/?') setting the length of the dividend/divisor to a fixed value being an undocumented feature, but the single non-removable whitespace between the integer and the fraction part is a bug to me. Put 0.5 in a cell and format it as '# #/#'. The 1/2 will have a leading whitespace in front of it, because the integer zero gets omitted, while the whitespace stays.
(In reply to Johannes Pfrang [:johnp] from comment #3) > Put 0.5 in a cell and format it as '# #/#'. The 1/2 will have a leading > whitespace in front of it, because the integer zero gets omitted, while the > whitespace stays. Your example is not good because whitespace is unconditionally defined in the format, so it has to be displayed. There is no whitespace with format [<=-1]# #/#;[>=1]# #/#;#/#
Local help has been updated: https://gerrit.libreoffice.org/#/c/21827/ but online help is not up to date. https://help.libreoffice.org/Common/Number_Format_Codes#Decimal_Places_and_Significant_Digits
(In reply to Laurent BP from comment #5) > but online help is not up to date. The gerrit page is online now. https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html?&DbPAR=CALC Maybe this is resolved now? Or do you think something else is still missing?
(In reply to sdc.blanco from comment #6) > Maybe this is resolved now? Or do you think something else is still missing? You are right. Resolved as Fixed.