https://bugs.documentfoundation.org/show_bug.cgi?id=152724

            Bug ID: 152724
           Summary: FILEOPEN FORMATTING Cell custom Format Code is changed
                    (or not saved correctly) when reopening ods file
           Product: LibreOffice
           Version: 7.4.3.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
After saving and closing an .ods file in Calc, when the file is opened again
the custom Format Code that was used before has now changed. Either it was not
saved correctly, or some "automatic" process is changing it when opening the
file.

Steps to Reproduce:
1_ Fill a column with the following values (one value in each row/cell):

-12
12
0
1
2
-1
-2

2_ Select the column and change the font type to some mono-spaced (i.e.
fixed-pitch, fixed-width, or non-proportional) font (e.g. Liberation Mono,
Source Code Pro, Courier New, Consolas, Lucida Console, ...).

3_ Select "Align center" for the column.

4_ (Ctrl+1) Format -> Cell -> Numbers -> (custom) Format Code field:

_-?0;-?0

(underscore, minus, question mark, zero, semicolon, minus, question mark, zero)


5_ Please note that, under the above conditions, these (whole) numbers are
(correctly) shown "aligned", even-though the font alignment for the cells is
(intentionally) "center", with the negative sign also aligned, and the zero
value is also displayed. At this point, save and _close_ the workbook.

6_ Reopen the workbook and notice the following changes:

6.1_ The values are not shown "aligned" (in the sense they were before). The
font alignment is still "center", but the contents are not shown in the same
way they were before saving_and_closing the file.
6.2_ The zero value is not shown.
6.3_ The custom Format Code (Ctrl+1) has changed, without user knowledge /
intervention:
6.3.1_ Before: _-?0;-?0
6.3.2_ After: " "#;-#

7_ Select the column.
8_ (Ctrl+1): change the Format Code to:

_-?0;-?0;_-?0

(please note the additional third section, for zero).

9_ Save and Close.
10_ Reopen the workbook and notice the following changes (again):

10.1_ The values are not shown "aligned" (in the sense they were before). The
font alignment is still "center", but the contents are not shown the same way
they were before saving_and_closing the file.
10.2_ The zero value is not shown.
10.3_ The custom Format Code (Ctrl+1) has changed, without user knowledge /
intervention:
10.3.1_ Before: __-?0;-?0;_-?0
10.3.2_ After: [>0]" "#;[<0]-#;" "#

At the moment of writing, the reference for "Number Format Codes" in LO 7.4 is:
 https://help.libreoffice.org/7.4/en-US/text/shared/01/05020301.html 

Actual Results:
Custom Format Code is not preserved after closing the file. In particular, the
underscore_and_minus is being changed, and the "question_mark" and "zero" are
being changed to "#".

Expected Results:
Custom Format Code should be preserved as the user introduced it and saved, not
changed.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: es-AR (es_AR); UI: en-US
Calc: CL

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to