Bug 118345 - FILESAVE: Decimal part of scientific numbers not correctly saved in ODF with '?'
Summary: FILESAVE: Decimal part of scientific numbers not correctly saved in ODF with '?'
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.7.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Number-Format
  Show dependency treegraph
 
Reported: 2018-06-24 12:30 UTC by Laurent Balland
Modified: 2019-08-16 17:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Some examples using such format (14.06 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-08-16 17:08 UTC, Laurent Balland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2018-06-24 12:30:13 UTC
Description:
Number can have in their decimal part '?' to indicate a decimal digit, which will be replaced by a space if not necessary, whereas '#' is replaced by nothing and '0' by a zero. Scientific numbers have the same behavior. But if such format is saved in ODF, '?' are replaced by '#' and decimal alignment is lost.

Steps to Reproduce:
1. Define a scientific format with '?' in decimal part such as 0.???E+00
   Format > Cells > Numbers, type code in Format Description
2. Save and Reload
3. Check format

Actual Results:
'?' are replaced by '#' which gives 0.###E+00

Expected Results:
Format should not be modified as it is correctly in initial step


Reproducible: Always


User Profile Reset: Yes



Additional Info:
In xmlnumfe.cxx, it seems that SvXMLNumFmtExport::WriteScientificElement_Impl does not care if there are some decimal replacement.
Comment 1 Jacques Guilleron 2018-06-24 15:27:08 UTC
Hi Laurent,

Reproduced with
LO 6.0.4.2 Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
Threads CPU : 2; OS : Windows 6.1; UI Render : par défaut; 
Locale : fr-FR (fr_FR); Calc: CL
and 
LO 3.5.3.2 
Version ID : 235ab8a-3802056-4a8fed3-2d66ea8-e241b80 where ??? characters are replaced by 000.
Comment 2 Laurent Balland 2018-06-24 18:54:22 UTC
Actually, it is an enhancement, as this behavior is not defined in ODF standard.
Comment 3 Eike Rathke 2018-09-03 13:13:34 UTC
Does formatting as 0.??E+0 really make sense? Instead of 1.00E+45 or 1E+45
1.  E+45
looks very odd to me.
Comment 4 Eike Rathke 2018-10-15 11:44:00 UTC
Ping? Any opinion on the previous comment 3?
Comment 5 Xisco Faulí 2019-01-17 11:09:20 UTC
Dear Laurent BP,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 6 Laurent Balland 2019-08-16 17:08:12 UTC
Created attachment 153443 [details]
Some examples using such format

Hi Eike, sorry for the delay
(In reply to Eike Rathke from comment #3)
> Does formatting as 0.??E+0 really make sense? Instead of 1.00E+45 or 1E+45
> 1.  E+45
> looks very odd to me.

User may expect some alignment, with engineering notation for instance:
##0.???E+00

Examples attached