Bug 100413 - UI: default preview value in number format is different from formats list
Summary: UI: default preview value in number format is different from formats list
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Laurent Balland
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-15 20:03 UTC by Laurent Balland
Modified: 2016-10-25 18:54 UTC (History)
1 user (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-06-15 20:03:41 UTC
Description: In Format > Cells > Numbers UI dialog, a preview string is displayed according to the format chosen and cell's value. If an empty cell is selected, a default value is displayed. But this value is different from the one in format list and then create some inconsistency.

Steps to reproduce:
1. Select an empty cell
2. Format > Cells > Numbers

Actual behavior:
With Number category
  - Preview string is: 1234.56789
  - Format list uses a different value: -1234.1234
Other categories reflect more inconvenient inconsistency. For instance, for Fraction, format list is difficult to understand (quarter format (new format in master LibO 5.3) displays no fraction).

Expected behavior:
Default values should be the same in preview string and format list. They should be chosen to reflect format specificity.

Entry points:
Default values for format list is defined here:
http://opengrok.libreoffice.org/xref/core/include/svx/flagsdef.hxx#74
Default value for preview string is unique whatever the category:
http://opengrok.libreoffice.org/xref/core/svx/source/items/numfmtsh.cxx#34
Comment 1 Laurent Balland 2016-06-24 14:54:40 UTC
As an extension, with LibO 5.2, there is a new bug: new fraction formats (quarter and 100th) are not explicit in UI number format dialog:
Format > Cells > Numbers, Category: Fraction
In format list, format for quarter displays "1234" and do not show any quarter.
Comment 2 Commit Notification 2016-06-29 09:46:57 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=9724eaa94e1f1e58dbbba2ecad4287245e0f0bf0

tdf#100413 Use same default values for preview string and format list

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.