Calc removes the colours from user-defined number format definitions, even in an existing spreadsheet that previously worked. In some cases, the colours disappear from the sheet, in other cases they remain but the format definition no longer shows them.
Steps to reproduce:
1) Open a spreadsheet containing cells with the following user-defined number format (or similar), or attempt to create this user-defined format:
2) Select Format Cells|Numbers
LibO 3.4 replaces this format with the following:
The colour information is missing from the format definition. The colours may remain, but if the sheet previously contained this format working, the colours are all gone.
Previous versions of LibO and OOo treated this format code correctly, and the code was available for editing in the User-defined section of the number formats list.
Build: LibreOffice 3.4.1 OOO340m1 (Build:103)
System: Windows 7 64-bit
If the format given above is applied to some cells, and then the user wishes to apply the same format to a further range of cells, as the format in the user-defined list no-longer contains the colour information, the colours do not appear. However the behaviour seems to differ in a new document, so the fault may only partly replicate if a new document is created to test it: the colour codes are then lost from the Format code, but the colours may still appear. If the colours will appear in the document, colours are also still shown in the illustration box in the Format Cells dialogue. The problem did not exist in LibO 3.3 and previous.
I went through a large document rewriting all the format codes with the one I gave at (1). Now I have reloaded the document, all the colours are gone, and LibO has replaced the colour code with the one at (2). I could tick the box for "Negative numbers in red", but then I lose the "+" in front of the numbers. As soon as I enter any user-defined formatting, the "Negative numbers in red" greys out, but user-defined colours are removed from the format in the list, and no-longer work in the cells where they were applied next time the document is loaded.
Created attachment 49690 [details]
Simple spreadsheet with conditional colours
This ODS file was created in LibreOffice 3.4.1 OOO340m1 (Build:103) in Win7 64-bit OS. Cells B1:B20 had the User-defined number format entered as:
[BLUE][<0]#,0 "°C";[RED][>30]#,0 "°C";[BLACK]#,0 "°C"
which was pasted directly from the LibO online help page:
The colours displayed correctly as follows: B1:B4 in BLUE, B5:B8 in BLACK, B9:B20 in RED.
The file was saved, closed and reopened. The format codes for B1:B20 now show as
[<0]#,##0" °C";[>30]#,##0" °C";#,##0" °C"
and all numbers appear in black.
This behaviour was not present in LibO 3.3 or OOo.
*** This bug has been marked as a duplicate of bug 37658 ***