Bug 102507 - Denominator should be left aligned
Summary: Denominator should be left aligned
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Laurent Balland
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-25 08:21 UTC by Laurent Balland
Modified: 2016-11-09 17:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2016-09-25 08:21:56 UTC
Description: With Fraction Number Format, if minimum number of digits of denominator is larger than required, blanks are added. In LibreOffice, they are added on left of denominator, between fraction bar and denominator. In Excel or Gnumeric it is added on right of denominator: denominator is left aligned.

Steps to reproduce:
1. Format > Cells > Numbers > Fraction
2. Select or enter format with 3 digits for denominator, such as # ???/???
3. Enter value 0.5

Actual behavior:
Display is
__1/__2
( _ denotes a blank)

Expected behavior:
__1/2__
Actual display is weird. Excel and Gnumeric have expected display.
Comment 1 m_a_riosv 2016-09-25 12:17:01 UTC
Reproducible.
Version: 5.2.2.2 (x64)
Build ID: 8f96e87c890bf8fa77463cd4b640a2312823f3ad
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
Locale: es-ES (es_ES); Calc: CL
Version: 5.3.0.0.alpha0+
Build ID: 70c7e82003a539ed7f7ccbe596bde5ac9031d15c
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-09-23_06:53:48
Locale: es-ES (es_ES); Calc: CL
Comment 2 m_a_riosv 2016-09-25 12:25:27 UTC
Works fine with '# ???/##?'

In agreement with the help I'm not sure this is really a bug.
https://help.libreoffice.org/Common/Number_Format_Codes#Decimal_Places_and_Significant_Digits

? is to displays space characters instead of extra zeros.
Comment 3 Laurent Balland 2016-09-25 12:38:53 UTC
(In reply to m.a.riosv from comment #2)
> Works fine with '# ???/##?'
> 
> In agreement with the help I'm not sure this is really a bug.
> https://help.libreoffice.org/Common/
> Number_Format_Codes#Decimal_Places_and_Significant_Digits
> 
> ? is to displays space characters instead of extra zeros.

Hi Miguel,

Actually, # does not allow alignment of fractions (with a monotype font). Format # ???/##? will result in:
PI() => 3__16/113
0.5  =>    ___1/2
3.5  =>   3___1/2
2.22 =>  2__11/50
Whereas format # ???/??? result in:
PI() => 3__16/113
0.5  =>  ___1/__2
3.5  => 3___1/__2
2.22 => 2__11/_50
Expected result would be:
PI() => 3__16/113
0.5  =>  ___1/2__
3.5  => 3___1/2__
2.22 => 2__11/50_
Comment 4 m_a_riosv 2016-09-25 15:58:36 UTC
I see, but I don't know if it can be considered a bug.
Comment 5 Laurent Balland 2016-09-25 17:19:27 UTC
If user prefer right alignment, he may use 0 instead of ?
Format # ???/000 result in:
PI() => 3__16/113
0.5  =>  ___1/002
3.5  => 3___1/002
2.22 => 2__11/050

IMHO, space between fraction bar and denominator is quite strange, moreover with a large number of digits.
Comment 6 m_a_riosv 2016-09-25 20:37:45 UTC
I have not a clear opinion as I don't use it, and haven't remember in the forums comments about this specific matter.
Comment 7 Laurent Balland 2016-09-28 19:28:04 UTC
@Eike: do you have an opinion about this?
Comment 8 Eike Rathke 2016-10-05 13:01:50 UTC
Left leading blanks at the denominator look odd, and if Excel and Gnumeric handle this differently then I'm for changing it to do the same.

Patch already pending at https://gerrit.libreoffice.org/29267 => assigning this to Laurent.
Comment 9 Commit Notification 2016-10-05 13:07:51 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=deb3fcc4876ec2ab45415a06fc80b247826cc48b

tdf#102507 Left aligned 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.
Comment 10 Xisco Faulí 2016-11-08 08:54:58 UTC
Hello Laurent,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?
Comment 11 Laurent Balland 2016-11-08 17:57:46 UTC
(In reply to Xisco Faulí from comment #10)
> Hello Laurent,
> Is this bug fixed?
> If so, could you please close it as RESOLVED FIXED?


Yes, it is fixed. I was just waiting that QA test is also pushed to master
https://gerrit.libreoffice.org/30167/
before closing this bug
Comment 12 m_a_riosv 2016-11-08 18:32:41 UTC
Tested Ok.
Version: 5.3.0.0.alpha1+
Build ID: cea3b8762bfb7f0da19bab8a3d468bcbf987eb0f
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-11-06_19:55:54
Locale: es-ES (es_ES); Calc: CL
Comment 13 Commit Notification 2016-11-09 14:54:42 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2e84e730a89de683c97bbcab89cd2dbf5a7a9b6d

tdf#102507 Add qa test of left aligned 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.