Issue 126973 - writer table currency number format # suffix saved as 0
Summary: writer table currency number format # suffix saved as 0
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: 4.1.2
Hardware: PC All
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-16 21:17 UTC by Girvin Herr
Modified: 2016-05-16 23:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.2
Developer Difficulty: ---


Attachments
Saving the File with Custom Formatting (72.94 KB, image/png)
2016-05-16 23:24 UTC, orcmid
no flags Details
Reloaded File shows replacement of the Custom Formats (72.94 KB, image/png)
2016-05-16 23:26 UTC, orcmid
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Girvin Herr 2016-05-16 21:17:21 UTC
This problem is repeatable and can be verified in a writer file. To verify the problem, open a new blank writer file, insert a 2x2 table, right-click in a table cell and bring up the "Number Format" option. Select the "Currency" category and "-$1,234.00" (red) format. In the "Format code" field, modify the number format by appending a # to the $#,##0.00 fields, producing $#,##0.00#. Click on "Add". This new format is then present in the "User Defined" and "Currency" number Categories. Click on OK to select the new format in the table cell. Save this test file and re-open it. Right click on the same table cell and select "Number format". Note that the format is now $#,##0.000, not the proper $#,##0.00#. The format has been changed by the save or open functions.

Note that the Help describes an example of this format, using the # suffix in a decimal fraction field, so this problem behavior is contrary to the help.
Comment 1 orcmid 2016-05-16 23:24:37 UTC
Created attachment 85542 [details]
Saving the File with Custom Formatting

An ODT was created using Apache OpenOffice 4.1.2 on Windows 10 Pro x64.

The Custom formats were created and applied to the table, and values were presented with only 2 digits past the decimal point and with a non-zero third digit after the decimal point.

The effect of the formatting codes is apparent.

Also, after the save to a file, the formatting remains as specified for the open document.
Comment 2 orcmid 2016-05-16 23:26:26 UTC
Created attachment 85543 [details]
Reloaded File shows replacement of the Custom Formats

On opening AOO 4.1.2 from the saved file, the formatting has been changed to show three digits after the decimal point always.

The alteration of the Custom Format and of the presented cells is demonstrated in this screen capture.
Comment 3 orcmid 2016-05-16 23:35:38 UTC
The use of numeric cell formatting in Writer-produced tables is confined to the provisions of OpenDocument Format (ODF) used for .odt files.  This is the same formatting that is used for Calc.

ODF has no means for specifying the elimination of trailing zeros, even though the Writer (and Calc) implementation allow it to happened when the formatting is applied to an already-open document.  The additional formatting cannot be preserved in the saved .odt, however.

This is a limitation of the OpenDocument format.  The limitation is the same as described in Issue 126827.  The Help information is incorrect.  The Help information is correct only when the table cell is in a Calc sheet and when it is saved in Excel format.  (It doesn't apply to Writer at all since saving to Word format turns the fields into text.)

There are two defects in the Writer case.  First, the Help does not apply.  Secondly, behaving as if the customization is accepted is actually incorrect.

The policy issues around this phenomenon are similar to those for Issue 126827.