https://bugs.documentfoundation.org/show_bug.cgi?id=148434
Bug ID: 148434 Summary: LibreOffice Calc Formatting Option for Leading Zeros in Numbers Does Not Format Correctly Product: LibreOffice Version: 7.0.4.2 release Hardware: x86-64 (AMD64) OS: Linux (All) Status: UNCONFIRMED Severity: normal Priority: medium Component: Calc Assignee: libreoffice-bugs@lists.freedesktop.org Reporter: jsussma...@outlook.com Description: When I format a spreadsheet cell to set the number of leading zeros for a number (N), the resultant format is not the number of leading zeros in the number N. Rather, the format is the number of digits to the left of the decimal at which a leading zero, if any, will appear. E.g., if I format the number of leading zeros at 4, the number 01234 will be formatted as 1234. However, if I format the number of leading zeros at 5, the number 01234will be formatted to appear correctly as 01234. Global formatting of the cells of a spreadsheet containing numbers with different numbers of digits to the left of a decimal point that are preceded by one or more leading zeros (e.g., 01, 001, 0001, 00001, etc.) now is practically impossible. To be accurate, the total number of digits to the left of a decimal point within each cell now would need to be counted, and--unless all cells contained numbers with both the same number of digits and the same number of leading zeros--to be separately formatted to make sure that the correct number of leading zeros are selected. Making matters worse, even if one painstakingly counts the numbers of digits to the left of the decimal point and the number of leading zeros for each number, and formats each cell accordingly, the efforts may be for naught if another LibreOffice Calc formatting setting later is applied. Thus, e.g., in the case of "Autoformatting" an otherwise properly formatted spreadsheet to enhance visual appeal (e.g., different color backgrounds for every other row and column) the number of leading zeros for every cell will be modified in accord with the Autoformatting rather with the cell formatting set by the user. Steps to Reproduce: 1.Open LibreOffice Calc; 2.Open Spreadsheet; 3.Enter number with one or more leading zeros in one or more cells; 4.Select one or more cell containing number with one or more leading zeros; 5.Select Format; 6.Select Numbers; 7.Select Options; and 8.Select Leading Zeros. 9.Enter number of Leading zeros. Actual Results: Cells containing one or more numbers with leading zeros were not formatted to display the number of leading zeros selected. Instead, the cells were formatted to display the number of digits to the left of the decimal point at which a leading zero, if any, would appear. Expected Results: The number of leading zeros selected (LibreOffice Calc>Spreadsheet>Format>Cells>Numbers>Options>Leading zeros) is the number of leading zeros regardless of the number of digits to the left of the decimal point that the number has. Reproducible: Always User Profile Reset: Yes Additional Info: I have been using and enjoying LibreOffice (and its Sun Office progenitor) for decades, in various Linux distributions. Insofar as I am aware, the "leading zero" feature does not work as it did in previous versions of LibreOffice Calc. Last week, I switched to the MX-21 XFCE Wildflower distro from Linux Mint (Mate). I discovered this "bug" through happenstance while proofing a spreadsheet containing numerous account data. See attached for "Help - About LibreOffice." -- You are receiving this mail because: You are the assignee for the bug.