Download it now!
Bug 107425 - Conditional formatting is applied as direct format rather than a style
Summary: Conditional formatting is applied as direct format rather than a style
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2017-04-25 15:13 UTC by Heiko Tietze
Modified: 2019-01-14 12:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Picture or it didnt happen (27.43 KB, image/png)
2017-04-25 15:13 UTC, Heiko Tietze
Details
Example (15.79 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-04-29 08:05 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2017-04-25 15:13:42 UTC
Created attachment 132834 [details]
Picture or it didnt happen

Applying a style is expected to not work as direct formatting. So either the text is changed or the function improved.

1. Enter some data per =rand()
2. Style the cells with 'Good'
3. Apply a conditional formatting with Cell value is + less than + 0.5 + Apply style = Bad

Bad cells still have the style Good.

Version: 5.4.0.0.alpha0+
Build ID: e175f9f4393eb3badd763fa5b1cdc5b3aabab0e4
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-04-19_01:06:49
Locale: de-DE (de_DE); Calc: group
Comment 1 m.a.riosv 2017-04-28 23:11:08 UTC
Hi @Heiko, could be easy attaching a sample file.
Comment 2 Heiko Tietze 2017-04-29 08:05:31 UTC
Created attachment 132948 [details]
Example

Conditional formatting with Cell Style = Bad for values below 0.5. Column B has some cells with formatting Good, in column C all cells are styled as Warning. Press ctrl+R to see the conditional formatting overriding the user style.
Comment 3 m.a.riosv 2017-04-29 14:22:30 UTC
I don't know if I understand right the question, but if it is that the style showed on the side bar it's still the one that cells have without the CF, not the applied by CF, I can confirm the issue.

It never works on any version of LIbreOffice (I have tested with several since the first)

I'm not able to find now, but I think it was reported before.
Comment 4 Heiko Tietze 2017-05-01 09:23:23 UTC
(In reply to m.a.riosv from comment #3)
> I don't know if I understand right the question, but if it is that the style
> showed on the side bar it's still the one that cells have without the CF,
> not the applied by CF, I can confirm the issue.

CF pretends to 'apply a style' but does format directly. Ordinary users do not exactly understand what styles are so we make this crystal clear wherever we can.

Solution A: Apply a style per cell
Solution B: Change the text to "Apply formatting", or the like (suboptimal since it offers styles)
Comment 5 Markus Mohrhard 2017-06-25 21:09:36 UTC
(In reply to Heiko Tietze from comment #4)
> (In reply to m.a.riosv from comment #3)
> > I don't know if I understand right the question, but if it is that the style
> > showed on the side bar it's still the one that cells have without the CF,
> > not the applied by CF, I can confirm the issue.
> 
> CF pretends to 'apply a style' but does format directly. Ordinary users do
> not exactly understand what styles are so we make this crystal clear
> wherever we can.
> 
> Solution A: Apply a style per cell
> Solution B: Change the text to "Apply formatting", or the like (suboptimal
> since it offers styles)

This is a misconception on your side. Conditional format should exactly not change the existing style of the cell. A conditional format only applies its own style if the condition is met. The existing cell style is still retained and will be applied again when the condition is not met any more.