https://bugs.documentfoundation.org/show_bug.cgi?id=165562
Bug ID: 165562
Summary: Number format '?' does not maintain decimal alignment
Product: LibreOffice
Version: 24.8.4.2 release
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
A reproducible test case:
1. In A1 enter "18.672903"
2. In A2 enter "47"
3. In A3 enter "1.6052"
4. Apply the custom number format ".???" to all three cells
5. Observe that the "47." is badly misaligned with the other two cells
Expected behaviour: the decimal points in all three cells align in a vertical
column. This is what Excel does.
I tried quite a number of fonts in my Excel instance, only a very small number
of fonts ended up with misalignment: "Berlin Sans" and "Georgia" were two. The
rest align the decimals as expected.
https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html
specifically says "The ? works as the # but adds a space character to keep
decimal alignment if there is a hidden non-significant zero."
I'm not sure how Excel manages to keep decimal alignment in most cases/fonts,
but, LibreOffice needs to do the same.
Requiring a user to change from their chosen font to a mono-spaced font (which
does work around the bug, I admit that) is not an acceptable solution long
term.
This comment https://bugs.documentfoundation.org/show_bug.cgi?id=118337#c2
indicates that decimal alignment used to work, and then broke. Perhaps that
could be bisected to determine the breaking change?
I originally left this as a comment on this bug (
https://bugs.documentfoundation.org/show_bug.cgi?id=158890#c11 ). That bug is
resolved according to its original description but that does not solve this
bug.
Reproduced just now on:
Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (C.UTF-8); UI: en-US
Ubuntu package version: 4:24.8.4~rc2-0ubuntu0.24.04.1~lo1
Calc: threaded
--
You are receiving this mail because:
You are the assignee for the bug.