Bug 118337 - Evenly fill space between repeated character-fill in number formats
Summary: Evenly fill space between repeated character-fill in number formats
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.0.0.beta2+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Number-Format
  Show dependency treegraph
 
Reported: 2018-06-24 00:54 UTC by Aron Budea
Modified: 2018-07-13 14:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (35.70 KB, image/png)
2018-06-24 00:54 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-06-24 00:54:59 UTC
Created attachment 143061 [details]
Screenshot

This is mainly used when left-aligning currency symbols. Sample spreadsheet: attachment 130869 [details]
Currently the spreadsheet looks like the attached screenshot: the symbols are more or less aligned, but there's some variance, which doesn't look great .
This occurs because left-alignment is achieved via character fill, and if the font isn't monospaced, alignment won't be even.

For reference, the specification proposal mentions:
"Fill characters may not fill all the available space in a cell. The distribution of the remaining space is implementation dependent."
https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes/List_of_LibreOffice_ODF_Extensions#Support_for_repeating_codes_in_number_formats_for_calc
https://issues.oasis-open.org/browse/OFFICE-3765

If not too difficult, the best way would be to spread the remaining space evenly between fill characters.
Comment 1 Laurent Balland 2018-06-24 09:58:40 UTC
(In reply to Aron Budea from comment #0)
> This occurs because left-alignment is achieved via character fill, and if
> the font isn't monospaced, alignment won't be even.
Hi,
From my point of view, alignment of decimal separator requires using a monospaced font.
Comment 2 Aron Budea 2018-06-24 21:04:02 UTC
(In reply to Laurent BP from comment #1)
> From my point of view, alignment of decimal separator requires using a
> monospaced font.

This bug report isn't really about alignment of decimal separator, but that's a good point to check. In fact the alignment of decimal separator used to be fine in versions < 5.3 even with a non-monospace font like Liberation Sans, but it changed in 5.3, and I'm not sure that's correct.

Can be seen easily with the following example (use locale-specific decimal separator instead of "."):
111.111
222.222

The above issue seems to be the same as bug 118221.
Comment 3 Buovjaga 2018-07-13 14:47:50 UTC
Sure, why not? Looks like this left-aligning of currency symbols is a new feature implemented in the 4.x era as it is not yet in 3.6.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: bd394492c165d27c96a44495d9ca694a242acb8f
CPU threads: 8; OS: Linux 4.17; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on July 11th 2018