Bug 144446 - FORMATTING: Fully Implement User-Defined Numeric Format Codes in CALC Styles
Summary: FORMATTING: Fully Implement User-Defined Numeric Format Codes in CALC Styles
Status: RESOLVED DUPLICATE of bug 152724
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-11 17:53 UTC by Rob Elsman
Modified: 2023-02-27 08:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Cell Style with User-Defined Numeric Format Code (8.30 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-09-13 16:08 UTC, Rob Elsman
Details
Screenshot 1, before saving the spreadsheet (9.75 KB, image/png)
2021-09-13 16:10 UTC, Rob Elsman
Details
Screenshot 2, after the spreadsheet has been saved, closed and reopened (9.61 KB, image/png)
2021-09-13 16:12 UTC, Rob Elsman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Elsman 2021-09-11 17:53:43 UTC
Description:
Currently, saving and reopening a CALC file in CALC 7.2.0 causes the loss of user-defined numeric formats in styles.  The user-defined numeric formats are converted to a pre-defined format code.  User-defined numeric formats cannot be chosen in the styles property window.

I recommend an enhancement to fully implement the use of user-defined numeric formats in CALC styles.  The styles property settings should be enhanced to include user-defined numberic formats, and user-defined numeric formats should be retained and retrieved when the CALC file is saved and reopened.

Steps to Reproduce:
1. Format a cell with a user-defined numeric format
2. Create a new style from the cell with the user-defined numeric format
3. Save the file
4. Open the file
5. Open the Styles sidebar
6. Choose the previously created style
7. Open the properties settings for the created style
8. Notice that the user-defined numeric format code is not the format code being used for the style.
9. Select a completely empty, unused cell
10. Apply the style to the cell
11. Enter a number in the cell
12. Notice that the user-defined numeric format is not used to format the cell

Actual Results:
User-defined numeric formats in newly created styles are not saved and retrieved when a file is saved and reopened.  The user-defined numeric format is converted to a predefined format.

Expected Results:
Were it enhanced, I would expect the user-defined numeric format to be retained, saved, and retrieved when a CALC file was saved and reopened.  User-defined numeric formats would be available to choose and edit when the styles properties settings was opened.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 2; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

x64_DEB download
Comment 1 m_a_riosv 2021-09-13 13:47:17 UTC
Works for me with:
Version: 7.2.1.2 (x64) / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 4; OS: Windows 10.0 Build 21390; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL
and
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4cd3ce9848aa039b8d443a1257d1298231680b01
CPU threads: 4; OS: Windows 10.0 Build 21390; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL

Please can you attach a sample file with the issue.
Comment 2 Rob Elsman 2021-09-13 16:08:46 UTC
Created attachment 175004 [details]
Cell Style with User-Defined Numeric Format Code

Before saving the attached spreadsheet, the style's user-defined numeric format code was _(???,??0.00_);(???,??0.00);_(???,??0.00_);@

After saving the file, closing it, and reopening it, the user-defined numeric format code has been lost and a predefined format code has been substituted, instead.  I will try to attach two screen shots that demonstrate the difference before saving and after saving.
Comment 3 Rob Elsman 2021-09-13 16:10:50 UTC
Created attachment 175005 [details]
Screenshot 1, before saving the spreadsheet

Note the fixed alignment of the parentheses in cell A2.
Comment 4 Rob Elsman 2021-09-13 16:12:43 UTC
Created attachment 175006 [details]
Screenshot 2, after the spreadsheet has been saved, closed and reopened

Note that the fixed alignment of the parentheses in cell A2 has been lost.  This is because the user-defined format code got lost in the saving of the spreadsheet.  The format was converted to a predefined format.
Comment 5 Rob Elsman 2021-09-15 15:30:19 UTC
I have provided a small CALC spreadsheet and two screenshots to demonstrate what I am reporting. Thank you for your interest.
Comment 6 m_a_riosv 2021-09-16 15:46:01 UTC
I think a duplicate, may be no exact but very similar.

*** This bug has been marked as a duplicate of bug 140052 ***
Comment 7 Laurent Balland 2023-02-27 08:15:47 UTC

*** This bug has been marked as a duplicate of bug 152724 ***