Bug 148489 - Conditional Formatting with Styles creates bad style on FILESAVE
Summary: Conditional Formatting with Styles creates bad style on FILESAVE
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.2.2 release
Hardware: All Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-09 19:24 UTC by kenneth.w.hightowerjr
Modified: 2023-09-12 14:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Issue File (23.01 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-04-09 22:44 UTC, kenneth.w.hightowerjr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kenneth.w.hightowerjr 2022-04-09 19:24:38 UTC
Description:
Simple conditional format with formula ISEVEN(ROW()) applied to range A1:AMJ1048576 (entire sheet) to apply style "Alternate"

Style "Alternate" is duplicate of default with Color Light Gray 5 (#eeeeee) for background.

Saveas filename.xlsx 

Close and reopen file. New style is created "ConditionalStyle_1"
Why is a new style created at all?

Steps to Reproduce:
1.Enter data in multiple cells extending a couple rows.
2.Duplicate default Style changing only background color, name Style "Alternate"
3.Apply conditional formatting
4.Save and close using xlsx extension 
5.Open file and find generated Style "ConditionalStyle_1" applied to Conditional Formatting

Actual Results:
Style "Alternate" still exists but is no longer used by Conditional Formatting.
Deleting "ConditionalStyle_1" and applying "Alternate" in Conditional Formatting creates new "ConditionalStyle_1" on filesave with white font.
Fixing of font color on Style "ConditionalStyle_1" followed by filesave creates new Style "ConditionalStyle_1 1" with white font. Style "Alternate" is no longer in use.
New Style generation appears after fileopen.

Expected Results:
Conditional Formatting retain application of original generated Style without creation of other Style. 


Reproducible: Always


User Profile Reset: Yes



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 24; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

OS: Windows 10Pro 21H2 19044.1586
Windows Feature Experience Pack 120.2212.4170.0
OS is 64bit: yes
OpenGL possible (enabled for application:unknown) 12.1 
Shader 6.5
Unable to install OpenGL Extensions Viewer: Blocked by Windows SmartScreen
OpenCL available and allowed
Comment 1 m_a_riosv 2022-04-09 22:15:01 UTC
What file format do you use to save?
Can you attach a sample file in the native LibreOffice file format '.ods'?
Comment 2 kenneth.w.hightowerjr 2022-04-09 22:44:26 UTC
Created attachment 179431 [details]
Issue File

As requested.
I do tend to use Excel formats for compatibility as everyone else I know uses Office products
Comment 3 QA Administrators 2022-04-10 03:36:41 UTC Comment hidden (obsolete)
Comment 4 m_a_riosv 2022-04-10 19:52:20 UTC
If I remember fine, in xlsx format, the conditional formats are manage not the same as in LibreOffice, so new style names are created by LibreOffice when open that files.
Comment 5 kenneth.w.hightowerjr 2022-04-13 16:04:46 UTC
Is there an Excel format that wont break? Xlsm, or just basic xls?
Comment 6 m_a_riosv 2022-04-13 20:46:44 UTC
I don't think so, but you can just test.
Comment 7 Buovjaga 2023-01-05 12:11:52 UTC
(In reply to kenneth.w.hightowerjr from comment #2)
> Created attachment 179431 [details]
> Issue File
> 
> As requested.
> I do tend to use Excel formats for compatibility as everyone else I know
> uses Office products

This file seems to not be an original ODS file, but was saved to ODS from XLSX as it already has the ConditionalStyle_1 styles.
Comment 8 Luca 2023-09-12 13:49:59 UTC
I have the same kenneth.w.hightowerjr@outlook.com 2022-04-09 problem:
If I create a new style to use in conditional formatting, it is no longer used, but it is replaced to "ConditionalStyle_1"

Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: threaded
Comment 9 m_a_riosv 2023-09-12 13:55:11 UTC
(In reply to Luca from comment #8)
> ....
Maybe because you save in xlsx format. It is how excel manage the conditional format styles.
Comment 10 Buovjaga 2023-09-12 13:55:51 UTC
(In reply to Luca from comment #8)
> I have the same kenneth.w.hightowerjr@outlook.com 2022-04-09 problem:
> If I create a new style to use in conditional formatting, it is no longer
> used, but it is replaced to "ConditionalStyle_1"
> 
> Version: 7.6.0.3 (X86_64) / LibreOffice Community
> Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
> CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL:
> win
> Locale: it-IT (it_IT); UI: it-IT
> Calc: threaded

Can you attach an example file that is in .ods format and has never been saved as .xlsx? Then mention the steps that you did before the problem appeared.
Comment 11 Luca 2023-09-12 14:11:37 UTC
(In reply to m.a.riosv from comment #9)
> (In reply to Luca from comment #8)
> > ....
> Maybe because you save in xlsx format. It is how excel manage the
> conditional format styles.

YES!!!! YOU ARE RIGHT!!!
I copied e pasted all in a new file and saved as .ods
ALL PERFECT! NO ERROR! NO PROBLEM!

I saved as .xlsx and, now, conditional formatting doesn't use my styles, but new "ConditionalStyle_xx" styles

Thank you
Comment 12 Luca 2023-09-12 14:12:34 UTC
(In reply to Buovjaga from comment #10)
> (In reply to Luca from comment #8)
> > I have the same kenneth.w.hightowerjr@outlook.com 2022-04-09 problem:
> > If I create a new style to use in conditional formatting, it is no longer
> > used, but it is replaced to "ConditionalStyle_1"
> > 
> > Version: 7.6.0.3 (X86_64) / LibreOffice Community
> > Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
> > CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL:
> > win
> > Locale: it-IT (it_IT); UI: it-IT
> > Calc: threaded
> 
> Can you attach an example file that is in .ods format and has never been
> saved as .xlsx? Then mention the steps that you did before the problem
> appeared.

thank you too Buovjaga.
Comment 13 Buovjaga 2023-09-12 14:15:02 UTC
Let's set back to unconfirmed until we hear from Kenneth.